using MadRunFabric.Common;
using MongoDB.Bson.Serialization.Attributes;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.IO;
using System.Linq;
using System.Text;

namespace MadRunFabric.Model.WorkOrderApi
{
    public class Bus_WorkOrder_Item : IBaseModel<string>
    {
        /// <summary>
        /// id
        /// </summary>
        [Key]
        [BsonRepresentation(MongoDB.Bson.BsonType.ObjectId)]
        public string id { get; set; }

        /// <summary>
        /// 工单编号
        /// </summary>
        public string ordercode { get; set; }
        /// <summary>
        /// 工单状态:0创建，1待处理，9完成  （暂时不用：0创建，1待接单，2催办，3转派，9完成）
        /// </summary>
        public int state { get; set; } = 0;

        /// <summary>
        /// 工单类型
        /// </summary>
        [BsonRepresentation(MongoDB.Bson.BsonType.ObjectId)]
        public string  typeid { get; set; }

        /// <summary>
        /// 接单人
        /// </summary>
        public string touser { get; set; }
        /// <summary>
        /// 接单部门
        /// </summary>
        public string todept { get; set; }
        /// <summary>
        /// 指派时间
        /// </summary>
        public DateTime? zptime { get; set; } = DateTime.Now;

        /// <summary>
        /// 指派人姓名
        /// </summary>
        public string zpusercode { get; set; }

        /// <summary>
        /// 指派备注
        /// </summary>
        public string zpcontent { get; set; }

        /// <summary>
        /// 详细信息
        /// </summary>
        public string detail { get; set; }

        /// <summary>
        /// 期限
        /// </summary>
        public string limittime { get; set; }
        /// <summary>
        /// 确认用户
        /// </summary>
        public string sureuser { get; set; }
        /// <summary>
        /// 确认时间
        /// </summary>
        public DateTime? suretime { get; set; } = DateTime.Now;
        /// <summary>
        /// 处理用户
        /// </summary>
        public string dealuser { get; set; }
        /// <summary>
        /// 处理时间
        /// </summary>
        public DateTime? dealtime { get; set; } = DateTime.Now;
        /// <summary>
        /// 
        /// </summary>
        public int islast { get; set; } = 0;
        /// <summary>
        /// 
        /// </summary>
        public int isstart { get; set; } = 0;
        /// <summary>
        /// 是否超时
        /// </summary>
        public int istimeout { get; set; } = 0;
        /// <summary>
        /// 创建人
        /// </summary>
        public string createuser { get; set; }

        /// <summary>
        /// 创建人姓名
        /// </summary>
        public string createusername { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? createtime { get; set; } = DateTime.Now;
        /// <summary>
        /// 是否删除（0正常1删除）
        /// </summary>
        public int isdelete { get; set; } = 0;
        /// <summary>
        /// 删除用户
        /// </summary>
        public string deleteuser { get; set; }
        /// <summary>
        /// 删除时间
        /// </summary>
        public DateTime? deletetime { get; set; }

        /// <summary>
        /// 协助人
        /// </summary>
        public string helper { get; set; }
        /// <summary>
        /// 协助内容
        /// </summary>
        public string helpcontent { get; set; }
    }

}
