irc-netcore-api/IRaCIS.Core.Domain/Image/FileUploadRecord.cs

93 lines
1.8 KiB
C#

namespace IRaCIS.Core.Domain.Models;
[Comment("整个系统,上传记录表")]
[Table("FileUploadRecord")]
public class FileUploadRecord : BaseFullAuditEntity
{
#region 导航属性
[JsonIgnore]
public Trial Trial { get; set; }
public Subject Subject { get; set; }
public SubjectVisit SubjectVisit { get; set; }
#endregion
public Guid? TrialId { get; set; }
public Guid? SubjectId { get; set; }
public Guid? SubjectVisitId { get; set; }
public string FileName { get; set; }
public long FileSize { get; set; }
public string FileType { get; set; }
public string UploadRegion { get; set; }
[Comment("上传结束时间")]
public DateTime UploadFinishedTime { get; set; }
[StringLength(1000)]
public string Path { get; set; }
[Comment("文件标识ID")]
public string FileMarkId { get; set; }
[Comment("是否需要同步")]
public bool? IsNeedSync { get; set; }
[Comment("是否已同步-最后一个任务的状态")]
public bool? IsSync { get; set; }
[Comment("同步结束时间-最后一个任务的时间")]
public DateTime? syncFinishedTime { get; set; }
public string IP { get; set; }
}
[Comment("同步任务记录表")]
[Table("UploadFileSyncRecord")]
public class UploadFileSyncRecord : BaseFullAuditEntity
{
#region 导航属性
[JsonIgnore]
public FileUploadRecord FileUploadRecord { get; set; }
#endregion
public Guid FileUploadRecordId { get; set; }
public int Priority { get; set; }
public DateTime? StartTime { get; set; }
public DateTime? EndTime { get; set; }
public jobState JobState { get; set; }
public string Msg { get; set; }
}
public enum jobState
{
//待启动
PENDING= 0,
//上传中
RUNNING= 1,
SUCCESS= 2,
FAILED= 3,
CANCELLED= 4
}