using System.ComponentModel;
using System.Runtime.Serialization;
using DS.Module.Core;
using DS.WMS.Core.Op.Entity;
using SqlSugar;
namespace DS.WMS.Core.TaskInteraction.Entity
{
///
/// 业务任务日志表
///
[SugarTable("business_task_log", "业务任务日志表")]
public class BusinessTaskLog
{
///
/// ID
///
[SugarColumn(IsPrimaryKey = true, IsIdentity = true), IgnoreDataMember]
public long Id { get; set; }
///
/// 动作类型
///
[SugarColumn(ColumnDescription = "动作类型", IsNullable = false)]
public ActionType ActionType { get; set; }
///
/// 业务ID
///
[SugarColumn(ColumnDescription = "业务ID", IsNullable = false)]
public long BusinessId { get; set; }
///
/// 业务类型
///
[SugarColumn(ColumnDescription = "业务类型", IsNullable = false)]
public BusinessType? BusinessType { get; set; }
///
/// 任务类型
///
[SugarColumn(ColumnDescription = "任务类型", IsNullable = false)]
public TaskBaseTypeEnum TaskType { get; set; }
///
/// 任务状态
///
[SugarColumn(ColumnDescription = "任务状态", IsNullable = true)]
public TaskStatusEnum? TaskStatus { get; set; }
///
/// 审核状态
///
[SugarColumn(ColumnDescription = "审核状态", IsNullable = true)]
public FlowStatusEnum? AuditStatus { get; set; }
///
/// 接收人
///
[SugarColumn(ColumnDescription = "接收人", IsNullable = true)]
public string? RecvUsers { get; set; }
///
/// 获取接收人列表
///
[SugarColumn(IsIgnore = true)]
public string[] RecvUserIdArray => RecvUsers == null ? [] : RecvUsers.Split(',', StringSplitOptions.RemoveEmptyEntries);
///
/// 备注
///
[SugarColumn(ColumnDescription = "备注", IsNullable = true, ColumnDataType = "text")]
public string? Remark { get; set; }
///
/// 创建人
///
[SugarColumn(ColumnDescription = "创建人", IsNullable = false)]
public long CreateBy { get; set; }
///
/// 创建时间
///
[SugarColumn(ColumnDescription = "创建时间", IsNullable = false)]
public DateTime CreateTime { get; set; }
}
///
/// 动作类型
///
public enum ActionType
{
///
/// 未指定
///
[Description("未指定")]
Unspecified = 0,
///
/// 新增
///
[Description("新增")]
Create = 1,
///
/// 状态变更
///
[Description("状态变更")]
StatusChanged = 2,
///
/// 删除
///
[Description("删除")]
Delete = 10,
///
/// 审核
///
[Description("审核")]
Audit = 101,
///
/// 邮件服务
///
[Description("邮件服务")]
Mail = 201
}
}