feat: update database field

This commit is contained in:
Methapon2001 2024-04-02 10:48:35 +07:00
parent 95463dfe7c
commit a39b9de423

View file

@ -65,6 +65,11 @@ model SubDistrict {
employee Employee[]
}
enum Status {
CREATED
USED
}
model Branch {
id String @id @default(uuid())
code String
@ -96,7 +101,7 @@ model Branch {
headOffice Branch? @relation(name: "HeadOfficeRelation", fields: [headOfficeId], references: [id])
headOfficeId String?
status String?
status Status @default(CREATED)
createdBy String?
createdAt DateTime @default(now())
@ -109,10 +114,9 @@ model Branch {
}
model BranchContact {
id String @id @default(uuid())
telephoneNo String
lineId String
qrCodeImageUrl String?
id String @id @default(uuid())
telephoneNo String
lineId String
branch Branch @relation(fields: [branchId], references: [id], onDelete: Cascade)
branchId String
@ -141,6 +145,8 @@ model BranchUser {
model User {
id String @id @default(uuid())
keycloakId String
code String
firstNameTH String
firstNameEN String
@ -169,8 +175,6 @@ model User {
startDate DateTime
retireDate DateTime
profileImageUrl String?
userType String
userRole String
@ -185,7 +189,7 @@ model User {
trainingPlace String
status String?
status Status @default(CREATED)
createdBy String?
createdAt DateTime @default(now())
@ -368,11 +372,10 @@ model EmployeeOtherInfo {
model Service {
id String @id @default(uuid())
code String
name String
detail String
imageUrl String
status String?
code String
name String
detail String
status String?
createdBy String?
createdAt DateTime @default(now())