From 9aa2a64a53b3414b82b6b1f6e6ec9049a7025edb Mon Sep 17 00:00:00 2001 From: David Mehren Date: Sat, 24 Oct 2020 11:34:49 +0200 Subject: [PATCH] UserEntity: Fix column types for create/update dates Signed-off-by: David Mehren --- src/users/user.entity.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/users/user.entity.ts b/src/users/user.entity.ts index 9b20e6444..206cde1b9 100644 --- a/src/users/user.entity.ts +++ b/src/users/user.entity.ts @@ -1,4 +1,9 @@ -import { Entity, PrimaryGeneratedColumn } from 'typeorm'; +import { + CreateDateColumn, + Entity, + PrimaryGeneratedColumn, + UpdateDateColumn, +} from 'typeorm'; import { Column, OneToMany } from 'typeorm/index'; import { Note } from '../notes/note.entity'; import { AuthToken } from './auth-token.entity'; @@ -15,10 +20,10 @@ export class User { @Column() displayName: string; - @Column() + @CreateDateColumn() createdAt: Date; - @Column() + @UpdateDateColumn() updatedAt: Date; @Column({