Added Participation Page
This commit is contained in:
BIN
prisma/dev.db
BIN
prisma/dev.db
Binary file not shown.
@@ -72,7 +72,7 @@ model Chauffeur {
|
||||
status String @default("Disponible") // Disponible, Vacances, Arrêt Maladie
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
trajets Trajet[] // Relation avec les trajets
|
||||
trajets Trajet[]
|
||||
}
|
||||
|
||||
model UniversPro {
|
||||
@@ -85,6 +85,7 @@ model UniversPro {
|
||||
nomEntreprise String
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
trajets Trajet[]
|
||||
}
|
||||
|
||||
model Adherent {
|
||||
@@ -105,7 +106,8 @@ model Adherent {
|
||||
instructions String? // Instructions
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
trajets Trajet[] // Relation avec les trajets
|
||||
trajets Trajet[]
|
||||
participations ParticipationFinanciere[]
|
||||
}
|
||||
|
||||
model Trajet {
|
||||
@@ -121,6 +123,26 @@ model Trajet {
|
||||
adherent Adherent @relation(fields: [adherentId], references: [id])
|
||||
chauffeurId String? // Référence au chauffeur (optionnel)
|
||||
chauffeur Chauffeur? @relation(fields: [chauffeurId], references: [id])
|
||||
universProId String? // Référence à l'univers pro (optionnel - pour facturation entreprise)
|
||||
universPro UniversPro? @relation(fields: [universProId], references: [id], onDelete: SetNull)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
participations ParticipationFinanciere[]
|
||||
}
|
||||
|
||||
model ParticipationFinanciere {
|
||||
id String @id @default(cuid())
|
||||
trajetId String @unique
|
||||
trajet Trajet @relation(fields: [trajetId], references: [id], onDelete: Cascade)
|
||||
adherentId String
|
||||
adherent Adherent @relation(fields: [adherentId], references: [id], onDelete: Cascade)
|
||||
destinataireEmail String // Email du destinataire du paiement (adhérent ou univers pro)
|
||||
destinataireNom String // Nom affiché du destinataire
|
||||
destinataireType String // "adherent" | "univers_pro"
|
||||
montant Float? // Montant de la participation (optionnel)
|
||||
filePath String? // Chemin vers le PDF généré
|
||||
complement String? // Informations complémentaires (éditable)
|
||||
statut String @default("en_attente") // en_attente, envoye, paye, archive
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user