返回 AiToEarn
reply-comment-record.schema.ts
根目录 / project / aitoearn-backend / libs / channel-db / src / schemas / reply-comment-record.schema.ts
1 /*
2 * @Author: nevin
3 * @Date: 2021-12-24 13:46:31
4 * @LastEditors: nevin
5 * @LastEditTime: 2024-08-30 15:01:32
6 * @Description: 回复评论的记录 replyCommentRecord
7 */
8 import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose'
9 import { AccountType } from '@yikart/common'
10 import { DEFAULT_SCHEMA_OPTIONS } from '../channel-db.constants'
11 import { BaseTemp } from './time.tamp'
12
13 @Schema({ ...DEFAULT_SCHEMA_OPTIONS, collection: 'replyCommentRecord' })
14 export class ReplyCommentRecord extends BaseTemp {
15 id: string
16
17 @Prop({
18 required: true,
19 index: true,
20 type: String,
21 })
22 userId: string
23
24 @Prop({
25 required: true,
26 index: true,
27 type: String,
28 })
29 accountId: string
30
31 // 作品ID
32 @Prop({
33 index: true,
34 type: String,
35 })
36 worksId?: string
37
38 @Prop({
39 required: true,
40 enum: AccountType,
41 })
42 type: AccountType
43
44 @Prop({
45 required: true,
46 index: true,
47 type: String,
48 })
49 commentId: string
50
51 @Prop({
52 required: true,
53 index: true,
54 type: String,
55 })
56 commentContent: string
57
58 @Prop({
59 required: true,
60 index: true,
61 type: String,
62 })
63 replyContent: string
64 }
65
66 export const ReplyCommentRecordSchema = SchemaFactory.createForClass(ReplyCommentRecord)
67
67 lines TYPESCRIPT