using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace WCS.Model.ApiModel
{
public class UserModel
{
public int Id { get; set; }
///
/// 登录名
///
public string LoginName { get; set; }
///
/// 密码
///
public string Password { get; set; }
public List RoleIds { get; set; } = new List();
public List RoleNames { get; set; }
///
/// 是否最大权限
///
public bool IsAdmin { get; set; }
///
/// 创建时间
///
public DateTime Time { get; set; }
///
/// 用户拥有的权限
///
public List GetRoles { get; set; }
}
public class RoleModel
{
public int Id { get; set; }
///
/// 角色名
///
public string Name { get; set; }
public List Auths { get; set; } = new List();
public List AuthNames { get => (Auths == null || !Auths.Any()) ? new List() : EnumHelps.GetEnumDescriptionList(typeof(AuthEnum), true).Where(o => Auths.Contains(o.Item1)).Select(o => o.Item3).ToList(); }
///
/// 是否最大权限
///
public bool IsAdmin { get; set; }
///
/// 创建时间
///
public DateTime Time { get; set; }
}
}