diff --git a/src/faction/faction.entity.ts b/src/faction/faction.entity.ts index 8bc7548a4f37bf367a6cb0381bc2a131d8080da4..ba2fff03a48629ef5bd562eb08694e472d76e812 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 0000000000000000000000000000000000000000..58c8ec33bf5e517e1b44dcc4e8f7caade93bfd52 --- /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; +}