Let's use AI to Earn!
TypeScript auto-publishdouyindouyin-apielectron-appelectron-reactkuaishoukwaipublishedshipinhaotoolxiaohongshu
feat: 脚本表
yikaJasonMicc1f64d82dc91
diff --git a/electron/db/models/autoComment.ts b/electron/db/models/autoComment.tsdeleted file mode 100644index d872e30e..00000000--- a/electron/db/models/autoComment.ts+++ /dev/null@@ -1,101 +0,0 @@-/*- * @Author: nevin- * @Date: 2025-01-20 16:24:16- * @LastEditTime: 2025-02-17 12:24:49- * @LastEditors: nevin- * @Description: 自动评论 autoComment- */-import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';-import { TempModel } from './temp';--// 状态 未进行 进行中 失败 已完成-export enum AutoCommentStatus {- UNDO = 0,- DOING = 1,- FAIL = 2,- DONE = 3,-}--@Entity({ name: 'autoComment' })-export class AccountModel extends TempModel {- @PrimaryGeneratedColumn({ type: 'int', comment: 'id' })- id!: number;-- @Column({ type: 'varchar', nullable: false, comment: '用户id' })- userId!: string;-- @Column({ type: 'varchar', nullable: false, comment: '名称' })- title!: string;-- @Column({ type: 'int', nullable: false, comment: '总点赞数量', default: 0 })- likeCount!: number;-- @Column({- type: 'tinyint',- nullable: false,- comment: '登录状态,用于判断是否失效',- default: AccountStatus.USABLE,- })- status?: AccountStatus;-- @Column({- type: 'varchar',- nullable: true,- comment: '其他token 目前抖音用',- default: '',- })- token?: string;-- @Column({- type: 'datetime',- nullable: true,- comment: '登录时间',- })- loginTime?: Date;-- @Column({ type: 'varchar', nullable: false, comment: '用户id' })- uid!: string;-- // 账号- @Column({ type: 'varchar', nullable: false, comment: '账号' })- account!: string;-- // 头像- @Column({ type: 'varchar', nullable: false, comment: '头像' })- avatar!: string;-- // 昵称- @Column({ type: 'varchar', nullable: false, comment: '昵称' })- nickname!: string;-- // 粉丝数量- @Column({ type: 'int', nullable: false, comment: '粉丝数量', default: 0 })- fansCount!: number;-- // 阅读数量- @Column({ type: 'int', nullable: false, comment: '总阅读数量', default: 0 })- readCount!: number;-- // 收藏数量- @Column({ type: 'int', nullable: false, comment: '总收藏数量', default: 0 })- collectCount!: number;-- // 转发数量- @Column({ type: 'int', nullable: false, comment: '总转发数量', default: 0 })- forwardCount!: number;-- // 评论数量- @Column({ type: 'int', nullable: false, comment: '总评论数量', default: 0 })- commentCount!: number;-- @Column({ type: 'datetime', nullable: true, comment: '最后统计时间' })- lastStatsTime?: Date;-- // 作品数量- @Column({ type: 'int', nullable: false, comment: '作品数量', default: 0 })- workCount?: number;-- // 收益- @Column({ type: 'bigint', nullable: false, comment: '收益', default: 0 })- income?: number;-}diff --git a/electron/db/models/autoRun.ts b/electron/db/models/autoRun.tsnew file mode 100644index 00000000..03fdac98--- /dev/null+++ b/electron/db/models/autoRun.ts@@ -0,0 +1,58 @@+/*+ * @Author: nevin+ * @Date: 2025-01-20 16:24:16+ * @LastEditTime: 2025-03-18 19:44:29+ * @LastEditors: nevin+ * @Description: 自动任务 autoRun+ */+import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';+import { TempModel } from './temp';++// 状态 进行中 暂停 删除+export enum AutoRunStatus {+ DOING = 2, // 进行中+ PAUSE = 3, // 暂停+ DELETE = 4, // 删除+}++export enum AutoRunType {+ ReplyComment = 1, // 回复评论+}++@Entity({ name: 'autoRun' })+export class AutoRunModel extends TempModel {+ @PrimaryGeneratedColumn({ type: 'int', comment: 'id' })+ id!: number;++ @Column({ type: 'varchar', nullable: false, comment: '用户id' })+ userId!: string;++ @Column({ type: 'int', nullable: false, comment: '账号id,对应account表id' })+ accountId!: number;++ @Column({ type: 'int', nullable: false, comment: '执行次数', default: 0 })+ runCount!: number;++ @Column({+ type: 'tinyint',+ nullable: false,+ comment: '自动程序状态',+ default: AutoRunStatus.DOING,+ })+ status!: AutoRunStatus;++ @Column({+ type: 'tinyint',+ nullable: false,+ comment: '类型',+ })+ type!: AutoRunType;++ @Column({+ type: 'varchar',+ nullable: false,+ comment:+ '周期类型 天 day-22 (例:每天22时) 周 week-2 (例:每周周二,周日0) 月 month-22 (例:每月22号)',+ })+ cycleType!: string;+}diff --git a/electron/db/models/autoRunRecord.ts b/electron/db/models/autoRunRecord.tsnew file mode 100644index 00000000..083d7094--- /dev/null+++ b/electron/db/models/autoRunRecord.ts@@ -0,0 +1,52 @@+/*+ * @Author: nevin+ * @Date: 2025-01-20 16:24:16+ * @LastEditTime: 2025-03-18 19:44:55+ * @LastEditors: nevin+ * @Description: 自动评论 autoComment+ */+import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';+import { TempModel } from './temp';++// 状态 进行中 失败 完成+export enum AutoRunRecordStatus {+ DOING = 1, // 进行中+ FAIL = 2, // 失败+ SUCCESS = 3, // 完成+}++export enum AutoRunType {+ ReplyComment = 1, // 回复评论+}++@Entity({ name: 'autoRunRecord' })+export class AutoRunRecordModel extends TempModel {+ @PrimaryGeneratedColumn({ type: 'int', comment: 'id' })+ id!: number;++ @Column({ type: 'varchar', nullable: false, comment: '用户id' })+ userId!: string;++ @Column({+ type: 'tinyint',+ nullable: false,+ comment: '自动程序运行状态',+ default: AutoRunRecordStatus.DOING,+ })+ status!: AutoRunRecordStatus;++ @Column({+ type: 'tinyint',+ nullable: false,+ comment: '类型',+ })+ type!: AutoRunType;++ @Column({+ type: 'varchar',+ nullable: false,+ comment:+ '周期类型 天 day-22 (例:每天22时) 周 week-2 (例:每周周二,周日0) 月 month-22 (例:每月22号)',+ })+ cycleType!: string;+}