namespace OCES.Resonance.Core;

/// <summary>
/// 音频文件元数据实体类，对应音频资产管理系统中的文件记录
/// </summary>
public class AudioFileMeta
{
#region 必备条目
    /// <summary>主键ID，音频文件的唯一数字标识符</summary>
    public required int Id { get; set; }

    /// <summary>全局唯一标识符，通常为UUID，用于跨系统识别</summary>
    public required string UniqueId { get; set; }
    
    /// <summary>文件的MD5值，用于查重</summary>
    public required string Md5 { get; set; }
    
    /// <summary>原始导入路径，音频文件被导入时的完整文件路径</summary>
    public required string Path { get; set; }

    /// <summary>文件名，包含扩展名的音频文件名称（如 sound.wav）</summary>
    public required string Filename { get; set; }

    /// <summary>文件夹，文件所在的文件夹名称</summary>
    public required string Folder { get; set; }

    /// <summary>目录，文件的存储目录路径</summary>
    public required string Directory { get; set; }
    
    /// <summary>时长，音频文件的播放长度（通常以秒为单位）</summary>
    public required double Duration { get; set; }
    
    /// <summary>时长，以采样数记录的时长</summary>
    public required uint TotalSamples { get; set; }

    /// <summary>位深度，音频采样位深（如 16、24、32 bit）</summary>
    public required int BitDepth { get; set; }

    /// <summary>声道数，如 1=单声道、2=立体声、6=5.1环绕声</summary>
    public required int Channels { get; set; }

    /// <summary>采样率，如 44100、48000、96000 Hz</summary>
    public required int SampleRate { get; set; }

    /// <summary>文件类型，音频格式（WAV、MP3、AIFF、FLAC等）</summary>
    public required string Type { get; set; }
    
    /// <summary>导入日期，音频入库的时间</summary>
    public required DateTime DateAdded { get; set; }

    /// <summary>修改日期，音频创建或录制的日期</summary>
    public required DateTime OriginalModificationDate { get; set; }
    
    /// <summary>创建时间，音频文件的原始创建时间</summary>
    public required DateTime OriginationTime { get; set; }
    
#endregion

    /// <summary>短ID，便于人工识别或显示的简短标识</summary>
    public string? ShortId { get; set; }

    /// <summary>节拍速度，每分钟节拍数，用于音乐类音频</summary>
    public double? Bpm { get; set; }

    /// <summary>帧率，视频同步用的时间基准（如 24fps、25fps、30fps）</summary>
    public string? FrameRate { get; set; }

    /// <summary>时间码，用于音视频同步的时间戳信息</summary>
    public int? Timecode { get; set; }

    /// <summary>描述，音频内容的文字说明</summary>
    public string? Description { get; set; }

    /// <summary>分类，音频的大类（如：音效、音乐、对白、环境音）</summary>
    public string? Category { get; set; }

    /// <summary>子分类，更细分的类别（如：交通→汽车→引擎）</summary>
    public string? Subcategory { get; set; }
    
    /// <summary> CatId </summary>
    public string? CatId { get; set; }
    
    public string? CategoryFull { get; set; }

    /// <summary>流派，音乐风格分类（如：摇滚、古典、电子）</summary>
    public string? Genre { get; set; }

    /// <summary>风格，更具体的风格描述</summary>
    public string? Style { get; set; }

    /// <summary>情绪，音频传达的情感氛围（如：紧张、欢快、悲伤）</summary>
    public string? Mood { get; set; }

    /// <summary>关键词，用于搜索的标签，多个关键词通常用逗号分隔</summary>
    public string? Keywords { get; set; }

    /// <summary>评分，音频质量或推荐度评分（如 0-5星）</summary>
    public uint? Rating { get; set; }

    /// <summary>艺术家，表演者或演奏者名称</summary>
    public string? Artist { get; set; }

    /// <summary>作曲家，音乐创作者</summary>
    public string? Composer { get; set; }

    /// <summary>设计师，音效设计师名称</summary>
    public string? Designer { get; set; }

    /// <summary>录音师，现场录音人员</summary>
    public string? Recordist { get; set; }

    /// <summary>出版商，发行方或版权持有方</summary>
    public string? Publisher { get; set; }

    /// <summary>制造商，音频库或设备的制作方</summary>
    public string? Manufacturer { get; set; }

    /// <summary>来源方，原始创建者或来源机构</summary>
    public string? Originator { get; set; }

    /// <summary>来源引用，原始来源的参考编号</summary>
    public string? OriginatorRef { get; set; }

    /// <summary>项目名称，所属制作项目</summary>
    public string? ProjectName { get; set; }

    /// <summary>音频库，所属音效库或音乐库的名称</summary>
    public string? Library { get; set; }

    /// <summary>CD标题，原始CD专辑名称</summary>
    public string? CdTitle { get; set; }

    /// <summary>曲目标题，音乐或音轨的标题</summary>
    public string? TrackTitle { get; set; }

    /// <summary>剧集，所属剧集或系列编号</summary>
    public string? Episode { get; set; }

    /// <summary>场景，对应的影视场景标识</summary>
    public string? Scene { get; set; }

    /// <summary>条次，录音的版本号或拍摄条次</summary>
    public string? Take { get; set; }

    /// <summary>磁带，原始磁带编号（历史遗留字段）</summary>
    public string? Tape { get; set; }

    /// <summary>提示号，播放列表或乐谱中的编号</summary>
    public int? CueNumber { get; set; }

    /// <summary>同步点，用于音视频同步的参考点</summary>
    public int? SyncPoint { get; set; }
    
    public DateTime? ReleaseDate { get; set; }

    public string? TrackYear { get; set; }
    
    /// <summary>是否已编辑，布尔值（0=否，1=是）</summary>
    public bool? IsEdited { get; set; }

    /// <summary>是否已分割，布尔值，标记是否从长文件中分割出来</summary>
    public bool? IsSplit { get; set; }

    /// <summary>位置，录音地点或存储位置</summary>
    public string? Location { get; set; }

    /// <summary>分组，用于组织管理的分组标识</summary>
    public string? Group { get; set; }

    /// <summary>标记点，音频内的关键时间点标记</summary>
    public string? Markers { get; set; }

    /// <summary>注释，用户或系统添加的备注</summary>
    public string? Comments { get; set; }

    /// <summary>备注，额外的说明信息</summary>
    public string? Notes { get; set; }

    /// <summary>版权，版权声明信息</summary>
    public string? Copyright { get; set; }

    /// <summary>编码历史，BWF格式的编码历史记录</summary>
    public string? CodingHistory { get; set; }

    /// <summary>麦克风，录音使用的麦克风型号或设置</summary>
    public string? Microphone { get; set; }
    
    public string? MicPerspective { get; set; }

    // 用户自定义字段（共8个）

    /// <summary>用户自定义字段1</summary>
    public string? User1 { get; set; }

    /// <summary>用户自定义字段2</summary>
    public string? User2 { get; set; }

    /// <summary>用户自定义字段3</summary>
    public string? User3 { get; set; }

    /// <summary>用户自定义字段4</summary>
    public string? User4 { get; set; }

    /// <summary>用户自定义字段5</summary>
    public string? User5 { get; set; }

    /// <summary>用户自定义字段6</summary>
    public string? User6 { get; set; }

    /// <summary>用户自定义字段7</summary>
    public string? User7 { get; set; }

    /// <summary>用户自定义字段8</summary>
    public string? User8 { get; set; }
}
