feat(#205): renommer absences_garde → evenements_agenda
Migration live + BDD.sql from-scratch, module Nest / API /evenements-agenda, FK cartes id_evenement. Front stub path aligné. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -9,7 +9,7 @@ import {
|
||||
UpdateDateColumn,
|
||||
} from 'typeorm';
|
||||
import { AmChildren } from './am_children.entity';
|
||||
import { AbsencesGarde } from './absences_garde.entity';
|
||||
import { EvenementsAgenda } from './evenements_agenda.entity';
|
||||
import { Users } from './users.entity';
|
||||
import { CardType } from './card_types.entity';
|
||||
import { CardAudienceMember } from './card_audience_members.entity';
|
||||
@@ -45,12 +45,12 @@ export class CardInstance {
|
||||
@JoinColumn({ name: 'id_placement', referencedColumnName: 'id' })
|
||||
placement: AmChildren;
|
||||
|
||||
@Column({ name: 'id_absence', type: 'uuid', nullable: true })
|
||||
id_absence?: string;
|
||||
@Column({ name: 'id_evenement', type: 'uuid', nullable: true })
|
||||
id_evenement?: string;
|
||||
|
||||
@ManyToOne(() => AbsencesGarde, { nullable: true, onDelete: 'SET NULL' })
|
||||
@JoinColumn({ name: 'id_absence', referencedColumnName: 'id' })
|
||||
absence?: AbsencesGarde;
|
||||
@ManyToOne(() => EvenementsAgenda, { nullable: true, onDelete: 'SET NULL' })
|
||||
@JoinColumn({ name: 'id_evenement', referencedColumnName: 'id' })
|
||||
evenement?: EvenementsAgenda;
|
||||
|
||||
@Column({ name: 'cree_par', type: 'uuid', nullable: true })
|
||||
cree_par?: string;
|
||||
|
||||
+14
-14
@@ -10,25 +10,25 @@ import {
|
||||
import { AmChildren } from './am_children.entity';
|
||||
import { Users } from './users.entity';
|
||||
|
||||
export enum TypeAbsenceGardeType {
|
||||
export enum TypeEvenementAgendaType {
|
||||
ABSENCE_ENFANT = 'absence_enfant',
|
||||
CONGE_AM = 'conge_am',
|
||||
ARRET_MALADIE_AM = 'arret_maladie_am',
|
||||
}
|
||||
|
||||
export enum StatutAbsenceGardeType {
|
||||
export enum StatutEvenementAgendaType {
|
||||
EN_ATTENTE = 'en_attente',
|
||||
ACCEPTE = 'accepte',
|
||||
REFUSE = 'refuse',
|
||||
}
|
||||
|
||||
/**
|
||||
* Vérité métier des absences / congés / arrêts par couple AM↔enfant.
|
||||
* Les cartes (module ultérieur) collectent ; cette table stocke.
|
||||
* Ticket #193.
|
||||
* Vérité métier agenda par couple AM↔enfant (placement).
|
||||
* Types V1 : absences / congés / arrêts ; extensible (soins, école, mairie…).
|
||||
* Les cartes collectent ; cette table historise. Ticket #205.
|
||||
*/
|
||||
@Entity('absences_garde', { schema: 'public' })
|
||||
export class AbsencesGarde {
|
||||
@Entity('evenements_agenda', { schema: 'public' })
|
||||
export class EvenementsAgenda {
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
id: string;
|
||||
|
||||
@@ -41,11 +41,11 @@ export class AbsencesGarde {
|
||||
|
||||
@Column({
|
||||
type: 'enum',
|
||||
enum: TypeAbsenceGardeType,
|
||||
enumName: 'type_absence_garde_type',
|
||||
enum: TypeEvenementAgendaType,
|
||||
enumName: 'type_evenement_agenda_type',
|
||||
name: 'type',
|
||||
})
|
||||
type: TypeAbsenceGardeType;
|
||||
type: TypeEvenementAgendaType;
|
||||
|
||||
@Column({ name: 'date_debut', type: 'date' })
|
||||
date_debut: string;
|
||||
@@ -55,12 +55,12 @@ export class AbsencesGarde {
|
||||
|
||||
@Column({
|
||||
type: 'enum',
|
||||
enum: StatutAbsenceGardeType,
|
||||
enumName: 'statut_absence_garde_type',
|
||||
enum: StatutEvenementAgendaType,
|
||||
enumName: 'statut_evenement_agenda_type',
|
||||
name: 'statut',
|
||||
default: StatutAbsenceGardeType.EN_ATTENTE,
|
||||
default: StatutEvenementAgendaType.EN_ATTENTE,
|
||||
})
|
||||
statut: StatutAbsenceGardeType;
|
||||
statut: StatutEvenementAgendaType;
|
||||
|
||||
/** Purge auto pour en_attente/refuse ; accepte → infinity. */
|
||||
@Column({ name: 'expire_at', type: 'timestamptz' })
|
||||
Reference in New Issue
Block a user