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 Bus_Order_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已处理
        /// </summary>
        public int state { get; set; } = 0;
        /// <summary>
        /// 内容
        /// </summary>
        public string detail { get; set; }
        /// <summary>
        /// 附件
        /// </summary>
        public List<FileBaseModel> files { get; set; } = new List<FileBaseModel>();


        /// <summary>
        /// 创建人工号
        /// </summary>
        public string createuser { get; set; }
        /// <summary>
        /// 创建人姓名
        /// </summary>
        public string createusername { get; set; }
        /// <summary>
        /// 创建部门id
        /// </summary>
        [BsonRepresentation(MongoDB.Bson.BsonType.ObjectId)]
        public string createdeptid { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime createtime { get; set; }
        /// <summary>
        /// 是否删除
        /// </summary>
        public int isdelete { get; set; }
        /// <summary>
        /// 删除用户
        /// </summary>
        public string deleteuser { get; set; }
        /// <summary>
        /// 删除时间
        /// </summary>
        public DateTime? deletetime { get; set; }
    }
}
