Files
IOT_API/Model/Dto/System/FileStorageDto.cs
T

61 lines
2.2 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
namespace Model.Dto.System
{
/// <summary>
/// 文件存储配置 DTO
/// </summary>
public class FileStorageConfigDto
{
public string Id { get; set; }
public string Provider { get; set; }
public string Name { get; set; }
public string? Endpoint { get; set; }
/// <summary>回显时掩码(仅显示前后各 2 字符);写入时若为掩码样式则保留原值不变</summary>
public string? AccessKey { get; set; }
public string? SecretKey { get; set; }
public string? Bucket { get; set; }
public string? Region { get; set; }
public string? BasePath { get; set; }
public int MaxSizeMB { get; set; }
public string? AllowedExts { get; set; }
public byte IsDefault { get; set; }
public byte Status { get; set; }
public string? Remark { get; set; }
public DateTime? CreateTime { get; set; }
}
/// <summary>
/// 文件上传记录 DTO
/// </summary>
public class FileRecordDto
{
public string Id { get; set; }
public string FileName { get; set; }
public string? OriginalName { get; set; }
public string? Url { get; set; }
public long Size { get; set; }
public string? Ext { get; set; }
public string? Provider { get; set; }
public string StorageId { get; set; }
public string? Uploader { get; set; }
public string? BizType { get; set; }
public string? BizId { get; set; }
public DateTime? CreateTime { get; set; }
}
/// <summary>
/// 上传结果(Provider 返回,Service 写入 sys_file_record 时用)
/// </summary>
public class FileUploadResultDto
{
/// <summary>存储后的相对文件名(含路径,如 2026/09/18/snowflake.jpg</summary>
public string FileName { get; set; }
/// <summary>访问 URL</summary>
public string Url { get; set; }
/// <summary>扩展名</summary>
public string? Ext { get; set; }
/// <summary>文件大小(字节)</summary>
public long Size { get; set; }
public string Provider { get; set; }
}
}