feat(profile): add counterparty profile and enforce it for order creation
This commit is contained in:
@@ -61,6 +61,7 @@ model User {
|
||||
role UserRole
|
||||
companyId String?
|
||||
company Company? @relation(fields: [companyId], references: [id])
|
||||
counterpartyProfile CounterpartyProfile?
|
||||
registrationRequests RegistrationRequest[] @relation("RegistrationRequester")
|
||||
reviewedRequests RegistrationRequest[] @relation("RegistrationReviewer")
|
||||
sentInvitations Invitation[] @relation("InvitationManager")
|
||||
@@ -78,6 +79,27 @@ model User {
|
||||
updatedAt DateTime @updatedAt
|
||||
}
|
||||
|
||||
model CounterpartyProfile {
|
||||
id String @id @default(cuid())
|
||||
userId String @unique
|
||||
user User @relation(fields: [userId], references: [id])
|
||||
companyName String
|
||||
companyFullName String
|
||||
inn String
|
||||
kpp String?
|
||||
ogrn String?
|
||||
legalAddress String
|
||||
bankName String
|
||||
bik String
|
||||
correspondentAccount String
|
||||
checkingAccount String
|
||||
signerFullName String
|
||||
signerPosition String
|
||||
signerBasis String
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
}
|
||||
|
||||
model RegistrationRequest {
|
||||
id String @id @default(cuid())
|
||||
companyName String
|
||||
|
||||
Reference in New Issue
Block a user