using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json.Linq;

namespace MisDataSaveDate
{
    /// <summary>
    /// AGV进入请求实体类
    /// </summary>
    public class AGV_EnterRequest
    {
        /// <summary>
        /// 请求编号，每个请求都要一个唯一编号，同一个请求重复提交，使用同一编号
        /// </summary>
        public string reqCode { get; set; }

        /// <summary>
        /// 请求时间戳，格式: "yyyy-MM-dd HH:mm:ss"
        /// </summary>
        public string reqTime { get; set; }

        /// <summary>
        /// 地码 X 坐标(mm)：任务完成时有值
        /// </summary>
        public string cooX { get; set; }

        /// <summary>
        /// 地码 Y 坐标(mm)：任务完成时有值
        /// </summary>
        public string cooY { get; set; }

        /// <summary>
        /// 当前位置编号
        /// </summary>
        public string currentPositionCode { get; set; }

        /// <summary>
        /// 自定义字段，不超过2000个字符
        /// </summary>
        public object data { get; set; }

        /// <summary>
        /// 地图编号
        /// </summary>
        public string mapCode { get; set; }

        /// <summary>
        /// 地码编号：任务完成时有值
        /// </summary>
        public string mapDataCode { get; set; }

        /// <summary>
        /// 仓位编号：叉车与CTU任务时有值
        /// </summary>
        public string stgBinCode { get; set; }

        /// <summary>
        /// 方法名, apply: 申请进入；release：申请离开
        /// </summary>
        public string method { get; set; }

        /// <summary>
        /// 货架编号：背货架时有值
        /// </summary>
        public string podCode { get; set; }

        /// <summary>
        /// "180","0","90","-90" 分别对应地图的"左","右","上","下"：任务完成时有值
        /// </summary>
        public string podDir { get; set; }

        /// <summary>
        /// 物料编号
        /// </summary>
        public string materialLot { get; set; }

        /// <summary>
        /// AGV编号（同 agvCode）
        /// </summary>
        public string robotCode { get; set; }

        /// <summary>
        /// 当前任务单号
        /// </summary>
        public string taskCode { get; set; }

        /// <summary>
        /// 工作位，与RCS-2000端配置的位置名称一致。任务完成时有值，与生成任务单接口中的wbCode一致
        /// </summary>
        public string wbCode { get; set; }

        /// <summary>
        /// 容器编号
        /// </summary>
        public string ctnrCode { get; set; }

        /// <summary>
        /// 容器类型
        /// </summary>
        public string ctnrType { get; set; }

        /// <summary>
        /// 巷道编号
        /// </summary>
        public string roadWayCode { get; set; }

        /// <summary>
        /// 巷道内顺序号，巷道尾是0，到巷道头依次递增1
        /// </summary>
        public string seq { get; set; }

        /// <summary>
        /// 设备编号，如梳齿式工作站、输送线等，一般使用于CTU场景。系统根据仓位定位到关联的设备编号
        /// </summary>
        public string eqpCode { get; set; }
    }

    /// <summary>
    /// AGV请求反馈实体类
    /// </summary>
    public class AGV_FeedbackRequest
    {
        /// <summary>
        /// 请求编号
        /// </summary>
        public string reqCode { get; set; }
        
        /// <summary>
        /// 任务单号
        /// </summary>
        public string taskCode { get; set; }
    }

    /// <summary>
    /// AGV接口通用响应类
    /// </summary>
    public class AGV_Response
    {
        /// <summary>
        /// 返回码 "0"表示成功
        /// </summary>
        public string code { get; set; }
        
        /// <summary>
        /// 返回消息
        /// </summary>
        public string message { get; set; }
        
        /// <summary>
        /// 请求编号
        /// </summary>
        public string reqCode { get; set; }

        public AGV_Response()
        {
            code = "0";
            message = "成功";
            reqCode = "";
        }
    }
}