Newer
Older
import {
Entity,
Column,
PrimaryGeneratedColumn,
OneToMany,
ManyToOne,
PrimaryColumn,
Timestamp,
} from 'typeorm';
import {
Game_PersonEntity,
ObjectivePointEntity,
GameEntity,
} from './game.entity';
import { FactionEntity } from './faction.entity';
@Entity('MapDrawing')
export class MapDrawingEntity {
@PrimaryGeneratedColumn('uuid') mapDrawingId: string;
@Column({ type: 'bool' }) drawingIsActive: boolean;
@Column({ type: 'time' }) drawingValidTill: string;
@Column({ type: 'json', nullable: true }) data: JSON;
@ManyToOne(type => FactionEntity, faction => faction.mapDrawings)
faction: FactionEntity;
@ManyToOne(type => GameEntity, gameEntity => gameEntity.id)
gameId: GameEntity;
}