diff --git a/src/score/score.entity.ts b/src/score/score.entity.ts index 6ca9ab77b968060a6dc88c860425119914cec030..1047f90dc7029c1011368ab54107a875a224b6d2 100644 --- a/src/score/score.entity.ts +++ b/src/score/score.entity.ts @@ -12,7 +12,7 @@ import { FactionEntity } from '../faction/faction.entity'; export class ScoreEntity { @PrimaryGeneratedColumn('uuid') scoreId: string; @Column({ type: 'float' }) score: number; - @CreateDateColumn({ type: 'timestamp' }) scoreTimeStamp: Timestamp; + @Column({ type: 'float' }) scoreTimeStamp: number; @ManyToOne(type => FactionEntity, factionName => factionName.factionId, { onDelete: 'CASCADE', diff --git a/src/score/score.service.ts b/src/score/score.service.ts index 90716c4b2e9f5d72f21971edb574972a2ccfda6d..a0ff983f527dba7bb6d51160743be20dc37b5e0b 100644 --- a/src/score/score.service.ts +++ b/src/score/score.service.ts @@ -44,6 +44,7 @@ export class ScoreService { } // add the score for Faction const newScore = await this.scoreRepository.create(scoreData); + newScore.scoreTimeStamp = Date.now(); await this.scoreRepository.insert(newScore); return { message: 'Score updated!',