返回 AiToEarn
interactionRecord.ts
根目录 / project / aitoearn-electron / electron / db / models / interactionRecord.ts
1 /*
2 * @Author: nevin
3 * @Date: 2025-01-20 16:24:16
4 * @LastEditTime: 2025-03-23 09:27:54
5 * @LastEditors: nevin
6 * @Description: 互动记录记录 interactionRecord
7 */
8 import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';
9 import { TempModel } from './temp';
10 import { PlatType } from '../../../commont/AccountEnum';
11
12 @Entity({ name: 'interactionRecord' })
13 export class InteractionRecordModel extends TempModel {
14 @PrimaryGeneratedColumn({ type: 'int', comment: 'id' })
15 id!: number;
16
17 @Column({ type: 'varchar', nullable: false, comment: '用户id' })
18 userId!: string;
19
20 @Column({ type: 'int', nullable: false, comment: '账号id,对应account表id' })
21 accountId!: number;
22
23 @Column({
24 type: 'varchar',
25 enum: PlatType,
26 nullable: true,
27 comment: '平台类型',
28 })
29 type!: PlatType;
30
31 @Column({ type: 'varchar', nullable: false, comment: '作品Id' })
32 worksId!: string;
33
34 @Column({ type: 'varchar', nullable: true, comment: '作品标题' })
35 worksTitle?: string;
36
37 @Column({ type: 'varchar', nullable: true, comment: '评论备注' })
38 commentRemark?: string;
39
40 @Column({ type: 'varchar', nullable: true, comment: '封面' })
41 worksCover?: string;
42
43 @Column({ type: 'varchar', nullable: false, comment: '评论内容' })
44 commentContent!: string;
45
46 @Column({ type: 'tinyint', nullable: false, comment: '是否点赞' })
47 isLike!: 0 | 1;
48
49 @Column({ type: 'tinyint', nullable: false, comment: '是否收藏' })
50 isCollect!: 0 | 1;
51 }
52
52 lines TYPESCRIPT