feat(P16C-1,P16C-3): 完成供应商主数据后端与种子
这个提交包含在:
@@ -409,6 +409,7 @@ model LegalEntity {
|
||||
cost_centers CostCenter[]
|
||||
employees Employee[]
|
||||
holiday_calendars HolidayCalendar[] @relation("HolidayCalendarLegalEntity")
|
||||
suppliers Supplier[]
|
||||
|
||||
@@index([enabled, archived_at], map: "idx_legal_entities_status")
|
||||
@@index([default_holiday_calendar_id], map: "idx_legal_entities_default_calendar")
|
||||
@@ -505,6 +506,31 @@ model HolidayCalendarDay {
|
||||
@@map("holiday_calendar_days")
|
||||
}
|
||||
|
||||
model Supplier {
|
||||
id String @id @default(uuid()) @db.Uuid
|
||||
code String @unique
|
||||
name String
|
||||
short_name String?
|
||||
tax_no String?
|
||||
contact_name String?
|
||||
contact_phone String?
|
||||
payment_terms String?
|
||||
legal_entity_id String? @db.Uuid
|
||||
enabled Boolean @default(true)
|
||||
archived_at DateTime?
|
||||
|
||||
created_at DateTime @default(now())
|
||||
created_by String? @db.Uuid
|
||||
updated_at DateTime @updatedAt
|
||||
updated_by String? @db.Uuid
|
||||
|
||||
legal_entity LegalEntity? @relation(fields: [legal_entity_id], references: [id], onDelete: SetNull)
|
||||
|
||||
@@index([legal_entity_id, enabled, archived_at], map: "idx_suppliers_legal_entity_status")
|
||||
@@index([name], map: "idx_suppliers_name")
|
||||
@@map("suppliers")
|
||||
}
|
||||
|
||||
model ReimbursementForm {
|
||||
id String @id @default(uuid()) @db.Uuid
|
||||
form_number String? @unique
|
||||
|
||||
在新工单中引用
屏蔽一个用户