add comment and category
This commit is contained in:
@@ -0,0 +1,13 @@
|
|||||||
|
import { Column, Entity, PrimaryColumn } from 'typeorm';
|
||||||
|
|
||||||
|
@Entity('content_category')
|
||||||
|
export class CategoryEntity {
|
||||||
|
@PrimaryColumn({ type: 'varchar', generated: 'uuid', length: 36 })
|
||||||
|
id: string;
|
||||||
|
|
||||||
|
@Column({ comment: '分类名称', unique: true })
|
||||||
|
name: string;
|
||||||
|
|
||||||
|
@Column({ comment: '分类排序', default: 0 })
|
||||||
|
customOrder: number;
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
import { Column, CreateDateColumn, Entity, PrimaryColumn } from 'typeorm';
|
||||||
|
|
||||||
|
@Entity('content_comment')
|
||||||
|
export class CommentEntity {
|
||||||
|
@PrimaryColumn({ type: 'varchar', length: 36, generated: 'uuid' })
|
||||||
|
id: string;
|
||||||
|
|
||||||
|
@Column({ comment: '评论内容', type: 'text' })
|
||||||
|
body: string;
|
||||||
|
|
||||||
|
@CreateDateColumn({ comment: '创建时间' })
|
||||||
|
createdAt: Date;
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
import { Column, Entity, PrimaryColumn } from 'typeorm';
|
||||||
|
|
||||||
|
@Entity('content_tag')
|
||||||
|
export class TagEntity {
|
||||||
|
@PrimaryColumn({ type: 'varchar', generated: 'uuid', length: 36 })
|
||||||
|
id: string;
|
||||||
|
|
||||||
|
@Column({ comment: '标签名称', unique: true })
|
||||||
|
name: string;
|
||||||
|
|
||||||
|
@Column({ comment: '标签描述', nullable: true })
|
||||||
|
desc?: string;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user