Files
zszq-trs/Framework/YLErp.Core/DBModels/BaseSystemUser.cs
T
2024-05-09 14:06:26 +08:00

76 lines
2.1 KiB
C#

using System.ComponentModel.DataAnnotations;
namespace YLErp.DBModels
{
public class BaseSystemUser
{
public int Id { get; set; }
/// <summary>
/// 0=正常 1=禁用
/// </summary>
public int State { get; set; }
[Required]
[DisplayName("登录名")]
[MaxLength(50)]
public string LoginName { get; set; }
[Required]
[MaxLength(50)]
[DisplayName("姓名")]
public string Name { get; set; }
[DisplayName("邮箱")]
[MaxLength(50)]
public string Email { get; set; }
[DisplayName("QT")]
[MaxLength(50)]
public string QQ { get; set; }
[DisplayName("手机号")]
[MaxLength(50)]
public string Mobile { get; set; }
[DisplayName("座机号")]
[MaxLength(50)]
public string Tel { get; set; }
[DisplayName("角色类型")]
[MaxLength(500)]
public string RoleType { get; set; }
[DisplayName("业务组")]
public string UserGroup { get; set; }
/// <summary>
/// 1 客户经理,2 交易员 ,3 客户经理+交易员
/// </summary>
[DisplayName("账号岗位")]
public int AccountPost { get; set; }
[DisplayName("隶属账号")]
public int? ParentId { get; set; }
/// <summary>
/// VarietyIds为0代表用户一个品种都不能操作
/// VarietyIds为空代表客户默认全品种操作
/// </summary>
[DisplayName("品种")]
public string VarietyIds { get; set; }
public List<int> VarietyIdList
{
get
{
if (string.IsNullOrEmpty(VarietyIds))
{
return new List<int>();
}
return VarietyIds.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries).Select(a => Convert.ToInt32(a)).ToList();
}
}
public override string ToString()
{
return Id + "--" + LoginName;
}
}
}