using TakeoutSaaS.Application.Storage.Enums;

namespace TakeoutSaaS.Application.Storage.Contracts;

/// <summary>
/// 上传文件请求模型。
/// </summary>
/// <remarks>
/// 创建上传文件请求。
/// </remarks>
public sealed class UploadFileRequest(
    UploadFileType fileType,
    Stream content,
    string fileName,
    string contentType,
    long contentLength,
    string? requestOrigin)
{
    /// <summary>
    /// 文件分类。
    /// </summary>
    public UploadFileType FileType { get; } = fileType;

    /// <summary>
    /// 文件流。
    /// </summary>
    public Stream Content { get; } = content;

    /// <summary>
    /// 原始文件名。
    /// </summary>
    public string FileName { get; } = fileName;

    /// <summary>
    /// 内容类型。
    /// </summary>
    public string ContentType { get; } = contentType;

    /// <summary>
    /// 文件大小。
    /// </summary>
    public long ContentLength { get; } = contentLength;

    /// <summary>
    /// 请求来源（Origin/Referer）。
    /// </summary>
    public string? RequestOrigin { get; } = requestOrigin;
}
