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

@Entity('frequencies')
export class FrequencyEntity {
    @PrimaryGeneratedColumn() id: number;
    @Column({ type: 'int', unique: true }) frequency: number;
    @Column({ type: 'json' }) entities: {
        factions: number[];
        companies: number[];
    };
    @Column({ type: 'varchar', length: 128, nullable: true, default: null }) password: string | null;
    @Column({ type: 'int', nullable: true, default: null }) owner_character_id: number | null;
    @Column({ type: 'datetime', default: () => 'CURRENT_TIMESTAMP' }) created: Date;
    @Column({ type: 'varchar', length: 25, nullable: true, default: null }) name: string | null;
    @Column({ type: 'int', default: 12000 }) range: number;
}
