Skip to content

Let's use AI to Earn!

feat: 新增的字段设计完成

gaoSir375c34b96db1
diff --git a/commont/publish/PublishEnum.ts b/commont/publish/PublishEnum.ts
index 32cc5f92..6c7b86dd 100644
--- a/commont/publish/PublishEnum.ts
+++ b/commont/publish/PublishEnum.ts
@@ -13,3 +13,19 @@ export enum VisibleTypeEnum {
// 所有人可见
Public = 3,
}
+
+// 抖音自主声明
+export enum DouyinDeclareEnum {
+ // 内容自行拍摄
+ Self = 1,
+ // 内容取材网络
+ Network = 2,
+ // 内容由AI生成
+ AI = 3,
+ // 可能引人不适
+ Uncomfortable = 4,
+ // 虚构演绎,仅供娱乐
+ Fiction = 5,
+ // 危险行为,请勿模仿
+ Danger = 6,
+}
diff --git a/electron/db/models/video.ts b/electron/db/models/video.ts
index e7429898..4d96965a 100644
--- a/electron/db/models/video.ts
+++ b/electron/db/models/video.ts
@@ -7,15 +7,18 @@
*/
import { Entity, PrimaryGeneratedColumn, Column } from 'typeorm';
import { WorkData } from './workData';
-import { VisibleTypeEnum } from '../../../commont/publish/PublishEnum';
+import {
+ DouyinDeclareEnum,
+ VisibleTypeEnum,
+} from '../../../commont/publish/PublishEnum';
import { AccountType } from '@@/AccountEnum';
-// 话题
-interface ITopics {
+// 包含一个name和一个value的对象
+export interface ILableValue {
label: string;
value: string | number;
}
-export type TopicsArrType = ITopics[];
+export type TopicsArrType = ILableValue[];
/**
* 不同平台的差异化参数
@@ -24,13 +27,25 @@ export type TopicsArrType = ITopics[];
export type DiffParmasType = {
[AccountType.Xhs]?: {
// 小红书的话题格式
- topicsDetail: {
+ topicsDetail?: {
topicId: string;
topicName: string;
}[];
};
- [AccountType.Douyin]?: {};
- [AccountType.WxSph]?: {};
+ [AccountType.Douyin]?: {
+ // 申请关联的热点
+ hotPoint?: ILableValue;
+ // 自主声明
+ selfDeclare?: DouyinDeclareEnum;
+ };
+ [AccountType.WxSph]?: {
+ // 是否未原创
+ isOriginal?: boolean;
+ // 扩展链接
+ extLink?: string;
+ // 活动
+ activity?: ILableValue;
+ };
[AccountType.KWAI]?: {};
};
@@ -76,10 +91,18 @@ export class VideoModel extends WorkData {
@Column({ type: 'json', nullable: true, comment: '话题' })
topics?: TopicsArrType;
+ // 位置
+ @Column({ type: 'json', nullable: true, comment: '位置' })
+ location?: ILableValue;
+
// 差异化参数
@Column({ type: 'json', nullable: true, comment: '不同平台的差异化参数' })
diffParams?: DiffParmasType;
+ // 定时发布日期
+ @Column({ type: 'datetime', nullable: true, comment: '定时发布日期' })
+ timingTime?: Date;
+
// 视频可见性
@Column({
type: 'tinyint',
diff --git a/electron/main/plat/plat.type.ts b/electron/main/plat/plat.type.ts
index c1d56aa8..862440b0 100644
--- a/electron/main/plat/plat.type.ts
+++ b/electron/main/plat/plat.type.ts
@@ -7,8 +7,7 @@
*/
import { AccountModel } from '../../db/models/account';
import { VisibleTypeEnum } from '@@/publish/PublishEnum';
-import { AccountType } from '@@/AccountEnum';
-import { DiffParmasType } from '../../db/models/video';
+import { DiffParmasType, ILableValue } from '../../db/models/video';
export type CookiesType = Electron.Cookie[];
@@ -65,11 +64,14 @@ export interface IVideoPublishParams {
videoPath: string;
// 封面路径
coverPath: string;
- other?: string;
// 可见性
visibleType: VisibleTypeEnum;
// 各个平台的差异化参数
diffParams?: DiffParmasType;
+ // 定时发布日期
+ timingTime?: Date;
+ // 地点
+ location?: ILableValue;
}
// 获取话题返回值