import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';

@Entity('drug_tests')
export class DrugTestEntity {
    @PrimaryGeneratedColumn() id: number;
    @Column() character_id: number;
    @Column({ type: 'varchar', length: 32 }) name: string;
    @Column({ type: 'varchar', length: 32 }) ssn: string;
    @Column() performed_by_character_id: number;
    @Column({ type: 'varchar', length: 64 }) performed_by: string;
    @Column({ type: 'datetime', default: () => 'CURRENT_TIMESTAMP' }) date: Date;

    @Column({ type: 'tinyint' }) thc: boolean;
    @Column({ type: 'tinyint' }) amphetamines: boolean;
    @Column({ type: 'tinyint' }) cocaine: boolean;
    @Column({ type: 'tinyint' }) benzodiazepines: boolean;
    @Column({ type: 'tinyint' }) opiates: boolean;
    @Column({ type: 'tinyint' }) methamphetamine: boolean;
    @Column({ type: 'decimal', precision: 6, scale: 3 }) bac: number;
}
