using SqlSugar;
using System;
using System.Collections.Generic;

namespace DeviceRepair.Models
{
    [Serializable]
    [SugarTable("UserInfo")]
    public class UserInfoModel
    {
        public UserInfoModel()
        {
            this.GUID = Guid.NewGuid();
        }

        /// <summary>
        /// 自增长ID主键
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int AutoID { get; set; }

        [SugarColumn(ColumnName = "GUID")]
        public Guid GUID { get; set; }

        /// <summary>
        /// 登录名
        /// </summary>
        [SugarColumn(ColumnName = "LoginCode")]
        public string LoginCode { get; set; }

        /// <summary>
        /// 密码
        /// </summary>
        [SugarColumn(ColumnName = "PassWord")]
        public string PassWord { get; set; }

        /// <summary>
        /// 真实姓名
        /// </summary>
        [SugarColumn(ColumnName = "RealName")]
        public string RealName { get; set; }

        /// <summary>
        /// 性别
        /// </summary>
        [SugarColumn(ColumnName = "Gender")]
        public int Gender { get; set; }

        /// <summary>
        /// 出生日期
        /// </summary>
        [SugarColumn(ColumnName = "Birthday")]
        public DateTime Birthday { get; set; }

        /// <summary>
        /// 联系电话
        /// </summary>
        [SugarColumn(ColumnName = "Phone")]
        public string Phone { get; set; }

        /// <summary>
        /// 邮箱
        /// </summary>
        [SugarColumn(ColumnName = "Email")]
        public string Email { get; set; }

        /// <summary>
        /// 权限组
        /// </summary>
        [SugarColumn(ColumnName = "RoleGroup")]
        public int RoleGroup { get; set; }

        /// <summary>
        /// 权限列表
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public List<AuthModel> AuthItems { get; set; }

        /// <summary>
        /// 状态
        /// </summary>
        [SugarColumn(ColumnName = "Status")]
        public bool Status { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        [SugarColumn(ColumnName = "CreateBy")]
        public int CreateBy { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [SugarColumn(ColumnName = "CreateDate")]
        public DateTime CreateDate { get; set; }

        /// <summary>
        /// 修改人
        /// </summary>
        [SugarColumn(ColumnName = "ModifyBy")]
        public int ModifyBy { get; set; }

        /// <summary>
        /// 修改时间
        /// </summary>
        [SugarColumn(ColumnName = "ModifyDate")]
        public DateTime ModifyDate { get; set; }

        /// <summary>
        /// 最后登录时间
        /// </summary>
        [SugarColumn(ColumnName = "LastLoginTime")]
        public DateTime LastLoginTime { get; set; }

        /// <summary>
        /// 最后修改密码时间
        /// </summary>
        [SugarColumn(ColumnName = "LastPwdAlterTime")]
        public DateTime LastPwdAlterTime { get; set; }

        /// <summary>
        /// 说明
        /// </summary>
        [SugarColumn(ColumnName = "Description")]
        public string Description { get; set; }

        /// <summary>
        /// 角色名称
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public string RoleName { get; set; }

        /// <summary>
        /// 角色编码
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public string RoleCode { get; set; }

        /// <summary>
        /// 创建人名称
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public string CreateByName { get; set; }

        /// <summary>
        /// 修改人名称
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public string ModifyByName { get; set; }
    }
}
