Skip to content
Snippets Groups Projects

Development to testing

Merged Ghost User requested to merge Development into testing
4 files
+ 45
9
Compare changes
  • Side-by-side
  • Inline
Files
4
import { Entity, Column, PrimaryGeneratedColumn, ManyToOne } from 'typeorm';
import {
Entity,
Column,
PrimaryGeneratedColumn,
ManyToOne,
CreateDateColumn,
} from 'typeorm';
import { GameEntity } from '../game/game.entity';
import { FactionEntity } from '../faction/faction.entity';
@@ -7,8 +13,6 @@ import { FactionEntity } from '../faction/faction.entity';
export class MapDrawingEntity {
@PrimaryGeneratedColumn('uuid') mapDrawingId: string;
@Column({ type: 'bool', nullable: true }) drawingIsActive: boolean;
@Column({ type: 'time', nullable: true }) drawingValidTill: string;
@Column({ type: 'json', nullable: true }) data: JSON;
@ManyToOne(type => FactionEntity, faction => faction.mapDrawings, {
@@ -30,3 +34,16 @@ export class MapDrawingEntity {
}
}
}
@Entity('MapDrawingHistory')
export class MapDrawingHistoryEntity {
@PrimaryGeneratedColumn('uuid') mapDrawingHistoryId: string;
@CreateDateColumn() timestamp: Date;
@Column('bool') drawingIsActive: boolean;
@Column('json') data: JSON;
@ManyToOne(() => MapDrawingEntity, mapDrawing => mapDrawing.mapDrawingId, {
onDelete: 'CASCADE',
})
mapdrawing: string;
}
Loading