import { Column, Entity, OneToMany, PrimaryGeneratedColumn } from 'typeorm';
import { RoadblockEntity } from './roadblock.entity';

@Entity('roadblock_scenes')
export class RoadblockSceneEntity {
    @PrimaryGeneratedColumn() id: number;
    @Column({ type: 'varchar', length: 128 }) name: string;
    @Column({ type: 'varchar', length: 128 }) created_by: string;
    @Column() created_by_character_id: number;
    @Column({ type: 'datetime', default: () => 'CURRENT_TIMESTAMP' }) created: Date;

    @OneToMany(() => RoadblockEntity, (rbe) => rbe.scene)
    roadblocks: RoadblockEntity[];
}
