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

namespace MadRunFabric.Model.EquipmentApi.Model
{
    /// <summary>
    /// 工单超时记录表
    /// </summary>
    [BsonIgnoreExtraElements]
    public class Wo_TimeOut_Items : IBaseModel<string>
    {
        /// <summary>
        /// id
        /// </summary>
        [Key]
        [BsonRepresentation(MongoDB.Bson.BsonType.ObjectId)]
        public string id { get; set; }
        /// <summary>
        /// 超时工单id
        /// </summary>
        public string wotoid { get; set; } = "";
        /// <summary>
        /// 超时时长
        /// </summary>
        public int times { get; set; } = 0;
        /// <summary>
        /// 操作备注
        /// </summary>
        public string optremark { get; set; } = "";
        /// <summary>
        /// 操作类型：0系统自动，1人为操作
        /// </summary>
        public int opttype { get; set; } = 0;
        /// <summary>
        /// 提交人
        /// </summary>
        public string createby { get; set; } = "";
        /// <summary>
        /// 提交时间
        /// </summary>
        public DateTime createtime
        {
            get
            {
                return _createtime.ToLocalTime();
            }
            set
            {
                _createtime = value.ToLocalTime();
            }
        }
        private DateTime _createtime;
    }
    /// <summary>
    /// 操作类型：0系统自动，1人为操作
    /// </summary>
    public enum EnumWoOptType
    {
        auto = 0,
        person = 1
    }
}
