mirror of
https://github.com/BgaSol/sol-cloud
synced 2026-05-22 16:48:22 +00:00
feat(file): Add a video table and optimize the video frame rate field
This commit is contained in:
parent
d7092a5d75
commit
04eb6015ea
4 changed files with 31 additions and 6 deletions
|
|
@ -33,7 +33,7 @@ public class VideoCreateDto extends BaseCreateDto<VideoEntity> {
|
|||
private Integer bitrate;
|
||||
|
||||
@Schema(description = "视频帧率")
|
||||
private Integer frameRate;
|
||||
private Integer fps;
|
||||
|
||||
@Schema(description = "视频编码")
|
||||
private String codec;
|
||||
|
|
@ -50,7 +50,7 @@ public class VideoCreateDto extends BaseCreateDto<VideoEntity> {
|
|||
.duration(duration)
|
||||
.format(format)
|
||||
.bitrate(bitrate)
|
||||
.frameRate(frameRate)
|
||||
.fps(fps)
|
||||
.codec(codec)
|
||||
.fileId(fileId)
|
||||
.build());
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ public class VideoUpdateDto extends BaseUpdateDto<VideoEntity> {
|
|||
private Integer bitrate;
|
||||
|
||||
@Schema(description = "视频帧率")
|
||||
private Integer frameRate;
|
||||
private Integer fps;
|
||||
|
||||
@Schema(description = "视频编码")
|
||||
private String codec;
|
||||
|
|
@ -50,7 +50,7 @@ public class VideoUpdateDto extends BaseUpdateDto<VideoEntity> {
|
|||
.duration(duration)
|
||||
.format(format)
|
||||
.bitrate(bitrate)
|
||||
.frameRate(frameRate)
|
||||
.fps(fps)
|
||||
.codec(codec)
|
||||
.fileId(fileId)
|
||||
.build());
|
||||
|
|
|
|||
|
|
@ -45,8 +45,8 @@ public class VideoEntity extends BaseEntity {
|
|||
private Integer bitrate;
|
||||
|
||||
@Schema(description = "视频帧率")
|
||||
@TableField("frame_rate")
|
||||
private Integer frameRate;
|
||||
@TableField("fps")
|
||||
private Integer fps;
|
||||
|
||||
@Schema(description = "视频编码")
|
||||
@TableField("codec")
|
||||
|
|
|
|||
|
|
@ -43,3 +43,28 @@ CREATE TABLE t_image
|
|||
-- 为图片表添加索引
|
||||
CREATE INDEX idx_image_file_id ON t_image(file_id);
|
||||
CREATE INDEX idx_image_name ON t_image(name);
|
||||
|
||||
CREATE TABLE t_video
|
||||
(
|
||||
id VARCHAR(255) NOT NULL PRIMARY KEY,
|
||||
type VARCHAR(255),
|
||||
sort INTEGER,
|
||||
create_time TIMESTAMP(6),
|
||||
update_time TIMESTAMP(6),
|
||||
description VARCHAR(255),
|
||||
deleted INTEGER,
|
||||
|
||||
name VARCHAR(255), -- 视频名称
|
||||
width INTEGER, -- 视频宽度
|
||||
height INTEGER, -- 视频高度
|
||||
duration INTEGER, -- 视频时长(秒)
|
||||
format VARCHAR(255), -- 视频格式
|
||||
bitrate INTEGER, -- 视频码率
|
||||
fps INTEGER, -- 视频帧率
|
||||
codec VARCHAR(255), -- 视频编码格式
|
||||
file_id VARCHAR(255) -- 视频文件id
|
||||
);
|
||||
|
||||
-- 为视频表添加索引
|
||||
CREATE INDEX idx_video_file_id ON t_video(file_id);
|
||||
CREATE INDEX idx_video_name ON t_video(name);
|
||||
|
|
|
|||
Loading…
Reference in a new issue