添加博客模块
This commit is contained in:
30
tone-page-server/src/blog/entity/Blog.entity.ts
Normal file
30
tone-page-server/src/blog/entity/Blog.entity.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, OneToMany, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
||||
|
||||
@Entity()
|
||||
export class Blog {
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
id: string;
|
||||
|
||||
@Column()
|
||||
title: string;
|
||||
|
||||
@Column()
|
||||
description: string;
|
||||
|
||||
@Column()
|
||||
contentUrl: string;
|
||||
|
||||
@Column({ precision: 3 })
|
||||
publishAt: Date;
|
||||
|
||||
@CreateDateColumn({ precision: 3 })
|
||||
createdAt: Date;
|
||||
|
||||
@UpdateDateColumn({ precision: 3 })
|
||||
updatedAt: Date;
|
||||
|
||||
@DeleteDateColumn({ precision: 3, nullable: true })
|
||||
deletedAt: Date;
|
||||
|
||||
// 权限关系 TODO
|
||||
}
|
||||
Reference in New Issue
Block a user