Skip to content
Snippets Groups Projects
coordinate.entity.ts 786 B
Newer Older
L4168's avatar
L4168 committed
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;
  }