From 359b7c95335a77269c67c3ddeef9a806d17d2840 Mon Sep 17 00:00:00 2001 From: Jeremy Yin Date: Wed, 26 Jun 2019 22:01:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BB=BA=E7=AB=8Bpost=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=AE=9E=E4=BD=93=EF=BC=8C=E6=95=B0=E6=8D=AE=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E4=BC=9A=E8=87=AA=E5=8A=A8=E6=9B=B4=E6=96=B0=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E7=9A=84=E5=AD=97=E6=AE=B5=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/post/post.entity.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/modules/post/post.entity.ts diff --git a/src/modules/post/post.entity.ts b/src/modules/post/post.entity.ts new file mode 100644 index 0000000..8ca7bca --- /dev/null +++ b/src/modules/post/post.entity.ts @@ -0,0 +1,19 @@ +import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn} from 'typeorm'; + +@Entity() +export class Post { + @PrimaryGeneratedColumn() + id: number; + + @Column() + title: string; + + @Column('longtext') + body: string; + + @CreateDateColumn() + created: Date; + + @UpdateDateColumn() + updated: Date; +} \ No newline at end of file