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;

}
