Mission.cs 1.4 KB
using Common;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace DeviceLib.Model.AGV
{
    [Table("tbl_missions")]
    /// <summary>
    /// AGV任务信息
    /// </summary>
    public class Mission
    {
        /// <summary>
        /// 任务编号
        /// </summary>
       [Key]
        public int id { get; set; }
        /// <summary>
        /// 任务GUID,唯一。AGV通过该标识发送指定任务
        /// </summary>
        public string guid { get; set; }
        /// <summary>
        /// 任务名称
        /// </summary>
        public string name { get; set; }
        /// <summary>
        /// 别名
        /// </summary>
        public string alias { get; set; }
        /// <summary>
        /// 任务类型id
        /// </summary>
        public int type_id { get; set; }
        /// <summary>
        /// 任务类型
        /// </summary>
        [NotMapped]
        public MissionType type { get; set; }
        /// <summary>
        /// 任务组
        /// </summary>
        [NotMapped]
        public MissionGroup group { get; set; }
        /// <summary>
        /// 任务组id
        /// </summary>
        public int group_id { get; set; }
        public override string ToString()
        {
            return JsonHelper.SerializeObject(this);
        }
    }
}