using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Hotline.Share.Enums.Settings;

namespace Hotline.Caching.Interfaces
{
    public interface ITableAccessLevelCacheManager
    {
        /// <summary>
        /// 查询所有
        /// </summary>
        /// <returns></returns>
        IReadOnlyList<TableAccessLevelCacheItem> QueryAll();

        /// <summary>
        /// 重载
        /// </summary>
        void Reload();
    }

    public class TableAccessLevelCacheItem
    {
        /// <summary>
        /// 角色Code
        /// </summary>
        public string RoleCode { get; set; }

        /// <summary>
        /// 权限方式
        /// </summary>
        public ETableAccessLevel AccessLevel { get; set; }

        /// <summary>
        /// 表名
        /// </summary>
        public string TableName { get; set; }
    }
}
