feat: add Vendor Prisma model + migration
This commit is contained in:
@@ -122,6 +122,28 @@ model License {
|
||||
@@map("licenses")
|
||||
}
|
||||
|
||||
// Purchasing counterparty — see docs/asset-license-management.md's "## Vendor
|
||||
// (chốt 2026-08-02)". Deliberately independent of AssetModel.manufacturer
|
||||
// (OEM, e.g. "Dell") — Vendor is the reseller/distributor actually bought
|
||||
// from (e.g. "FPT Trading"), a different concept that isn't always the same
|
||||
// company. No FKs on this entity yet: it's the starting point for later
|
||||
// FKs from PurchaseOrder/License (License.vendor string -> License.vendorId
|
||||
// FK retrofit is noted in the doc as a separate follow-up, not done here).
|
||||
// taxCode/notes are nullable — not every vendor record has a known VN tax
|
||||
// code or extra notes at creation time.
|
||||
model Vendor {
|
||||
id String @id @default(uuid()) @db.Uuid
|
||||
name String
|
||||
contactEmail String @map("contact_email")
|
||||
contactPhone String @map("contact_phone")
|
||||
address String
|
||||
taxCode String? @map("tax_code")
|
||||
notes String?
|
||||
createdAt DateTime @default(now()) @map("created_at") @db.Timestamptz(6)
|
||||
|
||||
@@map("vendors")
|
||||
}
|
||||
|
||||
// Minimal internal auth accounts — NOT company SSO (deliberately ruled out,
|
||||
// see CLAUDE.md / auth decision notes). A handful of trusted IT staff
|
||||
// accounts, created by hand via scripts/create-user.ts, no self-registration.
|
||||
|
||||
Reference in New Issue
Block a user