feat: 新增剧集封面、集数管理与上传优化功能
1. 新增Cover实体类并注册到数据库模块 2. 为剧集添加总集数字段及自动创建集数槽功能 3. 新增管理员更新剧集集数接口 4. 优化发布剧集列表:支持标题过滤与默认分页大小10 5. 扩展MediaUploadJob实体字段,完善媒体上传流程 6. 重构订单与媒体服务,新增数据库持久化支持 7. 新增剧集标题过滤的端到端测试用例
This commit is contained in:
21
src/modules/media/entities/cover.entity.ts
Normal file
21
src/modules/media/entities/cover.entity.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import {
|
||||
Column,
|
||||
CreateDateColumn,
|
||||
Entity,
|
||||
PrimaryGeneratedColumn,
|
||||
} from 'typeorm';
|
||||
|
||||
@Entity('covers')
|
||||
export class Cover {
|
||||
@PrimaryGeneratedColumn()
|
||||
id: number;
|
||||
|
||||
@Column({ type: 'varchar', length: 255 })
|
||||
fileName: string;
|
||||
|
||||
@Column({ type: 'varchar', length: 1024 })
|
||||
url: string;
|
||||
|
||||
@CreateDateColumn()
|
||||
createdAt: Date;
|
||||
}
|
||||
@@ -16,6 +16,9 @@ export class MediaUploadJob {
|
||||
@Column({ type: 'varchar', length: 128 })
|
||||
jobId: string;
|
||||
|
||||
@Column({ type: 'int', nullable: true })
|
||||
episodeId?: number;
|
||||
|
||||
@Index()
|
||||
@Column({ type: 'varchar', length: 128, nullable: true })
|
||||
byteplusVid?: string;
|
||||
@@ -23,6 +26,42 @@ export class MediaUploadJob {
|
||||
@Column({ type: 'varchar', length: 64 })
|
||||
status: string;
|
||||
|
||||
@Column({ type: 'varchar', length: 255, nullable: true })
|
||||
fileName?: string;
|
||||
|
||||
@Column({ type: 'varchar', length: 128, nullable: true })
|
||||
contentType?: string;
|
||||
|
||||
@Column({ type: 'int', nullable: true })
|
||||
fileSize?: number;
|
||||
|
||||
@Column({ type: 'varchar', length: 255, nullable: true })
|
||||
bucket?: string;
|
||||
|
||||
@Column({ type: 'varchar', length: 512, nullable: true })
|
||||
objectKey?: string;
|
||||
|
||||
@Column({ type: 'varchar', length: 1024, nullable: true })
|
||||
uploadUrl?: string;
|
||||
|
||||
@Column({ type: 'varchar', length: 1024, nullable: true })
|
||||
videoUrl?: string;
|
||||
|
||||
@Column({ type: 'int', nullable: true })
|
||||
width?: number;
|
||||
|
||||
@Column({ type: 'int', nullable: true })
|
||||
height?: number;
|
||||
|
||||
@Column({ type: 'int', nullable: true })
|
||||
durationSeconds?: number;
|
||||
|
||||
@Column({ type: 'varchar', length: 32, nullable: true })
|
||||
reviewStatus?: 'not_submitted' | 'pending' | 'reviewing' | 'approved' | 'rejected';
|
||||
|
||||
@Column({ type: 'varchar', length: 512, nullable: true })
|
||||
reviewMessage?: string;
|
||||
|
||||
@Column({ type: 'json', nullable: true })
|
||||
rawResponse?: Record<string, unknown>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user