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

namespace MadRunFabric.Model
{
    public class Distri_Workorder_Exception : 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 projectid { get; set; }
        /// <summary>
        /// 工单id -------------------------------------------
        /// </summary>
        [BsonRepresentation(MongoDB.Bson.BsonType.ObjectId)]
        public string woid { get; set; }
        /// <summary>
        /// 工单编号
        /// </summary>
        public string wocode { get; set; }
        /// <summary>
        /// 异常类型 1完结配送异常 2取货异常 ---------------------------------
        /// </summary>
        public int type { get; set; } = 1;
        /// <summary>
        /// 是否送达/是否退单（0否1是） - 异常上报
        /// </summary>
        public int isback_sended { get; set; } = 0;
        /// <summary>
        /// 异常内容
        /// </summary>
        public string content { get; set; }
        /// <summary>
        /// 异常附件
        /// </summary>
        public List<FileBaseModel> files { get; set; }

        /// <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 deleteby { get; set; }
        /// <summary>
        /// 删除时间
        /// </summary>
        public DateTime? deletetime { get; set; }
    }
}
