返回 AiToEarn
workData.dto.ts
根目录 / project / aitoearn-electron / server / src / modules / publish / dto / workData.dto.ts
1 /*
2 * @Author: nevin
3 * @Date: 2024-08-19 15:58:47
4 * @LastEditTime: 2025-03-17 12:41:12
5 * @LastEditors: nevin
6 * @Description: WorkData
7 */
8 import { ApiProperty } from '@nestjs/swagger';
9 import { Expose } from 'class-transformer';
10 import { IsOptional, IsString } from 'class-validator';
11 import { AccountType } from 'src/db/schema/account.schema';
12 import {
13 DiffParmasType,
14 ILableValue,
15 ILocationDataItem,
16 PubStatus,
17 VisibleTypeEnum,
18 } from 'src/db/schema/workData.schema';
19
20 export class CreateWorkDataDto {
21 dataId?: string;
22 userId: string;
23 lastStatsTime?: Date; // 最后统计时间
24 previewVideoLink: string; // 预览地址,这个值是发布完成手动拼接的
25 pubRecordId: number; // 发布记录id,对应PubRecord表id
26 accountId: number; // 账号id
27 type: AccountType; // 平台类型
28 publishTime?: Date; // 发布时间
29 otherInfo?: Record<string, any>; // 其他信息
30 failMsg?: string; // 发布失败原因(如果失败)
31 status: PubStatus;
32 readCount: number;
33 likeCount: number;
34 collectCount: number;
35 forwardCount: number;
36 commentCount: number;
37 income: number;
38 title?: string; // 标题
39 desc?: string; // 简介,简介中不该包含话题,如果有需要每个平台再自己做处理。
40 coverPath?: string; // 封面路径,机器的本地路径
41 mixInfo?: ILableValue; // 合集
42 topics: string[]; // 话题 格式:['话题1', '话题2'],不该包含 ‘#’
43 location?: ILocationDataItem; // 位置
44 diffParams?: DiffParmasType;
45 visibleType?: VisibleTypeEnum;
46 timingTime?: Date; // 定时发布日期
47 cookies?: Record<string, any>;
48
49 // @ApiProperty({ title: '视频路径', required: false })
50 // @IsString({ message: '视频路径必须是一个字符串' })
51 // @IsOptional()
52 // @Expose()
53 // readonly videoPath: string;
54 }
55
55 lines TYPESCRIPT