feat: add stock keeping units management
- Created migration to drop `type` column from `stock_keeping_units` table. - Added `Guild` model to Prisma schema. - Implemented `BusinessActivitiesQueryService` for querying business activities. - Developed `GoodsSharedService` for handling goods creation and updates. - Introduced DTOs for creating and updating stock keeping units. - Created controller and service for managing stock keeping units. - Implemented response DTOs for stock keeping units service. - Established module for stock keeping units management.
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
model Guild {
|
||||
id String @id @default(ulid())
|
||||
name String
|
||||
invoice_template InvoiceTemplateType
|
||||
code String?
|
||||
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
updated_at DateTime @updatedAt() @db.Timestamp(0)
|
||||
|
||||
business_activities BusinessActivity[]
|
||||
good_categories GoodCategory[]
|
||||
stockKeepingUnits StockKeepingUnits[]
|
||||
|
||||
@@map("guilds")
|
||||
}
|
||||
@@ -1,11 +1,13 @@
|
||||
model StockKeepingUnits {
|
||||
id String @id @default(ulid())
|
||||
code String @unique
|
||||
id String @id @default(ulid())
|
||||
code String @unique
|
||||
name String
|
||||
VAT Decimal @db.Decimal(5, 2)
|
||||
type SKUGuildType
|
||||
is_public Boolean @default(true)
|
||||
is_domestic Boolean @default(false)
|
||||
VAT Decimal @db.Decimal(5, 2)
|
||||
is_public Boolean @default(true)
|
||||
is_domestic Boolean @default(false)
|
||||
|
||||
guild_id String
|
||||
guild Guild @relation(fields: [guild_id], references: [id])
|
||||
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
updated_at DateTime @updatedAt() @db.Timestamp(0)
|
||||
|
||||
Reference in New Issue
Block a user