refactor: 重构项目目录与代码结构,清理冗余文件
本次提交进行了大规模的项目结构调整: 1. 调整文件目录归属,将模块代码按功能域重新组织 2. 删除多处冗余的DTO、实体类和模块文件 3. 统一了常量、装饰器、工具类的存放位置 4. 修复了`.gitignore`的日志目录匹配规则 5. 新增了健康检查、认证、用户、剧集、订单等核心业务模块
This commit is contained in:
48
src/data/drama-metric.entity.ts
Normal file
48
src/data/drama-metric.entity.ts
Normal file
@@ -0,0 +1,48 @@
|
||||
import {
|
||||
Column,
|
||||
CreateDateColumn,
|
||||
Entity,
|
||||
Index,
|
||||
PrimaryGeneratedColumn,
|
||||
UpdateDateColumn,
|
||||
} from 'typeorm';
|
||||
|
||||
@Entity('drama_metrics')
|
||||
export class DramaMetric {
|
||||
@PrimaryGeneratedColumn()
|
||||
id: number;
|
||||
|
||||
@Index({ unique: true })
|
||||
@Column({ type: 'bigint' })
|
||||
dramaId: number;
|
||||
|
||||
@Column({ type: 'varchar', length: 255 })
|
||||
title: string;
|
||||
|
||||
@Column({ type: 'bigint', default: 0 })
|
||||
plays: number;
|
||||
|
||||
@Column({ type: 'bigint', default: 0 })
|
||||
likes: number;
|
||||
|
||||
@Column({ type: 'bigint', default: 0 })
|
||||
shares: number;
|
||||
|
||||
@Column({ type: 'bigint', default: 0 })
|
||||
comments: number;
|
||||
|
||||
@Column({ type: 'float', default: 0 })
|
||||
completionRate: number;
|
||||
|
||||
@Column({ type: 'int', default: 0 })
|
||||
averageWatchSeconds: number;
|
||||
|
||||
@Column({ type: 'datetime' })
|
||||
syncedAt: Date;
|
||||
|
||||
@CreateDateColumn()
|
||||
createdAt: Date;
|
||||
|
||||
@UpdateDateColumn()
|
||||
updatedAt: Date;
|
||||
}
|
||||
Reference in New Issue
Block a user