Files
NetAdmin/src/backend/NetAdmin.Domain/Dto/Sys/Cache/GetAllEntriesRsp.cs
nsnail 3847d6fdbb feat: 前端表格高级筛选 (#100)
* chore: 🔨 css 基础单位

[skip ci]

* fix: 🐛 ca2263 System.Enum.GetValues<TEnum>()

[skip ci]

* feat:  前端表格高级筛选

[skip ci]
2024-04-22 21:16:53 +08:00

53 lines
1.3 KiB
C#

namespace NetAdmin.Domain.Dto.Sys.Cache;
/// <summary>
/// 响应:获取所有缓存项
/// </summary>
public sealed record GetAllEntriesRsp : DataAbstraction
{
/// <summary>
/// Initializes a new instance of the <see cref="GetAllEntriesRsp" /> class.
/// </summary>
public GetAllEntriesRsp() { }
/// <summary>
/// Initializes a new instance of the <see cref="GetAllEntriesRsp" /> class.
/// </summary>
public GetAllEntriesRsp(long absExp, string key, long sldExp, string data)
{
AbsExp = absExp;
Key = key;
SldExp = sldExp;
Data = data;
}
/// <summary>
/// 绝对过期时间
/// </summary>
public DateTime? AbsExpTime => AbsExp == -1 ? null : DateTime.FromBinary(AbsExp).ToLocalTime();
/// <summary>
/// 滑动过期时间
/// </summary>
public DateTime? SldExpTime => SldExp == -1 ? null : DateTime.FromBinary(SldExp).ToLocalTime();
/// <summary>
/// 绝对过期时间
/// </summary>
public long AbsExp { get; init; }
/// <summary>
/// 缓存值
/// </summary>
public string Data { get; init; }
/// <summary>
/// 缓存键
/// </summary>
public string Key { get; init; }
/// <summary>
/// 滑动过期时间
/// </summary>
public long SldExp { get; init; }
}