init
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
model Service {
|
||||
id Int @id @default(autoincrement())
|
||||
name String @db.VarChar(255)
|
||||
description String? @db.Text
|
||||
sku String @unique() @db.VarChar(100)
|
||||
barcode String? @unique() @db.VarChar(100)
|
||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
||||
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
||||
deletedAt DateTime? @db.Timestamp(0)
|
||||
categoryId Int?
|
||||
baseSalePrice Decimal @default(0.00) @db.Decimal(15, 0)
|
||||
category ServiceCategory? @relation(fields: [categoryId], references: [id])
|
||||
salesInvoiceItems SalesInvoiceItem[]
|
||||
|
||||
@@index([categoryId])
|
||||
@@map("Services")
|
||||
}
|
||||
|
||||
model ServiceCategory {
|
||||
id Int @id @default(autoincrement())
|
||||
name String @db.VarChar(100)
|
||||
description String? @db.Text
|
||||
imageUrl String? @db.VarChar(255)
|
||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
||||
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
||||
deletedAt DateTime? @db.Timestamp(0)
|
||||
services Service[]
|
||||
|
||||
@@map("Service_categories")
|
||||
}
|
||||
Reference in New Issue
Block a user