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