using System;
using System.Collections.Generic;
using System.Text;

namespace SlnMesnac.Model.AirportApiEntity
{
    /// <summary>
    /// 下发任务请求实体类
    /// </summary>
    public class AGVRequestAddTaskEntity
    {
        /// <summary>
        /// 任务单ID-AGVC的任务ID
        /// </summary>
        public string businessOrderId { get; set; }

        /// <summary>
        /// 设备类型
        /// </summary>
        public string RobotType { get; set; }

        /// <summary>
        /// 优先级 默认值0
        /// </summary>
        public int priority { get; set; } = 0;

        /// <summary>
        /// 机器人ID
        /// </summary>
        public string roborId { get; set; }

        /// <summary>
        /// 分组ID 默认空
        /// </summary>
        public string group { get; set; } = string.Empty;

        /// <summary>
        /// 任务来源，调度系统名称 默认值Mesnac
        /// </summary>
        public string taskSource { get; set; } = "Mesnac";

        /// <summary>
        /// 任务类型 0)none 默认值3
        /// </summary>
        public int taskType { get; set; } = 3;

        /// <summary>
        /// 验证任务 0：不验证 1：需要验证 传0
        /// </summary>
        public int verifyStatus { get; set; }

        /// <summary>
        /// 是否允许分⻋执⾏(默认FALSE) 
        /// </summary>
        public int? enableSplitCar { get; set; }

        /// <summary>
        /// 任务描述
        /// </summary>
        public string? desc { get; set; }

        /// <summary>
        /// 装货点
        /// </summary>
        public List<LoadsEntity> load { get; set; }

        /// <summary>
        /// 卸货点
        /// </summary>
        public List<LoadsEntity> unload { get; set; }
    }

    /// <summary>
    /// 装载/卸载点位
    /// </summary>
    public class LoadsEntity
    {
        /// <summary>
        /// 任务模板 默认空字符串
        /// </summary>
        public string jobid { get; set; } = string.Empty;

        /// <summary>
        /// 地图中的点位 默认空字符串
        /// </summary>
        public string loaction { get; set; } = string.Empty;

        /// <summary>
        /// 参数 数据跟location一样
        /// </summary>
        public List<ParamEntity> param { get; set; }

        /// <summary>
        ///  默认空字符串
        /// </summary>
        public string robotPort { get; set; } = string.Empty;
    }

    /// <summary>
    /// 不知道是啥 paramvalue点位跟load一样
    /// </summary>
    public class ParamEntity
    {
        /// <summary>
        /// 参数名称 默认空字符串
        /// </summary>
        public string paramname { get; set; } = string.Empty;

        /// <summary>
        /// 参数值 默认空字符串
        /// </summary>
        public string paramvalue { get; set; } = string.Empty;
    }

    /// <summary>
    /// 下发任务成功响应数据
    /// </summary>
    public class ResponseAddTaskDataEntity
    {
        /// <summary>
        /// AGV任务ID
        /// </summary>
        public string guid { get; set; }
    }
}
