using SqlSugar; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using WCS.DAL.DbModels; namespace WCS.BLL.DbModels { /// /// 当前库存存量表 /// [SugarTable("wcs_agv_task")] public class AgvTask { /// /// 主键 自增Id /// [SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsNullable = false, IsIdentity = true)] public int Id { get; set; } #region 任务属性 /// /// 请求任务时的任务号 需要保证唯一性 /// [SugarColumn(ColumnName = "request_code", Length = 64, IsNullable = false, ColumnDescription = "请求任务时的任务号 需要保证唯一性")] public string RequestCode { get; set; } = Guid.NewGuid().ToString(); /// /// 任务类型 /// [SugarColumn(ColumnName = "task_type", Length = 64, IsNullable = false, ColumnDescription = "任务类型")] public string TaskType { get; set; } = string.Empty; /// /// 货架ID /// [SugarColumn(ColumnName = "start_location_id", IsNullable = true, ColumnDescription = "起点位置ID")] public int StratLocationId { get; set; } = 0; /// /// 起点位置编码 /// [SugarColumn(ColumnName = "start_location_code", Length = 64, IsNullable = true, ColumnDescription = "起点位置编码")] public string StartLocationCode { get; set; } = string.Empty ; /// /// 货架ID /// [SugarColumn(ColumnName = "end_location_id", IsNullable = true, ColumnDescription = "终点位置ID")] public int EndLocationId { get; set; } = 0; /// /// 终点位置编码 /// [SugarColumn(ColumnName = "end_location_code", Length = 64, IsNullable = true, ColumnDescription = "终点位置编码")] public string EndLocationCode { get; set; } = string.Empty; /// /// AGV编号 /// [SugarColumn(ColumnName = "agv_code", Length = 64, IsNullable = true, ColumnDescription = "AGV编号")] public string AgvCode { get; set; } = string.Empty; /// /// 任务发起人 /// [SugarColumn(ColumnName = "create_user", IsNullable = true, Length = 64, ColumnDescription = "任务发起人")] public string? CreateUser { get; set; } /// /// 任务创建时间 /// [SugarColumn(ColumnName = "create_time", IsNullable = true, ColumnDescription = "任务创建时间")] public DateTime? CreateTime { get; set; } = DateTime.Now; #endregion /// /// 序号 /// [SugarColumn(IsIgnore = true)] public int RowNumber { get; set; } /// /// 是否已经选择 /// [SugarColumn(IsIgnore = true)] public bool IsSelected { get; set; } } //1-已创建,2-正在执行,5-取消完成,9-已结束, 10-被打断 public enum TaskStatusEnum { 已创建 = 1, 正在执行 = 2, 取消完成 = 5, 已结束 = 9, 被打断 = 10, } }