feat(P16C-1,P16C-3): 完成供应商主数据后端与种子

这个提交包含在:
2026-03-07 17:39:49 +08:00
父节点 195f46a2e3
当前提交 aafa911ee7
共修改 6 个文件,包含 645 行新增和 0 行删除
+26
查看文件
@@ -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