70 lines
2.0 KiB
C#
Raw Permalink Normal View History

2024-06-07 11:04:26 +08:00
namespace ZR.Model.System
2021-08-23 16:57:25 +08:00
{
2021-11-27 09:43:04 +08:00
[Tenant("0")]
2023-06-07 22:28:06 +08:00
[SugarTable("sys_file", "文件存储表")]
2021-08-23 16:57:25 +08:00
public class SysFile
{
2021-12-16 11:29:03 +08:00
/// <summary>
2023-05-04 18:20:18 +08:00
/// 自增id
2021-12-16 11:29:03 +08:00
/// </summary>
2022-03-10 21:39:46 +08:00
[JsonConverter(typeof(ValueToStringConverter))]
[SugarColumn(IsPrimaryKey = true)]
2021-12-16 11:29:03 +08:00
public long Id { get; set; }
/// <summary>
2022-03-23 14:01:45 +08:00
/// 文件原名
2021-12-23 21:22:38 +08:00
/// </summary>
public string RealName { get; set; }
/// <summary>
/// 文件类型
/// </summary>
public string FileType { get; set; }
/// <summary>
2023-05-04 18:20:18 +08:00
/// 存储文件名
2021-12-16 11:29:03 +08:00
/// </summary>
2021-08-23 16:57:25 +08:00
public string FileName { get; set; }
2021-12-16 11:29:03 +08:00
/// <summary>
2023-05-04 18:20:18 +08:00
/// 文件存储地址 eg/uploads/20220202
2021-12-16 11:29:03 +08:00
/// </summary>
public string FileUrl { get; set; }
/// <summary>
2023-05-04 18:20:18 +08:00
/// 仓库位置 eg/uploads
2021-12-16 11:29:03 +08:00
/// </summary>
2021-08-23 16:57:25 +08:00
public string StorePath { get; set; }
2021-12-16 11:29:03 +08:00
/// <summary>
2023-05-04 18:20:18 +08:00
/// 文件大小
2021-12-16 11:29:03 +08:00
/// </summary>
public string FileSize { get; set; }
/// <summary>
2023-05-04 18:20:18 +08:00
/// 文件扩展名
2021-12-16 11:29:03 +08:00
/// </summary>
2021-08-23 16:57:25 +08:00
public string FileExt { get; set; }
2021-12-16 11:29:03 +08:00
/// <summary>
2023-05-04 18:20:18 +08:00
/// 创建人
2021-12-16 11:29:03 +08:00
/// </summary>
public string Create_by { get; set; }
/// <summary>
2023-05-04 18:20:18 +08:00
/// 上传时间
2021-12-16 11:29:03 +08:00
/// </summary>
public DateTime? Create_time { get; set; }
/// <summary>
2023-05-04 18:20:18 +08:00
/// 存储类型
2021-12-16 11:29:03 +08:00
/// </summary>
public int? StoreType { get; set; }
/// <summary>
2023-05-04 18:20:18 +08:00
/// 访问路径
2021-12-16 11:29:03 +08:00
/// </summary>
public string AccessUrl { get; set; }
2022-03-22 22:01:47 +08:00
public SysFile() { }
2022-03-26 20:23:47 +08:00
public SysFile(string originFileName, string fileName, string ext, string fileSize, string storePath, string create_by)
2022-03-22 22:01:47 +08:00
{
StorePath = storePath;
2022-03-23 14:01:45 +08:00
RealName = originFileName;
2022-03-22 22:01:47 +08:00
FileName = fileName;
FileExt = ext;
FileSize = fileSize;
Create_by = create_by;
Create_time = DateTime.Now;
}
2021-08-23 16:57:25 +08:00
}
2021-12-16 11:29:03 +08:00
}