Skip to content

Let's use AI to Earn!

feat: 删除未使用的表库

牛文政3c09d8af48dc
diff --git a/electron/db/index.ts b/electron/db/index.ts
index c803a623..768b651f 100644
--- a/electron/db/index.ts
+++ b/electron/db/index.ts
@@ -10,8 +10,6 @@ import { AccountModel } from './models/account';
import { UserModel } from './models/user';
import { PubRecordModel } from './models/pubRecord';
import { VideoModel } from './models/video';
-import { AccountStatsModel } from './models/accountStats';
-import { VideoStatsModel } from './models/videoStats';
import * as migrations from './migrations';
import path from 'path';
import { app } from 'electron';
@@ -38,8 +36,6 @@ export const AppDataSource = new DataSource({
UserModel,
PubRecordModel,
VideoModel,
- AccountStatsModel,
- VideoStatsModel,
AutoRunModel,
AutoRunRecordModel,
ImgTextModel,
diff --git a/electron/db/models/accountStats.ts b/electron/db/models/accountStats.ts
deleted file mode 100644
index 04c27e2e..00000000
--- a/electron/db/models/accountStats.ts
+++ /dev/null
@@ -1,51 +0,0 @@
-import { Entity, PrimaryGeneratedColumn, Column } from 'typeorm';
-import { TempModel } from './temp';
-import { AccountType } from '../../../commont/AccountEnum';
-
-@Entity({ name: 'account_stats' })
-export class AccountStatsModel 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: 'varchar',
- enum: AccountType,
- nullable: false,
- comment: '平台类型',
- })
- type!: AccountType;
-
- // 阅读数量
- @Column({ type: 'int', nullable: false, comment: '阅读数量', default: 0 })
- readCount!: number;
-
- // 点赞数量
- @Column({ type: 'int', nullable: false, comment: '点赞数量', default: 0 })
- likeCount!: 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: 'int', nullable: false, default: 0, comment: '粉丝数' })
- fansCount!: number;
-
- // 收益(分)
- @Column({ type: 'bigint', nullable: false, comment: '收益', default: 0 })
- income!: number;
-}
diff --git a/electron/db/models/imgText.ts b/electron/db/models/imgText.ts
index e16a2cc7..fcf0156f 100644
--- a/electron/db/models/imgText.ts
+++ b/electron/db/models/imgText.ts
@@ -3,7 +3,7 @@
* @Date: 2025-01-20 16:24:16
* @LastEditTime: 2025-02-12 18:32:28
* @LastEditors: nevin
- * @Description: 视频发布记录
+ * @Description: 图文发布记录
*/
import { Column, Entity } from 'typeorm';
import { WorkData } from './workData';
diff --git a/electron/db/models/videoStats.ts b/electron/db/models/videoStats.ts
deleted file mode 100644
index c5a2bde9..00000000
--- a/electron/db/models/videoStats.ts
+++ /dev/null
@@ -1,50 +0,0 @@
-import { Entity, PrimaryGeneratedColumn, Column } from 'typeorm';
-import { TempModel } from './temp';
-import { AccountType } from '../../../commont/AccountEnum';
-
-@Entity({ name: 'video_stats' })
-export class VideoStatsModel 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,对应video表id' })
- videoId!: number;
-
- @Column({ type: 'int', nullable: false, comment: '账号id,对应account表id' })
- accountId!: number;
-
- @Column({
- type: 'varchar',
- enum: AccountType,
- nullable: false,
- comment: '平台类型',
- })
- type!: AccountType;
-
- // 阅读数量
- @Column({ type: 'int', nullable: false, comment: '阅读数量', default: 0 })
- readCount!: number;
-
- // 点赞数量
- @Column({ type: 'int', nullable: false, comment: '点赞数量', default: 0 })
- likeCount!: 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: 'bigint', nullable: false, comment: '收益', default: 0 })
- income!: number;
-}