refactor: update schema and migration

This commit is contained in:
Methapon2001 2024-04-04 15:27:57 +07:00
parent 86efb84cea
commit fff5558701
2 changed files with 7 additions and 7 deletions

View file

@ -141,7 +141,7 @@ CREATE TABLE "Customer" (
"id" TEXT NOT NULL, "id" TEXT NOT NULL,
"code" TEXT NOT NULL, "code" TEXT NOT NULL,
"customerType" TEXT NOT NULL, "customerType" TEXT NOT NULL,
"customerNameTH" TEXT NOT NULL, "customerName" TEXT NOT NULL,
"customerNameEN" TEXT NOT NULL, "customerNameEN" TEXT NOT NULL,
"imageUrl" TEXT, "imageUrl" TEXT,
"status" "Status" NOT NULL DEFAULT 'CREATED', "status" "Status" NOT NULL DEFAULT 'CREATED',
@ -186,7 +186,7 @@ CREATE TABLE "CustomerBranch" (
CREATE TABLE "Employee" ( CREATE TABLE "Employee" (
"id" TEXT NOT NULL, "id" TEXT NOT NULL,
"code" TEXT NOT NULL, "code" TEXT NOT NULL,
"fullNameTH" TEXT NOT NULL, "fullName" TEXT NOT NULL,
"fullNameEN" TEXT NOT NULL, "fullNameEN" TEXT NOT NULL,
"dateOfBirth" TIMESTAMP(3) NOT NULL, "dateOfBirth" TIMESTAMP(3) NOT NULL,
"gender" TEXT NOT NULL, "gender" TEXT NOT NULL,

View file

@ -76,7 +76,7 @@ model Branch {
taxNo String taxNo String
name String name String
nameEN String nameEN String
address String address String
addressEN String addressEN String
province Province? @relation(fields: [provinceId], references: [id], onDelete: SetNull) province Province? @relation(fields: [provinceId], references: [id], onDelete: SetNull)
@ -153,7 +153,7 @@ model User {
lastName String lastName String
lastNameEN String lastNameEN String
address String address String
addressEN String addressEN String
province Province? @relation(fields: [provinceId], references: [id], onDelete: SetNull) province Province? @relation(fields: [provinceId], references: [id], onDelete: SetNull)
@ -203,7 +203,7 @@ model Customer {
id String @id @default(uuid()) id String @id @default(uuid())
code String code String
customerType String customerType String
customerNameTH String customerName String
customerNameEN String customerNameEN String
imageUrl String? imageUrl String?
@ -264,13 +264,13 @@ model Employee {
id String @id @default(uuid()) id String @id @default(uuid())
code String code String
fullNameTH String fullName String
fullNameEN String fullNameEN String
dateOfBirth DateTime dateOfBirth DateTime
gender String gender String
nationality String nationality String
address String address String
addressEN String addressEN String
province Province? @relation(fields: [provinceId], references: [id], onDelete: SetNull) province Province? @relation(fields: [provinceId], references: [id], onDelete: SetNull)