Merge branch 'feat/branch-endpoints' into dev

This commit is contained in:
Methapon2001 2024-04-02 11:54:24 +07:00
commit 4e9b8dbb83
2 changed files with 225 additions and 8 deletions

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())