feat: change uuid to cuid
This commit is contained in:
parent
3d3bc38106
commit
4341e57bef
1 changed files with 31 additions and 31 deletions
|
|
@ -13,7 +13,7 @@ datasource db {
|
||||||
}
|
}
|
||||||
|
|
||||||
model Menu {
|
model Menu {
|
||||||
id String @id @default(uuid())
|
id String @id @default(cuid())
|
||||||
|
|
||||||
caption String
|
caption String
|
||||||
captionEN String
|
captionEN String
|
||||||
|
|
@ -35,7 +35,7 @@ model Menu {
|
||||||
}
|
}
|
||||||
|
|
||||||
model RoleMenuPermission {
|
model RoleMenuPermission {
|
||||||
id String @id @default(uuid())
|
id String @id @default(cuid())
|
||||||
|
|
||||||
userRole String
|
userRole String
|
||||||
permission String
|
permission String
|
||||||
|
|
@ -50,7 +50,7 @@ model RoleMenuPermission {
|
||||||
}
|
}
|
||||||
|
|
||||||
model UserMenuPermission {
|
model UserMenuPermission {
|
||||||
id String @id @default(uuid())
|
id String @id @default(cuid())
|
||||||
|
|
||||||
permission String
|
permission String
|
||||||
|
|
||||||
|
|
@ -67,7 +67,7 @@ model UserMenuPermission {
|
||||||
}
|
}
|
||||||
|
|
||||||
model MenuComponent {
|
model MenuComponent {
|
||||||
id String @id @default(uuid())
|
id String @id @default(cuid())
|
||||||
|
|
||||||
componentId String
|
componentId String
|
||||||
componentTag String
|
componentTag String
|
||||||
|
|
@ -84,7 +84,7 @@ model MenuComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
model RoleMenuComponentPermission {
|
model RoleMenuComponentPermission {
|
||||||
id String @id @default(uuid())
|
id String @id @default(cuid())
|
||||||
|
|
||||||
userRole String
|
userRole String
|
||||||
permission String
|
permission String
|
||||||
|
|
@ -104,7 +104,7 @@ model RunningNo {
|
||||||
}
|
}
|
||||||
|
|
||||||
model UserMenuComponentPermission {
|
model UserMenuComponentPermission {
|
||||||
id String @id @default(uuid())
|
id String @id @default(cuid())
|
||||||
|
|
||||||
userId String
|
userId String
|
||||||
user User @relation(fields: [userId], references: [id])
|
user User @relation(fields: [userId], references: [id])
|
||||||
|
|
@ -121,7 +121,7 @@ model UserMenuComponentPermission {
|
||||||
}
|
}
|
||||||
|
|
||||||
model Province {
|
model Province {
|
||||||
id String @id @default(uuid())
|
id String @id @default(cuid())
|
||||||
name String
|
name String
|
||||||
nameEN String
|
nameEN String
|
||||||
|
|
||||||
|
|
@ -139,7 +139,7 @@ model Province {
|
||||||
}
|
}
|
||||||
|
|
||||||
model District {
|
model District {
|
||||||
id String @id @default(uuid())
|
id String @id @default(cuid())
|
||||||
name String
|
name String
|
||||||
nameEN String
|
nameEN String
|
||||||
|
|
||||||
|
|
@ -159,7 +159,7 @@ model District {
|
||||||
}
|
}
|
||||||
|
|
||||||
model SubDistrict {
|
model SubDistrict {
|
||||||
id String @id @default(uuid())
|
id String @id @default(cuid())
|
||||||
name String
|
name String
|
||||||
nameEN String
|
nameEN String
|
||||||
zipCode String
|
zipCode String
|
||||||
|
|
@ -185,7 +185,7 @@ enum Status {
|
||||||
}
|
}
|
||||||
|
|
||||||
model Branch {
|
model Branch {
|
||||||
id String @id @default(uuid())
|
id String @id @default(cuid())
|
||||||
code String
|
code String
|
||||||
taxNo String
|
taxNo String
|
||||||
name String
|
name String
|
||||||
|
|
@ -239,7 +239,7 @@ model Branch {
|
||||||
}
|
}
|
||||||
|
|
||||||
model BranchBank {
|
model BranchBank {
|
||||||
id String @id @default(uuid())
|
id String @id @default(cuid())
|
||||||
bankName String
|
bankName String
|
||||||
bankBranch String
|
bankBranch String
|
||||||
accountName String
|
accountName String
|
||||||
|
|
@ -252,7 +252,7 @@ model BranchBank {
|
||||||
}
|
}
|
||||||
|
|
||||||
model BranchContact {
|
model BranchContact {
|
||||||
id String @id @default(uuid())
|
id String @id @default(cuid())
|
||||||
telephoneNo String
|
telephoneNo String
|
||||||
|
|
||||||
branch Branch @relation(fields: [branchId], references: [id], onDelete: Cascade)
|
branch Branch @relation(fields: [branchId], references: [id], onDelete: Cascade)
|
||||||
|
|
@ -267,7 +267,7 @@ model BranchContact {
|
||||||
}
|
}
|
||||||
|
|
||||||
model BranchUser {
|
model BranchUser {
|
||||||
id String @id @default(uuid())
|
id String @id @default(cuid())
|
||||||
|
|
||||||
branch Branch @relation(fields: [branchId], references: [id], onDelete: Cascade)
|
branch Branch @relation(fields: [branchId], references: [id], onDelete: Cascade)
|
||||||
branchId String
|
branchId String
|
||||||
|
|
@ -291,7 +291,7 @@ enum UserType {
|
||||||
}
|
}
|
||||||
|
|
||||||
model User {
|
model User {
|
||||||
id String @id @default(uuid())
|
id String @id @default(cuid())
|
||||||
|
|
||||||
code String?
|
code String?
|
||||||
namePrefix String?
|
namePrefix String?
|
||||||
|
|
@ -403,7 +403,7 @@ enum CustomerType {
|
||||||
}
|
}
|
||||||
|
|
||||||
model Customer {
|
model Customer {
|
||||||
id String @id @default(uuid())
|
id String @id @default(cuid())
|
||||||
|
|
||||||
customerType CustomerType
|
customerType CustomerType
|
||||||
|
|
||||||
|
|
@ -433,7 +433,7 @@ model Customer {
|
||||||
}
|
}
|
||||||
|
|
||||||
model CustomerBranch {
|
model CustomerBranch {
|
||||||
id String @id @default(uuid())
|
id String @id @default(cuid())
|
||||||
customer Customer @relation(fields: [customerId], references: [id], onDelete: Cascade)
|
customer Customer @relation(fields: [customerId], references: [id], onDelete: Cascade)
|
||||||
customerId String
|
customerId String
|
||||||
|
|
||||||
|
|
@ -492,7 +492,7 @@ model CustomerBranch {
|
||||||
}
|
}
|
||||||
|
|
||||||
model Employee {
|
model Employee {
|
||||||
id String @id @default(uuid())
|
id String @id @default(cuid())
|
||||||
|
|
||||||
code String
|
code String
|
||||||
nrcNo String?
|
nrcNo String?
|
||||||
|
|
@ -561,7 +561,7 @@ model Employee {
|
||||||
}
|
}
|
||||||
|
|
||||||
model EmployeeHistory {
|
model EmployeeHistory {
|
||||||
id String @id @default(uuid())
|
id String @id @default(cuid())
|
||||||
field String
|
field String
|
||||||
valueBefore Json
|
valueBefore Json
|
||||||
valueAfter Json
|
valueAfter Json
|
||||||
|
|
@ -575,7 +575,7 @@ model EmployeeHistory {
|
||||||
}
|
}
|
||||||
|
|
||||||
model EmployeeCheckup {
|
model EmployeeCheckup {
|
||||||
id String @id @default(uuid())
|
id String @id @default(cuid())
|
||||||
|
|
||||||
employee Employee @relation(fields: [employeeId], references: [id], onDelete: Cascade)
|
employee Employee @relation(fields: [employeeId], references: [id], onDelete: Cascade)
|
||||||
employeeId String
|
employeeId String
|
||||||
|
|
@ -602,7 +602,7 @@ model EmployeeCheckup {
|
||||||
}
|
}
|
||||||
|
|
||||||
model EmployeeWork {
|
model EmployeeWork {
|
||||||
id String @id @default(uuid())
|
id String @id @default(cuid())
|
||||||
|
|
||||||
employee Employee @relation(fields: [employeeId], references: [id], onDelete: Cascade)
|
employee Employee @relation(fields: [employeeId], references: [id], onDelete: Cascade)
|
||||||
employeeId String
|
employeeId String
|
||||||
|
|
@ -626,7 +626,7 @@ model EmployeeWork {
|
||||||
}
|
}
|
||||||
|
|
||||||
model EmployeeOtherInfo {
|
model EmployeeOtherInfo {
|
||||||
id String @id @default(uuid())
|
id String @id @default(cuid())
|
||||||
|
|
||||||
employee Employee @relation(fields: [employeeId], references: [id], onDelete: Cascade)
|
employee Employee @relation(fields: [employeeId], references: [id], onDelete: Cascade)
|
||||||
employeeId String @unique
|
employeeId String @unique
|
||||||
|
|
@ -653,7 +653,7 @@ model EmployeeOtherInfo {
|
||||||
}
|
}
|
||||||
|
|
||||||
model ProductGroup {
|
model ProductGroup {
|
||||||
id String @id @default(uuid())
|
id String @id @default(cuid())
|
||||||
|
|
||||||
code String
|
code String
|
||||||
name String
|
name String
|
||||||
|
|
@ -674,7 +674,7 @@ model ProductGroup {
|
||||||
}
|
}
|
||||||
|
|
||||||
model ProductType {
|
model ProductType {
|
||||||
id String @id @default(uuid())
|
id String @id @default(cuid())
|
||||||
|
|
||||||
code String
|
code String
|
||||||
name String
|
name String
|
||||||
|
|
@ -699,7 +699,7 @@ model ProductType {
|
||||||
}
|
}
|
||||||
|
|
||||||
model Product {
|
model Product {
|
||||||
id String @id @default(uuid())
|
id String @id @default(cuid())
|
||||||
|
|
||||||
code String
|
code String
|
||||||
name String
|
name String
|
||||||
|
|
@ -732,7 +732,7 @@ model Product {
|
||||||
}
|
}
|
||||||
|
|
||||||
model Service {
|
model Service {
|
||||||
id String @id @default(uuid())
|
id String @id @default(cuid())
|
||||||
|
|
||||||
code String
|
code String
|
||||||
name String
|
name String
|
||||||
|
|
@ -760,7 +760,7 @@ model Service {
|
||||||
}
|
}
|
||||||
|
|
||||||
model Work {
|
model Work {
|
||||||
id String @id @default(uuid())
|
id String @id @default(cuid())
|
||||||
|
|
||||||
order Int
|
order Int
|
||||||
name String
|
name String
|
||||||
|
|
@ -807,7 +807,7 @@ enum PayCondition {
|
||||||
}
|
}
|
||||||
|
|
||||||
model Quotation {
|
model Quotation {
|
||||||
id String @id @default(uuid())
|
id String @id @default(cuid())
|
||||||
|
|
||||||
customerId String
|
customerId String
|
||||||
customer Customer @relation(fields: [customerId], references: [id])
|
customer Customer @relation(fields: [customerId], references: [id])
|
||||||
|
|
@ -849,7 +849,7 @@ model Quotation {
|
||||||
}
|
}
|
||||||
|
|
||||||
model QuotationPaySplit {
|
model QuotationPaySplit {
|
||||||
id String @id @default(uuid())
|
id String @id @default(cuid())
|
||||||
|
|
||||||
no Int
|
no Int
|
||||||
date DateTime @db.Date
|
date DateTime @db.Date
|
||||||
|
|
@ -859,7 +859,7 @@ model QuotationPaySplit {
|
||||||
}
|
}
|
||||||
|
|
||||||
model QuotationWorker {
|
model QuotationWorker {
|
||||||
id String @id @default(uuid())
|
id String @id @default(cuid())
|
||||||
|
|
||||||
no Int
|
no Int
|
||||||
code String
|
code String
|
||||||
|
|
@ -870,7 +870,7 @@ model QuotationWorker {
|
||||||
}
|
}
|
||||||
|
|
||||||
model QuotationService {
|
model QuotationService {
|
||||||
id String @id @default(uuid())
|
id String @id @default(cuid())
|
||||||
|
|
||||||
code String
|
code String
|
||||||
name String
|
name String
|
||||||
|
|
@ -887,7 +887,7 @@ model QuotationService {
|
||||||
}
|
}
|
||||||
|
|
||||||
model QuotationServiceWork {
|
model QuotationServiceWork {
|
||||||
id String @id @default(uuid())
|
id String @id @default(cuid())
|
||||||
|
|
||||||
order Int
|
order Int
|
||||||
name String
|
name String
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue