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

@Entity('mdc_property_records')
export class MDCPropertyRecordEntity {
    @PrimaryGeneratedColumn() id: number;
    @Column({ type: 'int', nullable: false }) property_id: number;
    @Column({ type: 'varchar', length: 128, nullable: false }) address: string;
    @Column({ type: 'varchar', length: 64, nullable: false }) written_by: string;
    @Column({ type: 'int', nullable: true }) written_by_character_id: number | null;
    @Column({ type: 'longtext', nullable: false }) content: string;
    @Column({ type: 'datetime', default: () => 'CURRENT_TIMESTAMP' }) created: Date;
    @Column({ type: 'tinyint', default: 0 }) automated: boolean;

    @Column({ type: 'varchar', length: 12, nullable: false }) type: string;
    @Column({ type: 'varchar', length: 24, nullable: true }) sub_type: string | null;
    @Column({ type: 'int', nullable: true }) sub_type_id: number | null;
}   