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

namespace MadRunFabric.Model
{
    /// <summary>
    /// 保养工单处理轨迹表
    /// </summary>
    public class Wo_Maintain_Items : IBaseModel<string>
    {
        /// <summary>
        /// id
        /// </summary>
        [Key]
        [BsonRepresentation(MongoDB.Bson.BsonType.ObjectId)]
        public string id { get; set; }
        /// <summary>
        /// 工单id
        /// </summary>
        [BsonRepresentation(MongoDB.Bson.BsonType.ObjectId)]
        public string woid { get; set; }
        /// <summary>
        /// 工单编号
        /// </summary>
        public string wocode { get; set; } = "";

        /// <summary>
        /// 任务状态:0创建工单，1已转派，2挂起，9已完成
        /// </summary>
        public int wostate { get; set; } = 0;
        /// <summary>
        /// 当前记录的状态 0进行中，1已结束
        /// </summary>
        public int itemstate { get; set; } = 0;
        /// <summary>
        /// 是否催办（0不催办1催办）
        /// </summary>
        public int ishasten { get; set; } = 0;
        /// <summary>
        /// 指定处理人
        /// </summary>
        public string touser { get; set; } = "";
        /// <summary>
        /// 指定处理部门
        /// </summary>
        public string todept { get; set; } = "";
        /// <summary>
        /// 处理内容
        /// </summary>
        public string detail { get; set; } = "";
        ///// <summary>
        ///// 附件
        ///// </summary>
        //public List<FileBaseModel> files { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        public string remark { get; set; } = "";

        /// <summary>
        /// 处理人
        /// </summary>
        public string dealuser { get; set; } = "";
        /// <summary>
        /// 处理时间
        /// </summary>
        public DateTime dealtime { get; set; }


        /// <summary>
        /// 是否最后一步 0否 1是
        /// </summary>
        public int islast { get; set; } = 0;
        /// <summary>
        /// 接单人工号
        /// </summary>
        public string sureuser { get; set; } = "";
        /// <summary>
        /// 确认时间
        /// </summary>
        public DateTime suretime { get; set; }

        /// <summary>
        /// 提交时间
        /// </summary>
        public DateTime createtime { get; set; }

        /// <summary>
        /// 提交人
        /// </summary>
        public string createby { get; set; } = "";
        /// <summary>
        /// 是否删除
        /// </summary>
        public bool isdelete { get; set; } = false;
    }
}
