SchémasPromotion

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

ChampTypeContraintesDescription
promoIdtextPKIdentifiant libre (ex. p1-2024)
nametextNOT NULL, UNIQUENom affiché
isArchivedbooleanNOT NULL, default falseVrai si la promotion est archivée
archivedAttimestampnullableDate d’archivage
archivedReasontextnullableJustification de l’archivage

Index

  • promotions_is_archived_idx sur is_archived
  • unique_promo_name (unique) sur name

DTO

CreatePromotionDTO

{
  promoId: string;
  name: string;
}

ArchivePromotionDTO

{
  reason: string;
}

Endpoints liés