84 lines
2.6 KiB
C#
84 lines
2.6 KiB
C#
using SqlSugar;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.Net;
|
|
using VideoAnalysisCore.AICore.SherpaOnnx;
|
|
using VideoAnalysisCore.Enum;
|
|
using Whisper.net;
|
|
|
|
namespace VideoAnalysisCore.Model
|
|
{
|
|
/// <summary>
|
|
/// 视频任务模型
|
|
/// </summary>
|
|
[SugarTable("videotask")]
|
|
public class VideoTask
|
|
{
|
|
/// <summary>
|
|
/// 任务id
|
|
/// <para>视频音频文件地址都使用taskID能获取</para>
|
|
/// </summary>
|
|
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
|
|
public long Id { get; set; }
|
|
/// <summary>
|
|
/// 媒体路径
|
|
/// </summary>
|
|
public string MediaUrl { get; set; } = string.Empty;
|
|
/// <summary>
|
|
/// 下载后本地媒体目录
|
|
/// </summary>
|
|
public string LocalMediaPath { get; set; } = string.Empty;
|
|
/// <summary>
|
|
/// 上一次执行的枚举
|
|
/// </summary>
|
|
public RedisChannelEnum LastEnum { get; set; }
|
|
/// <summary>
|
|
/// ApiKey
|
|
/// </summary>
|
|
public string ApiToken { get; set; } = string.Empty;
|
|
/// <summary>
|
|
/// 请求来自哪个ip地址
|
|
/// </summary>
|
|
public string ComeFrom { get; set; } = string.Empty;
|
|
/// <summary>
|
|
/// 自定义值 任务完成后附带通知
|
|
/// </summary>
|
|
[SugarColumn(Length = 500)]
|
|
public string Tag { get; set; }
|
|
/// <summary>
|
|
///回调Api地址
|
|
/// </summary>
|
|
[SugarColumn(Length = 500)]
|
|
public string CallBackUrl { get; set; }
|
|
/// <summary>
|
|
/// 字幕缓存
|
|
/// </summary>
|
|
[SugarColumn(ColumnDataType = "longtext", IsNullable = true)]
|
|
public SegmentData[]? Captions { get; set; }
|
|
/// <summary>
|
|
/// 说话人日志解析缓存
|
|
/// </summary>
|
|
[SugarColumn(ColumnDataType = "longtext", IsNullable = true)]
|
|
public OfflineSpeakerRes[]? Speaker { get; set; }
|
|
/// <summary>
|
|
/// Chat模型分析缓存
|
|
/// </summary>
|
|
[SugarColumn(ColumnDataType = "longtext", IsNullable = true)]
|
|
public object[]? ChatAnalysis { get; set; }
|
|
/// <summary>
|
|
/// 消耗token
|
|
/// </summary>
|
|
public int TotalTokens { get; set; }
|
|
/// <summary>
|
|
/// 创建时间
|
|
/// </summary>
|
|
public DateTime CreateTime { get; set; } = DateTime.Now;
|
|
/// <summary>
|
|
/// 开始时间轴
|
|
/// </summary>
|
|
[SugarColumn(ColumnDataType = "varchar", Length =255)]
|
|
public Dictionary<RedisChannelEnum, DateTime> StartTime { get; set; }
|
|
|
|
|
|
}
|
|
}
|