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