This commit is contained in:
Dobromir Popov
2024-03-26 01:08:57 +02:00
parent 3fcdfc1347
commit acd776e988
37 changed files with 143 additions and 107 deletions

View File

@ -81,13 +81,21 @@ enum PublisherType {
SpecialPioneer_Missionary
}
enum ReportType {
ServiceReport
Experience
Feedback_Problem
Feedback_Suggestion
Feedback
}
model Publisher {
id String @id @default(cuid())
firstName String
lastName String
email String @unique
phone String?
isactive Boolean @default(true)
isActive Boolean @default(true)
isImported Boolean @default(false)
isTrained Boolean @default(false)
age Int?
@ -124,7 +132,7 @@ model Availability {
weekOfMonth Int?
startTime DateTime
endTime DateTime
isactive Boolean @default(true)
isActive Boolean @default(true)
type AvailabilityType @default(Weekly)
isWithTransportIn Boolean @default(false)
isWithTransportOut Boolean @default(false)
@ -143,7 +151,7 @@ model CartEvent {
shiftDuration Int
shifts Shift[]
dayofweek DayOfWeek
isactive Boolean @default(true)
isActive Boolean @default(true)
location Location @relation(fields: [locationId], references: [id])
locationId Int
eventType EventType @default(PW_Cart)
@ -160,7 +168,7 @@ model Shift {
name String
startTime DateTime
endTime DateTime
isactive Boolean @default(true)
isActive Boolean @default(true)
requiresTransport Boolean @default(false)
notes String?
//date DateTime
@ -177,7 +185,7 @@ model Assignment {
shiftId Int
publisher Publisher @relation(fields: [publisherId], references: [id], onDelete: Cascade)
publisherId String
isTentative Boolean @default(false) // if no availability for it, when importing previous schedules
isBySystem Boolean @default(false) // if no availability for it, when importing previous schedules
isConfirmed Boolean @default(false)
isWithTransport Boolean @default(false)
isMailSent Boolean @default(false)
@ -190,7 +198,7 @@ model Location {
id Int @id @default(autoincrement())
name String
address String
isactive Boolean @default(true)
isActive Boolean @default(true)
content String? @db.LongText
cartEvents CartEvent[]
reports Report[]
@ -219,7 +227,8 @@ model Report {
returnVisitInfoCount Int?
conversationCount Int?
experienceInfo String? @db.LongText
experienceInfo String? @db.LongText
type ReportType @default(ServiceReport)
@@map("Report")
}