refactor: customer create and update process
This commit is contained in:
parent
b167a612b4
commit
5bb8da818c
6 changed files with 261 additions and 462 deletions
|
|
@ -403,14 +403,17 @@ enum CustomerType {
|
|||
}
|
||||
|
||||
model Customer {
|
||||
id String @id @default(uuid())
|
||||
code String
|
||||
personName String
|
||||
personNameEN String?
|
||||
customerType CustomerType
|
||||
customerName String
|
||||
customerNameEN String
|
||||
taxNo String?
|
||||
id String @id @default(uuid())
|
||||
|
||||
customerType CustomerType
|
||||
|
||||
namePrefix String?
|
||||
firstName String
|
||||
firstNameEN String?
|
||||
lastName String
|
||||
lastNameEN String?
|
||||
gender String
|
||||
birthDate DateTime
|
||||
|
||||
status Status @default(CREATED)
|
||||
statusOrder Int @default(0)
|
||||
|
|
@ -430,24 +433,25 @@ model Customer {
|
|||
}
|
||||
|
||||
model CustomerBranch {
|
||||
id String @id @default(uuid())
|
||||
branchNo Int
|
||||
code String
|
||||
legalPersonNo String
|
||||
|
||||
name String
|
||||
nameEN String
|
||||
|
||||
id String @id @default(uuid())
|
||||
customer Customer @relation(fields: [customerId], references: [id], onDelete: Cascade)
|
||||
customerId String
|
||||
|
||||
taxNo String?
|
||||
registerName String
|
||||
registerDate DateTime
|
||||
authorizedCapital String
|
||||
code String
|
||||
|
||||
address String
|
||||
addressEN String
|
||||
// NOTE: About (Natural Person)
|
||||
citizenId String?
|
||||
// NOTE: About (Legal Entity)
|
||||
legalPersonNo String?
|
||||
registerName String?
|
||||
registerNameEN String?
|
||||
registerDate DateTime?
|
||||
authorizedCapital String?
|
||||
|
||||
workplace String
|
||||
workplaceEN String
|
||||
address String
|
||||
addressEN String
|
||||
|
||||
province Province? @relation(fields: [provinceId], references: [id], onDelete: SetNull)
|
||||
provinceId String?
|
||||
|
|
@ -458,14 +462,12 @@ model CustomerBranch {
|
|||
subDistrict SubDistrict? @relation(fields: [subDistrictId], references: [id], onDelete: SetNull)
|
||||
subDistrictId String?
|
||||
|
||||
zipCode String
|
||||
|
||||
email String
|
||||
telephoneNo String
|
||||
|
||||
employmentOffice String
|
||||
bussinessType String
|
||||
bussinessTypeEN String
|
||||
businessType String
|
||||
businessTypeEN String
|
||||
jobPosition String
|
||||
jobPositionEN String
|
||||
jobDescription String
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue