update migrations and create base migration. set discount and tax to sale invoices

This commit is contained in:
2026-05-28 16:39:07 +03:30
parent cd3492d625
commit a975f9d02a
55 changed files with 2152 additions and 2278 deletions
+15 -17
View File
@@ -1,20 +1,19 @@
model Service {
id String @id @default(ulid())
name String @db.VarChar(255)
description String? @db.Text
sku String @unique() @db.VarChar(100)
local_sku String? @unique() @db.VarChar(100)
barcode String? @unique() @db.VarChar(100)
created_at DateTime @default(now()) @db.Timestamp(0)
updated_at DateTime @updatedAt @db.Timestamp(0)
deleted_at DateTime? @db.Timestamp(0)
category_id String?
base_sale_price Decimal @default(0.00) @db.Decimal(15, 0)
account_id String
complex_id String
category ServiceCategory? @relation(fields: [category_id], references: [id])
id String @id @default(ulid())
name String @db.VarChar(255)
description String? @db.Text
sku String @unique @db.VarChar(100)
local_sku String? @unique @db.VarChar(100)
barcode String? @unique @db.VarChar(100)
created_at DateTime @default(now()) @db.Timestamp(0)
updated_at DateTime @updatedAt @db.Timestamp(0)
deleted_at DateTime? @db.Timestamp(0)
category_id String?
base_sale_price Decimal @default(0) @db.Decimal(15, 0)
account_id String
complex_id String
sales_invoice_items SalesInvoiceItem[]
category ServiceCategory? @relation(fields: [category_id], references: [id])
@@index([category_id])
@@map("services")
@@ -30,8 +29,7 @@ model ServiceCategory {
created_at DateTime @default(now()) @db.Timestamp(0)
updated_at DateTime @updatedAt @db.Timestamp(0)
deleted_at DateTime? @db.Timestamp(0)
services Service[]
services Service[]
@@map("service_categories")
}