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>
    [BsonIgnoreExtraElements]
    public class Distri_Workorder_UpdateRecord : 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计划工单）
        /// </summary>
        public int wotype { get; set; } = 0;
        /// <summary>
        /// 计划Id
        /// </summary>
        [BsonRepresentation(MongoDB.Bson.BsonType.ObjectId)]
        public string planid { get; set; }
        /// <summary>
        /// 计划任务Id
        /// </summary>
        [BsonRepresentation(MongoDB.Bson.BsonType.ObjectId)]
        public string plantaskid { get; set; }
        /// <summary>
        /// 内容
        /// </summary>
        public string detail { get; set; } = "";
        /// <summary>
        /// 渠道来源 1表示PC 2表示安卓 3表示IOS 4表示微信
        /// </summary>
        public int channel { get; set; } = 1;

        /// <summary>
        /// 是否同意修改(0无操作，1不同意，2同意)
        /// </summary>
        public int isagree { get; set; } = 0;
        /// <summary>
        /// 是否修改（0无操作 1已修改，2已取消工单）
        /// </summary>
        public int isupdate { get; set; } = 0;
        /// <summary>
        /// 申请类型（1需要修改，2需要取消）
        /// </summary>
        public int isupdatetype { get; set; } = 0;

        /// <summary>
        /// 处理人 -------------------------------------------
        /// </summary>
        public List<string> dealby { get; set; } = new List<string>();
        /// <summary>
        /// 处理时间
        /// </summary>
        public DateTime dealtime { get; set; }

        /// <summary>
        /// 添加人工号 -------------------------------------------
        /// </summary>
        public string createby { 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 deleteby { get; set; }
        /// <summary>
        /// 删除时间
        /// </summary>
        public DateTime deletetime { get; set; }
    }
}
