using System.ComponentModel;

namespace NPP.SmartSchedue.Api.Core.Consts;

/// <summary>
/// 缓存键
/// </summary>
public static partial class CacheKeys
{
    /// <summary>
    /// 模块缓存键 module:action:{id}
    /// </summary>
    [Description("模块缓存键")] public const string ModuleActionKey = "module:action:";

    /// <summary>
    /// 获取模块缓存键
    /// </summary>
    /// <param name="id">模块Id</param>
    /// <returns></returns>
    public static string GetModuleActionKey(long id) => $"{ModuleActionKey}{id}";
    
    /// <summary>
    /// 通知设置缓存
    /// </summary>
    [Description("通知设置缓存")] 
    public const string NotificationSettingsKey = "notification:settings:list:";

    /// <summary>
    /// DynamicDepartmentIds
    /// </summary>
    [Description("动态部门人员数据")] public const string DynamicDepartment = "dynamic:department:list:";
    
    /// <summary>
    /// 获取动态部门人员数据
    /// </summary>
    /// <param name="id"></param>
    /// <returns></returns>
    public static string GetDynamicDepartmentKey(long id) => $"{DynamicDepartment}{id}";
    
    
    /// <summary>
    /// 人员缓存
    /// </summary>
    [Description("人员缓存")] 
    public const string UserListKey = "user:list:all:";
}