mirror of
https://github.com/nsnail/NetAdmin.git
synced 2025-12-23 06:25:53 +08:00
@@ -6,17 +6,17 @@ namespace NetAdmin.Domain.Dto.Dependency;
|
||||
public sealed record PagedQueryRsp<T>(int Page, int PageSize, long Total, IEnumerable<T> Rows) : IPagedInfo
|
||||
where T : DataAbstraction
|
||||
{
|
||||
/// <summary>
|
||||
/// 数据行
|
||||
/// </summary>
|
||||
public IEnumerable<T> Rows { get; } = Rows;
|
||||
|
||||
/// <inheritdoc cref="IPagedInfo.Page" />
|
||||
public int Page { get; init; } = Page;
|
||||
|
||||
/// <inheritdoc cref="IPagedInfo.PageSize" />
|
||||
public int PageSize { get; init; } = PageSize;
|
||||
|
||||
/// <summary>
|
||||
/// 数据行
|
||||
/// </summary>
|
||||
public IEnumerable<T> Rows { get; init; } = Rows;
|
||||
|
||||
/// <summary>
|
||||
/// 数据总条
|
||||
/// </summary>
|
||||
|
||||
@@ -34,6 +34,7 @@ public sealed record GetAllEntriesRsp : DataAbstraction
|
||||
/// <summary>
|
||||
/// 绝对过期时间
|
||||
/// </summary>
|
||||
[JsonInclude]
|
||||
public long AbsExp { get; init; }
|
||||
|
||||
/// <summary>
|
||||
@@ -49,5 +50,6 @@ public sealed record GetAllEntriesRsp : DataAbstraction
|
||||
/// <summary>
|
||||
/// 滑动过期时间
|
||||
/// </summary>
|
||||
[JsonInclude]
|
||||
public long SldExp { get; init; }
|
||||
}
|
||||
@@ -29,6 +29,7 @@ public sealed record IconExportJsInfo : DataAbstraction
|
||||
/// <summary>
|
||||
/// Icons
|
||||
/// </summary>
|
||||
[JsonInclude]
|
||||
public ICollection<string> Icons { get; init; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -10,6 +10,7 @@ namespace NetAdmin.Domain.Dto.Sys.Job;
|
||||
public record QueryJobRsp : Sys_Job
|
||||
{
|
||||
/// <inheritdoc cref="Sys_Job.LastStatusCode" />
|
||||
[JsonInclude]
|
||||
public new virtual string LastStatusCode =>
|
||||
#pragma warning disable IDE0072
|
||||
base.LastStatusCode switch {
|
||||
|
||||
@@ -9,6 +9,7 @@ namespace NetAdmin.Domain.Dto.Sys.JobRecord;
|
||||
public record QueryJobRecordRsp : Sys_JobRecord
|
||||
{
|
||||
/// <inheritdoc cref="Sys_JobRecord.HttpStatusCode" />
|
||||
[JsonInclude]
|
||||
public new virtual string HttpStatusCode =>
|
||||
base.HttpStatusCode == Numbers.HTTP_STATUS_BIZ_FAIL
|
||||
? nameof(ErrorCodes.Unhandled).ToLowerCamelCase()
|
||||
|
||||
@@ -31,36 +31,43 @@ public sealed record MetaInfo : DataAbstraction
|
||||
/// <summary>
|
||||
/// 背景颜色
|
||||
/// </summary>
|
||||
[JsonInclude]
|
||||
public string Color { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否整页路由
|
||||
/// </summary>
|
||||
[JsonInclude]
|
||||
public bool FullPage { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否隐藏
|
||||
/// </summary>
|
||||
[JsonInclude]
|
||||
public bool Hidden { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否隐藏面包屑
|
||||
/// </summary>
|
||||
[JsonInclude]
|
||||
public bool HiddenBreadCrumb { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 图标
|
||||
/// </summary>
|
||||
[JsonInclude]
|
||||
public string Icon { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 标签
|
||||
/// </summary>
|
||||
[JsonInclude]
|
||||
public string Tag { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 标题
|
||||
/// </summary>
|
||||
[JsonInclude]
|
||||
public string Title { get; init; }
|
||||
|
||||
/// <summary>
|
||||
@@ -68,5 +75,6 @@ public sealed record MetaInfo : DataAbstraction
|
||||
/// </summary>
|
||||
[EnumDataType(typeof(MenuTypes), ErrorMessageResourceType = typeof(Ln)
|
||||
, ErrorMessageResourceName = nameof(Ln.菜单类型不正确))]
|
||||
[JsonInclude]
|
||||
public MenuTypes Type { get; init; }
|
||||
}
|
||||
@@ -59,6 +59,12 @@ public record ExportRequestLogRsp : QueryRequestLogRsp
|
||||
[Name(nameof(Ln.请求方式))]
|
||||
public override string Method { get; init; }
|
||||
|
||||
/// <inheritdoc />
|
||||
[CsvIndex(9)]
|
||||
[Ignore(false)]
|
||||
[Name(nameof(Ln.跟踪编号))]
|
||||
public override string TraceId { get; init; }
|
||||
|
||||
/// <inheritdoc />
|
||||
[Ignore]
|
||||
public override QueryUserRsp User { get; init; }
|
||||
|
||||
@@ -10,16 +10,19 @@ public record QueryRequestLogRsp : Sys_RequestLog, IRegister
|
||||
/// <summary>
|
||||
/// 创建者客户端IP
|
||||
/// </summary>
|
||||
[JsonInclude]
|
||||
public new virtual string CreatedClientIp => base.CreatedClientIp?.ToIpV4();
|
||||
|
||||
/// <summary>
|
||||
/// 登录名
|
||||
/// </summary>
|
||||
[JsonInclude]
|
||||
public virtual string LoginName => RequestBody?.ToObject<LoginByPwdReq>()?.Account;
|
||||
|
||||
/// <summary>
|
||||
/// 操作系统
|
||||
/// </summary>
|
||||
[JsonInclude]
|
||||
public virtual string Os => UserAgentParser.Create(CreatedUserAgent)?.Platform;
|
||||
|
||||
/// <inheritdoc cref="Sys_RequestLog.ApiId" />
|
||||
@@ -91,6 +94,10 @@ public record QueryRequestLogRsp : Sys_RequestLog, IRegister
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public override int? ServerIp { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_RequestLog.TraceId" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public override string TraceId { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_RequestLog.User" />
|
||||
public new virtual QueryUserRsp User { get; init; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user