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_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计划工单/）
        /// </summary>
        public int wotype { get; set; } = 0;
        /// <summary>
        /// 配送工单状态:0创建工单，1转派或者抢单（待取货）,2已取货（配送中）,3货物异常（异常），4已完结/待评价，5已取消，6挂起，7退单，9已评价 
        /// </summary>
        public int wostate { get; set; } = 0;
        /// <summary>
        /// 处理内容
        /// </summary>
        public string detail { get; set; }
        /// <summary>
        /// 货物异常（异常） 0正常，1异常 
        /// </summary>
        public int equipstate { get; set; } = 0;
        /// <summary>
        /// 异常说明
        /// </summary>
        public string exceptions { get; set; }
        /// <summary>
        /// 渠道来源 1表示PC 2表示安卓 3表示IOS 4表示微信
        /// </summary>
        public int channel { get; set; } = 1;
        ///// <summary>
        ///// 当前记录的状态 0进行中，1已结束
        ///// </summary>
        //public int itemstate { get; set; } = 0;
        /// <summary>
        /// 满意度打分☆☆☆☆☆
        /// （注：其中默认都是5星，最低只能打1星，每一星对应20分，合计100分）
        /// </summary>
        public int starnum { get; set; }

        /// <summary>
        /// 处理人 -------------------------------------------
        /// </summary>
        public List<string> dealby { get; set; } = new List<string>();
        /// <summary>
        /// 处理时间
        /// </summary>
        public DateTime dealtime { get; set; }
        /// <summary>
        /// 是否最后一步 0否 1是
        /// </summary>
        public int islast { get; set; } = 0;

        /// <summary>
        /// 接单人工号 -------------------------------------------
        /// </summary>
        public List<string> sureuser { get; set; } = new List<string>();
        /// <summary>
        /// 确认时间
        /// </summary>
        public DateTime suretime { get; set; }

        /// <summary>
        /// 当前记录的状态 0进行中，1已结束
        /// </summary>
        public int itemstate { get; set; } = 0;

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

    }
}
