using SqlSugar;
using System;
using System.Collections.Generic;
namespace EntrustSettle.Model.Models
{
///
/// 用户信息表
///
[SugarTable("SysUserInfo", "用户表")]
public class SysUserInfo : BaseEntity
{
public SysUserInfo()
{
}
public SysUserInfo(string loginName, string loginPWD)
{
LoginName = loginName;
LoginPWD = loginPWD;
RealName = LoginName;
Status = 0;
CreateTime = DateTime.Now;
ModifyTime = DateTime.Now;
LastErrorTime = DateTime.Now;
ErrorCount = 0;
Name = "";
}
///
/// 登录账号
///
[SugarColumn(Length = 200, IsNullable = true, ColumnDescription = "登录账号")]
public string LoginName { get; set; }
///
/// 登录密码
///
[SugarColumn(Length = 200, IsNullable = true)]
public string LoginPWD { get; set; }
///
/// 真实姓名
///
[SugarColumn(Length = 200, IsNullable = true)]
public string RealName { get; set; }
///
/// 状态
///
public int Status { get; set; }
///
/// 部门
///
[SugarColumn(IsNullable = true)]
public long DepartmentId { get; set; } = -1;
///
/// 备注
///
[SugarColumn(Length = 2000, IsNullable = true)]
public string Remark { get; set; }
///
/// 关键业务修改时间
///
public DateTime CriticalModifyTime { get; set; } = DateTime.Now;
///
///最后异常时间
///
public DateTime LastErrorTime { get; set; } = DateTime.Now;
///
///错误次数
///
public int ErrorCount { get; set; }
///
/// 登录账号
///
[SugarColumn(Length = 200, IsNullable = true)]
public string Name { get; set; }
// 性别
[SugarColumn(IsNullable = true)]
public int Sex { get; set; } = 0;
// 年龄
[SugarColumn(IsNullable = true)]
public int Age { get; set; }
// 生日
[SugarColumn(IsNullable = true)]
public DateTime Birth { get; set; } = DateTime.Now;
// 地址
[SugarColumn(Length = 200, IsNullable = true)]
public string Address { get; set; }
[SugarColumn(DefaultValue = "1")]
public bool Enable { get; set; } = true;
///
/// 租户Id
///
[SugarColumn(IsNullable = false, DefaultValue = "0")]
public long TenantId { get; set; }
[Navigate(NavigateType.OneToOne, nameof(TenantId))]
public SysTenant Tenant { get; set; }
[SugarColumn(IsIgnore = true)]
public List RoleNames { get; set; }
[SugarColumn(IsIgnore = true)]
public List Dids { get; set; }
[SugarColumn(IsIgnore = true)]
public string DepartmentName { get; set; }
[SugarColumn(IsIgnore = true)]
public List RIDs { get; set; }
}
}