From d884e55fcf4b7ded1f33d515f3faef4f1055e3a8 Mon Sep 17 00:00:00 2001 From: Ronnie Friman <L4168@student.jamk.fi> Date: Fri, 5 Jul 2019 19:40:06 +0300 Subject: [PATCH] moved score entity --- src/faction/faction.entity.ts | 10 ---------- src/score/score.entity.ts | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 10 deletions(-) create mode 100644 src/score/score.entity.ts diff --git a/src/faction/faction.entity.ts b/src/faction/faction.entity.ts index 8bc7548..ba2fff0 100644 --- a/src/faction/faction.entity.ts +++ b/src/faction/faction.entity.ts @@ -83,16 +83,6 @@ export class FP_HistoryEntity { faction_PowerUp: Faction_PowerUpEntity; } -@Entity('Score') -export class ScoreEntity { - @PrimaryGeneratedColumn('uuid') scoreId: string; - @Column({ type: 'float' }) score: number; - @Column({ type: 'timestamp' }) scoreTimeStamp: Timestamp; - - @ManyToOne(type => FactionEntity, factionName => factionName.factionId) - faction: FactionEntity; -} - @Entity('GameGroup') export class GameGroupEntity { @PrimaryGeneratedColumn('uuid') id: string; diff --git a/src/score/score.entity.ts b/src/score/score.entity.ts new file mode 100644 index 0000000..58c8ec3 --- /dev/null +++ b/src/score/score.entity.ts @@ -0,0 +1,19 @@ +import { + Entity, + PrimaryGeneratedColumn, + Column, + ManyToOne, + Timestamp, + CreateDateColumn, +} from 'typeorm'; +import { FactionEntity } from '../faction/faction.entity'; + +@Entity('Score') +export class ScoreEntity { + @PrimaryGeneratedColumn('uuid') scoreId: string; + @Column({ type: 'float' }) score: number; + @CreateDateColumn({ type: 'timestamp' }) scoreTimeStamp: Timestamp; + + @ManyToOne(type => FactionEntity, factionName => factionName.factionId) + faction: string; +} -- GitLab