Rollback to 29b35fce
This commit is contained in:
@@ -520,58 +520,3 @@ export const logsNotifications = mysqlTable("logsNotifications", {
|
||||
|
||||
export type LogNotification = typeof logsNotifications.$inferSelect;
|
||||
export type InsertLogNotification = typeof logsNotifications.$inferInsert;
|
||||
|
||||
/**
|
||||
* Table des attestations de formation
|
||||
* Stocke les attestations générées pour chaque apprenant ayant terminé une formation
|
||||
*/
|
||||
export const attestations = mysqlTable("attestations", {
|
||||
id: int("id").autoincrement().primaryKey(),
|
||||
/** ID de l'inscription concernée */
|
||||
inscriptionId: int("inscriptionId").notNull(),
|
||||
/** ID de l'apprenant */
|
||||
apprenantId: int("apprenantId").notNull(),
|
||||
/** ID de la séquence */
|
||||
sequenceId: int("sequenceId").notNull(),
|
||||
/** Clé S3 du PDF généré */
|
||||
s3Key: varchar("s3Key", { length: 500 }).notNull(),
|
||||
/** URL publique du PDF */
|
||||
pdfUrl: varchar("pdfUrl", { length: 1000 }).notNull(),
|
||||
/** Date de génération de l'attestation */
|
||||
dateGeneration: timestamp("dateGeneration").defaultNow().notNull(),
|
||||
/** Statut de l'envoi par email */
|
||||
emailEnvoye: boolean("emailEnvoye").default(false).notNull(),
|
||||
/** Date d'envoi de l'email */
|
||||
dateEnvoiEmail: timestamp("dateEnvoiEmail"),
|
||||
createdAt: timestamp("createdAt").defaultNow().notNull(),
|
||||
});
|
||||
|
||||
export type Attestation = typeof attestations.$inferSelect;
|
||||
export type InsertAttestation = typeof attestations.$inferInsert;
|
||||
|
||||
/**
|
||||
* Table de configuration des attestations
|
||||
* Stocke le logo, la signature et le template personnalisable
|
||||
*/
|
||||
export const configAttestation = mysqlTable("configAttestation", {
|
||||
id: int("id").autoincrement().primaryKey(),
|
||||
/** Clé S3 du logo */
|
||||
logoS3Key: varchar("logoS3Key", { length: 500 }),
|
||||
/** URL du logo */
|
||||
logoUrl: varchar("logoUrl", { length: 1000 }),
|
||||
/** Clé S3 de la signature */
|
||||
signatureS3Key: varchar("signatureS3Key", { length: 500 }),
|
||||
/** URL de la signature */
|
||||
signatureUrl: varchar("signatureUrl", { length: 1000 }),
|
||||
/** Nom du signataire */
|
||||
nomSignataire: varchar("nomSignataire", { length: 255 }),
|
||||
/** Fonction du signataire */
|
||||
fonctionSignataire: varchar("fonctionSignataire", { length: 255 }),
|
||||
/** Texte personnalisable de l'attestation */
|
||||
texteAttestation: text("texteAttestation"),
|
||||
createdAt: timestamp("createdAt").defaultNow().notNull(),
|
||||
updatedAt: timestamp("updatedAt").defaultNow().onUpdateNow().notNull(),
|
||||
});
|
||||
|
||||
export type ConfigAttestation = typeof configAttestation.$inferSelect;
|
||||
export type InsertConfigAttestation = typeof configAttestation.$inferInsert;
|
||||
|
||||
Reference in New Issue
Block a user