Let's use AI to Earn!
TypeScript auto-publishdouyindouyin-apielectron-appelectron-reactkuaishoukwaipublishedshipinhaotoolxiaohongshu
feat: 数据库-作品,json字段添加默认值
gaoSir1008537d6d71
diff --git a/electron/db/models/workData.ts b/electron/db/models/workData.tsindex 516d3bfe..ed98a3ee 100644--- a/electron/db/models/workData.ts+++ b/electron/db/models/workData.ts@@ -78,15 +78,20 @@ export class WorkData extends TempModel {lastStatsTime?: Date;// 话题- @Column({ type: 'json', nullable: true, comment: '话题' })- topics?: string[];+ @Column({ type: 'json', nullable: true, comment: '话题', default: '[]' })+ topics!: string[];// 位置@Column({ type: 'json', nullable: true, comment: '位置' })location?: ILocationDataItem;// 差异化参数- @Column({ type: 'json', nullable: true, comment: '不同平台的差异化参数' })+ @Column({+ type: 'json',+ nullable: true,+ comment: '不同平台的差异化参数',+ default: '{}',+ })diffParams?: DiffParmasType;// 可见性@@ -103,8 +108,8 @@ export class WorkData extends TempModel {timingTime?: Date;// @用户- @Column({ type: 'json', nullable: true, comment: '@用户数组' })- mentionedUserInfo?: ILableValue[];+ @Column({ type: 'json', nullable: true, comment: '@用户数组', default: '[]' })+ mentionedUserInfo!: ILableValue[];// 预览地址@Column({ type: 'varchar', nullable: true, comment: '预览地址' })diff --git a/electron/main/plat/platforms/xhs/index.ts b/electron/main/plat/platforms/xhs/index.tsindex 920e5248..731737d4 100644--- a/electron/main/plat/platforms/xhs/index.ts+++ b/electron/main/plat/platforms/xhs/index.ts@@ -582,8 +582,6 @@ export class Xhs extends PlatformBase {this.pubParamsParse(params),).catch((err) => {- console.log('----------');- console.log(err);resolve({code: 0,msg: err,