adding bugs report + events entity corrected

This commit is contained in:
sdraris 2025-08-22 12:17:01 +02:00
parent 7da57f4889
commit ade40bce8a
2 changed files with 21 additions and 2 deletions

View File

@ -4,7 +4,7 @@ import { Users } from "./users.entity";
import { Parents } from "./parents.entity"; import { Parents } from "./parents.entity";
export enum TypeEvenementType { export enum TypeEvenementType {
ABSCENCE_ENFANT = 'absence_enfant', ABSENCE_ENFANT = 'absence_enfant',
CONGE_AM = 'conge_am', CONGE_AM = 'conge_am',
CONGE_PARENT = 'conge_parent', CONGE_PARENT = 'conge_parent',
ARRET_MALADIE_AM = 'arret_maladie_am', ARRET_MALADIE_AM = 'arret_maladie_am',
@ -45,7 +45,7 @@ export class Evenement {
@ManyToOne(() => Users, { nullable: true }) @ManyToOne(() => Users, { nullable: true })
@JoinColumn({ name: 'cree_par', referencedColumnName: 'id' }) @JoinColumn({ name: 'cree_par', referencedColumnName: 'id' })
Created_by?: Users; created_by?: Users;
@Column({ type: 'timestamptz', nullable: true, name: 'date_debut' }) @Column({ type: 'timestamptz', nullable: true, name: 'date_debut' })
start_date?: Date; start_date?: Date;

View File

@ -0,0 +1,19 @@
import { Column, CreateDateColumn, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
import { Users } from "./users.entity";
@Entity('signalements_bugs')
export class SignalementBug {
@PrimaryGeneratedColumn('uuid')
id: string;
@ManyToOne(() => Users, {nullable: true})
@JoinColumn({ name: 'id_utilisateur', referencedColumnName: 'id' })
user?: Users;
@Column({ type: 'text', name: 'description'})
description: string;
@CreateDateColumn({ name: 'cree_le', type: 'timestamptz' })
created_at: Date;
}