added vendor to schema, have not migrated
This commit is contained in:
2
prisma/migrations/20260123161845_migrate/migration.sql
Normal file
2
prisma/migrations/20260123161845_migrate/migration.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE "Venue" ADD COLUMN "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP;
|
||||
@@ -141,3 +141,87 @@ model FileUpload {
|
||||
|
||||
@@unique([filename, uploadedById])
|
||||
}
|
||||
|
||||
model Vendor {
|
||||
id String @id @default(cuid())
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
name String
|
||||
type VendorType
|
||||
description String?
|
||||
website String?
|
||||
|
||||
contactPerson String?
|
||||
email String?
|
||||
phone String?
|
||||
address Address @relation(fields: [addressId], references: [id])
|
||||
addressId String
|
||||
|
||||
status VendorStatus @default(CONTACTING)
|
||||
isBooked Boolean @default(false)
|
||||
bookedDate DateTime?
|
||||
|
||||
quotedPrice Float?
|
||||
finalCost Float?
|
||||
depositPaid Float?
|
||||
depositDueDate DateTime?
|
||||
finalPaymentDue DateTime?
|
||||
paymentNotes String?
|
||||
|
||||
contactUrl String?
|
||||
proposalUrl String?
|
||||
notes String?
|
||||
|
||||
events Event[]
|
||||
|
||||
categories Category[]
|
||||
}
|
||||
|
||||
model Address {
|
||||
id String @id @default(cuid())
|
||||
street String
|
||||
city String
|
||||
state String
|
||||
zip Int
|
||||
Vendor Vendor[]
|
||||
}
|
||||
|
||||
model Category {
|
||||
id String @id @default(cuid())
|
||||
name String @unique
|
||||
description String?
|
||||
color String? @default("#3B82F6") // For UI purposes
|
||||
vendors Vendor[]
|
||||
}
|
||||
|
||||
enum VendorType {
|
||||
VENUE
|
||||
CATERER
|
||||
PHOTOGRAPHER
|
||||
VIDEOGRAPHER
|
||||
FLORIST
|
||||
BAKERY
|
||||
DJ
|
||||
BAND
|
||||
OFFICIANT
|
||||
HAIR_MAKEUP
|
||||
TRANSPORTATION
|
||||
RENTALS
|
||||
DECOR
|
||||
PLANNER
|
||||
STATIONERY
|
||||
OTHER
|
||||
}
|
||||
|
||||
enum VendorStatus {
|
||||
RESEARCHING // Just found them
|
||||
CONTACTING // Reached out but no response yet
|
||||
RESPONDED // They responded
|
||||
PROPOSAL_RECEIVED // Got their quote/proposal
|
||||
NEGOTIATING // Discussing terms/price
|
||||
CONTRACT_SENT // Sent contract for review
|
||||
CONTRACT_SIGNED // Officially booked!
|
||||
DECLINED // Not using them
|
||||
BACKUP // Keeping as backup option
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user