Files
2026-05-15 23:22:48 +08:00

56 lines
1.5 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VolPro.Entity.DomainModels
{
public class Permissions
{
public int Menu_Id { get; set; }
public int ParentId { get; set; }
public string TableName { get; set; }
public string MenuAuth { get; set; }
public string UserAuth { get; set; }
/// <summary>
/// 当前用户权限,存储的是权限的值,如:Add,Search等
/// </summary>
public string[] UserAuthArr { get; set; }
/// <summary>
/// 2022.03.26
/// 菜单类型1:移动端0:PC端
/// </summary>
public int MenuType { get; set; }
/// <summary>
///菜单数据权限
///2024.08.11
/// </summary>
[Display(Name = "菜单数据权限")]
public string AuthMenuData { get; set; }
private List<Dictionary<string, string>> _customAuth = null;
public List<Dictionary<string, string>> CustomAuth
{
get
{
if (string.IsNullOrEmpty(AuthMenuData) || AuthMenuData[0] != '[')
{
return null;
}
if (_customAuth == null)
{
_customAuth = JsonConvert.DeserializeObject<List<Dictionary<string, string>>>(AuthMenuData);
}
return _customAuth;
}
}
}
}