import { Entity, Column, PrimaryGeneratedColumn, ManyToOne, Timestamp, } from 'typeorm'; import { GameEntity, Game_PersonEntity } 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.factionId) faction: FactionEntity; @ManyToOne(type => GameEntity, gameEntity => gameEntity.id) gameId: GameEntity; } @Entity('Game_Person_MapDrawing') export class Game_Person_MapDrawingEntity { @PrimaryGeneratedColumn('uuid') GPmapDrawingId: string; @Column({ type: 'timestamp' }) GPCTimeStamp: Timestamp; @ManyToOne(type => Game_PersonEntity, game_person => game_person.gamepersonId) game_person: Game_PersonEntity; @ManyToOne(type => MapDrawingEntity, map_drawing => map_drawing.mapDrawingId) map_drawing: MapDrawingEntity; }