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

namespace MessageApi.Model
{
    public class MessageListDto
    {
        /// <summary>
        /// id编号
        /// </summary>
        public string id { get; set; }
        /// <summary>
        /// 工单来源： 维修订单 = 1, 保养订单 = 2, 保养计划订单 = 3，超时工单 = 4
        /// </summary>
        public int channelcode { get; set; }
        /// <summary>
        /// 工单类型： 报修 = 1, 保养 = 2, 巡检 = 3
        /// </summary>
        public int wotype { get; set; }
        /// <summary>
        /// 工单状态:0创建工单，1已转派（转派或者抢单），2已处理，3已评价，6挂起，7挂起，8已取消，9已完成，99超时
        /// </summary>
        public int wostate { get; set; }
        /// <summary>
        /// 工单编号
        /// </summary>
        public string wocode { get; set; } = "";
        /// <summary>
        /// 工单id
        /// </summary>
        public string woid { get; set; }
        /// <summary>
        /// 项目名称
        /// </summary>
        public string proname { get; set; }
        /// <summary>
        /// 标题
        /// </summary>
        public string title { get; set; }
        /// <summary>
        /// 接单人（转派）
        /// </summary>
        public string checkby { get; set; }
        /// <summary>
        /// 内容
        /// </summary>
        public string content { get; set; }
        /// <summary>
        /// 工单状态
        /// </summary>
        public string statename { get; set; }
        /// <summary>
        /// 创建人id
        /// </summary>
        public string createby { get; set; }
        public DateTime createtime
        {
            get
            {
                return _createtime.ToLocalTime();
            }
            set
            {
                _createtime = value.ToLocalTime();
            }
        }
        private DateTime _createtime = DateTime.Now.ToLocalTime();
        /// <summary>
        /// 是否已读 (0未读【推送消息】，1已读)
        /// </summary>
        public int isread { get; set; } = 0;
    }
}
