From bba7963949969d1f4ce2364ebf44e6340c757a8f Mon Sep 17 00:00:00 2001 From: Ivan Li Date: Sun, 7 Mar 2021 22:12:15 +0800 Subject: [PATCH] =?UTF-8?q?feat(commons):=20=E4=B8=BA=E5=AE=9E=E4=BD=93?= =?UTF-8?q?=E7=BB=9F=E4=B8=80=E6=B7=BB=E5=8A=A0=E8=BD=AF=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E5=AD=97=E6=AE=B5=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/commons/entities/app-base-entity.ts | 4 ++++ src/projects/project.entity.ts | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/commons/entities/app-base-entity.ts b/src/commons/entities/app-base-entity.ts index 1002875..2a6d639 100644 --- a/src/commons/entities/app-base-entity.ts +++ b/src/commons/entities/app-base-entity.ts @@ -1,6 +1,7 @@ import { Field, ID, ObjectType } from '@nestjs/graphql'; import { CreateDateColumn, + DeleteDateColumn, PrimaryGeneratedColumn, UpdateDateColumn, } from 'typeorm'; @@ -16,4 +17,7 @@ export class AppBaseEntity { @UpdateDateColumn({ select: false }) updatedAt: Date; + + @DeleteDateColumn({ select: false }) + deletedAt?: Date; } diff --git a/src/projects/project.entity.ts b/src/projects/project.entity.ts index 611ddd4..6ddb034 100644 --- a/src/projects/project.entity.ts +++ b/src/projects/project.entity.ts @@ -22,7 +22,4 @@ export class Project extends AppBaseEntity { @Column({ nullable: true }) webHookSecret?: string; - - @DeleteDateColumn() - deletedAt?: Date; }