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 Sys_DepartmentBase : 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 parentid { get; set; }

        /// <summary>
        /// 部门名称 ------------------------------------------------------------
        /// </summary>
        public string departmenname { get; set; }
        /// <summary>
        /// 编号
        /// </summary>
        public string code { get; set; }
        /// <summary>
        /// 手机号
        /// </summary>
        public string mobile { get; set; }
        /// <summary>
        /// 部门固定电话
        /// </summary>
        public string telephone { get; set; }
        /// <summary>
        /// 部门邮箱
        /// </summary>
        public string email { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        public string remark { get; set; }
        /// <summary>
        /// 排序
        /// </summary>
        public int sortnum { get; set; }

        /// <summary>
        /// 添加人工号 ------------------------------------------------------------
        /// </summary>
        public string createtby { get; set; }
        /// <summary>
        /// 添加人名字
        /// </summary>
        public string createbyname { get; set; }
        /// <summary>
        /// 添加时间
        /// </summary>
        public DateTime createtime { get; set; } = DateTime.Now;

        /// <summary>
        /// 修改人工号 ------------------------------------------------------------最后操作
        /// </summary>
        public string updateby { get; set; }
        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime updatetime { get; set; }

        /// <summary>
        /// 是否删除(0正常-1删除) ------------------------------------------------------------
        /// </summary>
        public int isdelete { get; set; } = 0;
        /// <summary>
        /// 删除人
        /// </summary>
        public string deleteby { get; set; }
        /// <summary>
        /// 删除时间
        /// </summary>
        public DateTime deletetime { get; set; }
    }
}
