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

@Entity('charges')
export class ChargeEntity {
    @PrimaryGeneratedColumn() id: number;
    @Column({ type: 'int' }) character_id: number;
    @Column({ type: 'varchar', width: 32 }) character_name: string;
    @Column({ type: 'int' }) account_id: number;
    @Column({ type: 'int' }) by_character_id: number;
    @Column({ type: 'varchar', width: 50 }) by_name: string;
    @Column({ type: 'varchar', width: 256 }) reason: string;
    @Column({ type: 'text', default: null, nullable: true }) statement: string | null;
    @Column({ type: 'varchar', width: 20 }) status: 'charge' | 'prison' | 'manual-entry' | 'update';
    @Column({ type: 'datetime', default: () => 'CURRENT_TIMESTAMP()' }) time: Date;
}
