Promotion
Représente une promotion (ex. Promotion 1 — 2024). Stockée dans la table
promotions (Drizzle / Postgres).
Source :
src/db/schema/promotion.schema.ts,src/services/dto/promotion.dto.ts.
Schéma
| Champ | Type | Contraintes | Description |
|---|---|---|---|
promoId | text | PK | Identifiant libre (ex. p1-2024) |
name | text | NOT NULL, UNIQUE | Nom affiché |
isArchived | boolean | NOT NULL, default false | Vrai si la promotion est archivée |
archivedAt | timestamp | nullable | Date d’archivage |
archivedReason | text | nullable | Justification de l’archivage |
Index
promotions_is_archived_idxsuris_archivedunique_promo_name(unique) surname
DTO
CreatePromotionDTO
{
promoId: string;
name: string;
}ArchivePromotionDTO
{
reason: string;
}Endpoints liés
GET /api/v1/promotions— promotions actives.