mirror of
				https://github.com/nsnail/NetAdmin.git
				synced 2025-11-01 03:35:28 +08:00 
			
		
		
		
	| @@ -65,6 +65,13 @@ global using NetAdmin.Infrastructure.Utils; | ||||
| global using NSExt.Attributes; | ||||
| global using NSExt.Extensions; | ||||
| #if !INFRAS | ||||
| global using CsvHelper.Configuration.Attributes; | ||||
| global using NetAdmin.Domain.Attributes; | ||||
| global using NetAdmin.Domain.Attributes.DataValidation; | ||||
| global using NetAdmin.Domain.DbMaps.Dependency; | ||||
| global using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| global using NetAdmin.Domain.DbMaps.Sys; | ||||
| global using CsvIndex = CsvHelper.Configuration.Attributes.IndexAttribute; | ||||
| global using DynamicFilterInfo = NetAdmin.Domain.Dto.Dependency.DynamicFilterInfo; | ||||
| global using DynamicFilterOperators = NetAdmin.Domain.Enums.DynamicFilterOperators; | ||||
| #endif | ||||
| @@ -0,0 +1,2 @@ | ||||
| <wpf:ResourceDictionary xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xml:space="preserve"> | ||||
|     <s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=services_005Cadm_005Cpartial/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary> | ||||
| @@ -1,6 +1,5 @@ | ||||
| using NetAdmin.AdmServer.Host.Filters; | ||||
| using NetAdmin.Domain.Contexts; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.Enums.Sys; | ||||
| using NetAdmin.Host.Extensions; | ||||
|  | ||||
|   | ||||
| @@ -229,6 +229,14 @@ public class AllTests(WebApplicationFactory<Startup> factory, ITestOutputHelper | ||||
|         return default; | ||||
|     } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [InlineData(default)] | ||||
|     [Theory] | ||||
|     public Task<long> CountRecordAsync(QueryReq<QueryJobRecordReq> req) | ||||
|     { | ||||
|         return default; | ||||
|     } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [InlineData(default)] | ||||
|     [Theory] | ||||
| @@ -629,6 +637,166 @@ public class AllTests(WebApplicationFactory<Startup> factory, ITestOutputHelper | ||||
|         return default; | ||||
|     } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [InlineData(default)] | ||||
|     [Theory] | ||||
|     public Task<IActionResult> ExportAsync(QueryReq<QueryJobReq> req) | ||||
|     { | ||||
|         return default; | ||||
|     } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [InlineData(default)] | ||||
|     [Theory] | ||||
|     public Task<IActionResult> ExportAsync(QueryReq<QueryVerifyCodeReq> req) | ||||
|     { | ||||
|         return default; | ||||
|     } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [InlineData(default)] | ||||
|     [Theory] | ||||
|     public Task<IActionResult> ExportAsync(QueryReq<QueryUserProfileReq> req) | ||||
|     { | ||||
|         return default; | ||||
|     } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [InlineData(default)] | ||||
|     [Theory] | ||||
|     public Task<IActionResult> ExportAsync(QueryReq<QueryUserReq> req) | ||||
|     { | ||||
|         return default; | ||||
|     } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [InlineData(default)] | ||||
|     [Theory] | ||||
|     public Task<IActionResult> ExportAsync(QueryReq<QuerySiteMsgUserReq> req) | ||||
|     { | ||||
|         return default; | ||||
|     } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [InlineData(default)] | ||||
|     [Theory] | ||||
|     public Task<IActionResult> ExportAsync(QueryReq<QuerySiteMsgRoleReq> req) | ||||
|     { | ||||
|         return default; | ||||
|     } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [InlineData(default)] | ||||
|     [Theory] | ||||
|     public Task<IActionResult> ExportAsync(QueryReq<QuerySiteMsgReq> req) | ||||
|     { | ||||
|         return default; | ||||
|     } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [InlineData(default)] | ||||
|     [Theory] | ||||
|     public Task<IActionResult> ExportAsync(QueryReq<QuerySiteMsgFlagReq> req) | ||||
|     { | ||||
|         return default; | ||||
|     } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [InlineData(default)] | ||||
|     [Theory] | ||||
|     public Task<IActionResult> ExportAsync(QueryReq<QuerySiteMsgDeptReq> req) | ||||
|     { | ||||
|         return default; | ||||
|     } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [InlineData(default)] | ||||
|     [Theory] | ||||
|     public Task<IActionResult> ExportAsync(QueryReq<QueryRoleReq> req) | ||||
|     { | ||||
|         return default; | ||||
|     } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [InlineData(default)] | ||||
|     [Theory] | ||||
|     public Task<IActionResult> ExportAsync(QueryReq<QueryRequestLogReq> req) | ||||
|     { | ||||
|         return default; | ||||
|     } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [InlineData(default)] | ||||
|     [Theory] | ||||
|     public Task<IActionResult> ExportAsync(QueryReq<QueryMenuReq> req) | ||||
|     { | ||||
|         return default; | ||||
|     } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [InlineData(default)] | ||||
|     [Theory] | ||||
|     public Task<IActionResult> ExportAsync(QueryReq<QueryJobRecordReq> req) | ||||
|     { | ||||
|         return default; | ||||
|     } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [InlineData(default)] | ||||
|     [Theory] | ||||
|     public Task<IActionResult> ExportAsync(QueryReq<QueryDicContentReq> req) | ||||
|     { | ||||
|         return default; | ||||
|     } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [InlineData(default)] | ||||
|     [Theory] | ||||
|     public Task<IActionResult> ExportAsync(QueryReq<QueryDicCatalogReq> req) | ||||
|     { | ||||
|         return default; | ||||
|     } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [InlineData(default)] | ||||
|     [Theory] | ||||
|     public Task<IActionResult> ExportAsync(QueryReq<QueryDeptReq> req) | ||||
|     { | ||||
|         return default; | ||||
|     } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [InlineData(default)] | ||||
|     [Theory] | ||||
|     public Task<IActionResult> ExportAsync(QueryReq<QueryConfigReq> req) | ||||
|     { | ||||
|         return default; | ||||
|     } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [InlineData(default)] | ||||
|     [Theory] | ||||
|     public Task<IActionResult> ExportAsync(QueryReq<QueryApiReq> req) | ||||
|     { | ||||
|         return default; | ||||
|     } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [InlineData(default)] | ||||
|     [Theory] | ||||
|     public Task<IActionResult> ExportContentAsync(QueryReq<QueryDicContentReq> req) | ||||
|     { | ||||
|         return default; | ||||
|     } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [InlineData(default)] | ||||
|     [Theory] | ||||
|     public Task<IActionResult> ExportRecordAsync(QueryReq<QueryJobRecordReq> req) | ||||
|     { | ||||
|         return default; | ||||
|     } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [InlineData(default)] | ||||
|     [Theory] | ||||
| @@ -920,6 +1088,14 @@ public class AllTests(WebApplicationFactory<Startup> factory, ITestOutputHelper | ||||
|         return default; | ||||
|     } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [InlineData(default)] | ||||
|     [Theory] | ||||
|     public Task<QueryJobRecordRsp> GetRecordAsync(QueryJobRecordReq req) | ||||
|     { | ||||
|         return default; | ||||
|     } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [InlineData(default)] | ||||
|     [Theory] | ||||
| @@ -1154,6 +1330,14 @@ public class AllTests(WebApplicationFactory<Startup> factory, ITestOutputHelper | ||||
|         return default; | ||||
|     } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [InlineData(default)] | ||||
|     [Theory] | ||||
|     public Task<PagedQueryRsp<QueryJobRecordRsp>> PagedQueryRecordAsync(PagedQueryReq<QueryJobRecordReq> req) | ||||
|     { | ||||
|         return default; | ||||
|     } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [InlineData(default)] | ||||
|     [Theory] | ||||
| @@ -1322,22 +1506,6 @@ public class AllTests(WebApplicationFactory<Startup> factory, ITestOutputHelper | ||||
|         return default; | ||||
|     } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [InlineData(default)] | ||||
|     [Theory] | ||||
|     public Task<QueryJobRecordRsp> RecordGetAsync(QueryJobRecordReq req) | ||||
|     { | ||||
|         return default; | ||||
|     } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [InlineData(default)] | ||||
|     [Theory] | ||||
|     public Task<PagedQueryRsp<QueryJobRecordRsp>> RecordPagedQueryAsync(PagedQueryReq<QueryJobRecordReq> req) | ||||
|     { | ||||
|         return default; | ||||
|     } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [InlineData(default)] | ||||
|     [Theory] | ||||
|   | ||||
| @@ -4,6 +4,6 @@ | ||||
|         <ProjectReference Include="../NetAdmin.AdmServer.Host/NetAdmin.AdmServer.Host.csproj"/> | ||||
|     </ItemGroup> | ||||
|     <ItemGroup> | ||||
|         <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0"/> | ||||
|         <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.0-release-24352-06"/> | ||||
|     </ItemGroup> | ||||
| </Project> | ||||
| @@ -43,6 +43,11 @@ public interface ICrudModule<in TCreateReq, TCreateRsp, TQueryReq, TQueryRsp, TD | ||||
|     /// </summary> | ||||
|     Task<bool> ExistAsync(QueryReq<TQueryReq> req); | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     导出实体 | ||||
|     /// </summary> | ||||
|     Task<IActionResult> ExportAsync(QueryReq<TQueryReq> req); | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     获取单个实体 | ||||
|     /// </summary> | ||||
|   | ||||
| @@ -1,5 +1,4 @@ | ||||
| using NetAdmin.Domain.Contexts; | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
|  | ||||
| namespace NetAdmin.Application.Repositories; | ||||
|  | ||||
|   | ||||
| @@ -1,5 +1,4 @@ | ||||
| using NetAdmin.Application.Repositories; | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using RedLockNet; | ||||
|  | ||||
| namespace NetAdmin.Application.Services; | ||||
|   | ||||
| @@ -1,6 +1,4 @@ | ||||
| using NetAdmin.Application.Repositories; | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
|  | ||||
| namespace NetAdmin.Application.Services; | ||||
|  | ||||
|   | ||||
| @@ -0,0 +1,16 @@ | ||||
| namespace NetAdmin.Domain.Attributes.DataValidation; | ||||
|  | ||||
| /// <summary> | ||||
| ///     JSON文本验证器 | ||||
| /// </summary> | ||||
| [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Parameter)] | ||||
| public sealed class JsonStringAttribute : ValidationAttribute | ||||
| { | ||||
|     /// <inheritdoc /> | ||||
|     protected override ValidationResult IsValid(object value, ValidationContext validationContext) | ||||
|     { | ||||
|         return (value as string).IsJsonString() | ||||
|             ? ValidationResult.Success | ||||
|             : new ValidationResult(Ln.非JSON字符串, new[] { validationContext.MemberName }); | ||||
|     } | ||||
| } | ||||
| @@ -1,6 +1,3 @@ | ||||
| using NetAdmin.Domain.Attributes; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
|  | ||||
| namespace NetAdmin.Domain.DbMaps.Dependency; | ||||
|  | ||||
| /// <inheritdoc /> | ||||
| @@ -21,11 +18,13 @@ public abstract record ImmutableEntity<T> : LiteImmutableEntity<T>, IFieldCreate | ||||
| { | ||||
|     /// <inheritdoc cref="IFieldCreatedUser.CreatedUserId" /> | ||||
|     [Column(CanUpdate = false, Position = -1)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public long? CreatedUserId { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="IFieldCreatedUser.CreatedUserName" /> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_31, CanUpdate = false, Position = -1)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string CreatedUserName { get; init; } | ||||
|  | ||||
|   | ||||
| @@ -1,6 +1,3 @@ | ||||
| using NetAdmin.Domain.Attributes; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
|  | ||||
| namespace NetAdmin.Domain.DbMaps.Dependency; | ||||
|  | ||||
| /// <inheritdoc /> | ||||
| @@ -21,11 +18,13 @@ public abstract record LiteImmutableEntity<T> : EntityBase<T>, IFieldCreatedTime | ||||
| { | ||||
|     /// <inheritdoc cref="IFieldCreatedTime.CreatedTime" /> | ||||
|     [Column(ServerTime = DateTimeKind.Local, CanUpdate = false, Position = -1)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual DateTime CreatedTime { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     [Column(IsIdentity = false, IsPrimary = true, Position = 1)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public override T Id { get; init; } | ||||
| } | ||||
| @@ -1,6 +1,3 @@ | ||||
| using NetAdmin.Domain.Attributes; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
|  | ||||
| namespace NetAdmin.Domain.DbMaps.Dependency; | ||||
|  | ||||
| /// <inheritdoc /> | ||||
| @@ -24,6 +21,7 @@ public abstract record LiteMutableEntity<T> : LiteImmutableEntity<T>, IFieldModi | ||||
|  | ||||
|     /// <inheritdoc cref="IFieldModifiedTime.ModifiedTime" /> | ||||
|     [Column(ServerTime = DateTimeKind.Local, CanInsert = false, Position = -1)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual DateTime? ModifiedTime { get; init; } | ||||
| } | ||||
| @@ -1,6 +1,3 @@ | ||||
| using NetAdmin.Domain.Attributes; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
|  | ||||
| namespace NetAdmin.Domain.DbMaps.Dependency; | ||||
|  | ||||
| /// <inheritdoc /> | ||||
| @@ -24,6 +21,7 @@ public abstract record LiteVersionEntity<T> : LiteMutableEntity<T>, IFieldVersio | ||||
|  | ||||
|     /// <inheritdoc cref="IFieldVersion.Version" /> | ||||
|     [Column(IsVersion = true, Position = -1)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual long Version { get; init; } | ||||
| } | ||||
| @@ -1,6 +1,3 @@ | ||||
| using NetAdmin.Domain.Attributes; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
|  | ||||
| namespace NetAdmin.Domain.DbMaps.Dependency; | ||||
|  | ||||
| /// <inheritdoc /> | ||||
| @@ -24,11 +21,13 @@ public abstract record MutableEntity<T> : LiteMutableEntity<T>, IFieldModifiedUs | ||||
|  | ||||
|     /// <inheritdoc cref="IFieldModifiedUser.ModifiedUserId" /> | ||||
|     [Column(CanInsert = false, Position = -1)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public long? ModifiedUserId { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="IFieldModifiedUser.ModifiedUserName" /> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_31, CanInsert = false, Position = -1)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public string ModifiedUserName { get; init; } | ||||
| } | ||||
| @@ -1,5 +1,3 @@ | ||||
| using NetAdmin.Domain.Attributes; | ||||
|  | ||||
| namespace NetAdmin.Domain.DbMaps.Dependency; | ||||
|  | ||||
| /// <inheritdoc /> | ||||
|   | ||||
| @@ -1,6 +1,3 @@ | ||||
| using NetAdmin.Domain.Attributes; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
|  | ||||
| namespace NetAdmin.Domain.DbMaps.Dependency; | ||||
|  | ||||
| /// <inheritdoc /> | ||||
| @@ -20,11 +17,13 @@ public abstract record VersionEntity<T> : LiteVersionEntity<T>, IFieldModifiedUs | ||||
| { | ||||
|     /// <inheritdoc /> | ||||
|     [Column(CanUpdate = false, Position = -1)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual long? CreatedUserId { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_31, CanUpdate = false, Position = -1)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string CreatedUserName { get; init; } | ||||
|  | ||||
| @@ -34,11 +33,13 @@ public abstract record VersionEntity<T> : LiteVersionEntity<T>, IFieldModifiedUs | ||||
|  | ||||
|     /// <inheritdoc cref="IFieldModifiedUser.ModifiedUserId" /> | ||||
|     [Column(CanInsert = false, Position = -1)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual long? ModifiedUserId { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="IFieldModifiedUser.ModifiedUserName" /> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_31, CanInsert = false, Position = -1)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string ModifiedUserName { get; init; } | ||||
| } | ||||
| @@ -1,6 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
|  | ||||
| namespace NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| /// <summary> | ||||
| @@ -12,12 +9,14 @@ public record Sys_Api : ImmutableEntity<string>, IFieldSummary | ||||
|     /// <summary> | ||||
|     ///     子节点 | ||||
|     /// </summary> | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     [Navigate(nameof(ParentId))] | ||||
|     public IEnumerable<Sys_Api> Children { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_127, IsIdentity = false, IsPrimary = true, Position = 1)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public override string Id { get; init; } | ||||
|  | ||||
| @@ -25,6 +24,7 @@ public record Sys_Api : ImmutableEntity<string>, IFieldSummary | ||||
|     ///     请求方式 | ||||
|     /// </summary> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_15)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string Method { get; init; } | ||||
|  | ||||
| @@ -32,6 +32,7 @@ public record Sys_Api : ImmutableEntity<string>, IFieldSummary | ||||
|     ///     服务名称 | ||||
|     /// </summary> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_63)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string Name { get; init; } | ||||
|  | ||||
| @@ -39,6 +40,7 @@ public record Sys_Api : ImmutableEntity<string>, IFieldSummary | ||||
|     ///     命名空间 | ||||
|     /// </summary> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_31)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     #pragma warning disable CA1716 | ||||
|     public virtual string Namespace { get; init; } | ||||
| @@ -48,12 +50,14 @@ public record Sys_Api : ImmutableEntity<string>, IFieldSummary | ||||
|     ///     父编号 | ||||
|     /// </summary> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_127)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string ParentId { get; init; } | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     角色集合 | ||||
|     /// </summary> | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     [Navigate(ManyToMany = typeof(Sys_RoleApi))] | ||||
|     public ICollection<Sys_Role> Roles { get; init; } | ||||
| @@ -62,6 +66,7 @@ public record Sys_Api : ImmutableEntity<string>, IFieldSummary | ||||
|     ///     服务描述 | ||||
|     /// </summary> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_63)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string Summary { get; init; } | ||||
| } | ||||
| @@ -1,6 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
|  | ||||
| namespace NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| /// <summary> | ||||
| @@ -13,6 +10,7 @@ public record Sys_Config : VersionEntity, IFieldEnabled | ||||
|     ///     是否启用 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual bool Enabled { get; init; } | ||||
|  | ||||
| @@ -20,12 +18,14 @@ public record Sys_Config : VersionEntity, IFieldEnabled | ||||
|     ///     用户注册是否需要人工确认 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual bool UserRegisterConfirm { get; init; } | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     用户注册默认部门 | ||||
|     /// </summary> | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     [Navigate(nameof(UserRegisterDeptId))] | ||||
|     public Sys_Dept UserRegisterDept { get; init; } | ||||
| @@ -34,12 +34,14 @@ public record Sys_Config : VersionEntity, IFieldEnabled | ||||
|     ///     用户注册默认部门编号 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual long UserRegisterDeptId { get; init; } | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     用户注册默认角色 | ||||
|     /// </summary> | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     [Navigate(nameof(UserRegisterRoleId))] | ||||
|     public Sys_Role UserRegisterRole { get; init; } | ||||
| @@ -48,6 +50,7 @@ public record Sys_Config : VersionEntity, IFieldEnabled | ||||
|     ///     用户注册默认角色编号 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual long UserRegisterRoleId { get; init; } | ||||
| } | ||||
| @@ -1,6 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
|  | ||||
| namespace NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| /// <summary> | ||||
| @@ -12,6 +9,7 @@ public record Sys_Dept : VersionEntity, IFieldEnabled, IFieldSummary, IFieldSort | ||||
|     /// <summary> | ||||
|     ///     子节点 | ||||
|     /// </summary> | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     [Navigate(nameof(ParentId))] | ||||
|     public IEnumerable<Sys_Dept> Children { get; init; } | ||||
| @@ -20,6 +18,7 @@ public record Sys_Dept : VersionEntity, IFieldEnabled, IFieldSummary, IFieldSort | ||||
|     ///     是否启用 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual bool Enabled { get; init; } | ||||
|  | ||||
| @@ -27,6 +26,7 @@ public record Sys_Dept : VersionEntity, IFieldEnabled, IFieldSummary, IFieldSort | ||||
|     ///     部门名称 | ||||
|     /// </summary> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_31)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string Name { get; init; } | ||||
|  | ||||
| @@ -34,12 +34,14 @@ public record Sys_Dept : VersionEntity, IFieldEnabled, IFieldSummary, IFieldSort | ||||
|     ///     父编号 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual long ParentId { get; init; } | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     角色集合 | ||||
|     /// </summary> | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     [Navigate(ManyToMany = typeof(Sys_RoleDept))] | ||||
|     public ICollection<Sys_Role> Roles { get; init; } | ||||
| @@ -47,6 +49,7 @@ public record Sys_Dept : VersionEntity, IFieldEnabled, IFieldSummary, IFieldSort | ||||
|     /// <summary> | ||||
|     ///     发送给此部门的站内信集合 | ||||
|     /// </summary> | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     [Navigate(ManyToMany = typeof(Sys_SiteMsgDept))] | ||||
|     public ICollection<Sys_SiteMsg> SiteMsgs { get; init; } | ||||
| @@ -55,6 +58,7 @@ public record Sys_Dept : VersionEntity, IFieldEnabled, IFieldSummary, IFieldSort | ||||
|     ///     排序值,越大越前 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual long Sort { get; init; } | ||||
|  | ||||
| @@ -62,6 +66,7 @@ public record Sys_Dept : VersionEntity, IFieldEnabled, IFieldSummary, IFieldSort | ||||
|     ///     部门描述 | ||||
|     /// </summary> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string Summary { get; init; } | ||||
| } | ||||
| @@ -1,17 +1,16 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
|  | ||||
| namespace NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| /// <summary> | ||||
| ///     字典目录表 | ||||
| /// </summary> | ||||
| [Index(Chars.FLG_DB_INDEX_PREFIX             + nameof(Code), nameof(Code), true)] | ||||
| [Table(Name = Chars.FLG_DB_TABLE_NAME_PREFIX + nameof(Sys_DicCatalog))] | ||||
| [FreeSql.DataAnnotations.Index(Chars.FLG_DB_INDEX_PREFIX + nameof(Code), nameof(Code), true)] | ||||
| [Table(Name = Chars.FLG_DB_TABLE_NAME_PREFIX             + nameof(Sys_DicCatalog))] | ||||
| public record Sys_DicCatalog : VersionEntity | ||||
| { | ||||
|     /// <summary> | ||||
|     ///     子节点 | ||||
|     /// </summary> | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     [Navigate(nameof(ParentId))] | ||||
|     public IEnumerable<Sys_DicCatalog> Children { get; init; } | ||||
| @@ -20,12 +19,14 @@ public record Sys_DicCatalog : VersionEntity | ||||
|     ///     字典编码 | ||||
|     /// </summary> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_31)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string Code { get; init; } | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     字典内容集合 | ||||
|     /// </summary> | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     [Navigate(nameof(Sys_DicContent.CatalogId))] | ||||
|     public ICollection<Sys_DicContent> Contents { get; init; } | ||||
| @@ -34,6 +35,7 @@ public record Sys_DicCatalog : VersionEntity | ||||
|     ///     字典名称 | ||||
|     /// </summary> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_31)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string Name { get; init; } | ||||
|  | ||||
| @@ -41,6 +43,7 @@ public record Sys_DicCatalog : VersionEntity | ||||
|     ///     父编号 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual long ParentId { get; init; } | ||||
| } | ||||
| @@ -1,18 +1,19 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
|  | ||||
| namespace NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| /// <summary> | ||||
| ///     字典内容表 | ||||
| /// </summary> | ||||
| [Index($"{Chars.FLG_DB_INDEX_PREFIX}{nameof(CatalogId)}_{nameof(Key)}",   $"{nameof(CatalogId)},{nameof(Key)}",   true)] | ||||
| [Index($"{Chars.FLG_DB_INDEX_PREFIX}{nameof(CatalogId)}_{nameof(Value)}", $"{nameof(CatalogId)},{nameof(Value)}", true)] | ||||
| [FreeSql.DataAnnotations.Index( // | ||||
|     $"{Chars.FLG_DB_INDEX_PREFIX}{nameof(CatalogId)}_{nameof(Key)}", $"{nameof(CatalogId)},{nameof(Key)}", true)] | ||||
| [FreeSql.DataAnnotations.Index( // | ||||
|     $"{Chars.FLG_DB_INDEX_PREFIX}{nameof(CatalogId)}_{nameof(Value)}", $"{nameof(CatalogId)},{nameof(Value)}", true)] | ||||
| [Table(Name = Chars.FLG_DB_TABLE_NAME_PREFIX + nameof(Sys_DicContent))] | ||||
| public record Sys_DicContent : VersionEntity | ||||
| { | ||||
|     /// <summary> | ||||
|     ///     字典目录 | ||||
|     /// </summary> | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     [Navigate(nameof(CatalogId))] | ||||
|     public Sys_DicCatalog Catalog { get; init; } | ||||
| @@ -21,6 +22,7 @@ public record Sys_DicContent : VersionEntity | ||||
|     ///     字典目录编号 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual long CatalogId { get; init; } | ||||
|  | ||||
| @@ -28,6 +30,7 @@ public record Sys_DicContent : VersionEntity | ||||
|     ///     键名称 | ||||
|     /// </summary> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_63)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string Key { get; init; } | ||||
|  | ||||
| @@ -35,6 +38,7 @@ public record Sys_DicContent : VersionEntity | ||||
|     ///     键值 | ||||
|     /// </summary> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string Value { get; init; } | ||||
| } | ||||
| @@ -1,5 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.Enums.Sys; | ||||
| using HttpMethods = NetAdmin.Domain.Enums.HttpMethods; | ||||
|  | ||||
| @@ -13,6 +11,7 @@ public record Sys_Job : VersionEntity, IFieldEnabled, IFieldSummary | ||||
| { | ||||
|     /// <inheritdoc cref="IFieldEnabled.Enabled" /> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual bool Enabled { get; init; } | ||||
|  | ||||
| @@ -20,6 +19,7 @@ public record Sys_Job : VersionEntity, IFieldEnabled, IFieldSummary | ||||
|     ///     执行时间计划 | ||||
|     /// </summary> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_31)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string ExecutionCron { get; init; } | ||||
|  | ||||
| @@ -27,6 +27,7 @@ public record Sys_Job : VersionEntity, IFieldEnabled, IFieldSummary | ||||
|     ///     请求方法 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual HttpMethods HttpMethod { get; init; } | ||||
|  | ||||
| @@ -34,6 +35,7 @@ public record Sys_Job : VersionEntity, IFieldEnabled, IFieldSummary | ||||
|     ///     作业名称 | ||||
|     /// </summary> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_63)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string JobName { get; init; } | ||||
|  | ||||
| @@ -41,6 +43,7 @@ public record Sys_Job : VersionEntity, IFieldEnabled, IFieldSummary | ||||
|     ///     上次执行耗时 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual long? LastDuration { get; init; } | ||||
|  | ||||
| @@ -48,6 +51,7 @@ public record Sys_Job : VersionEntity, IFieldEnabled, IFieldSummary | ||||
|     ///     上次执行时间 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual DateTime? LastExecTime { get; init; } | ||||
|  | ||||
| @@ -55,6 +59,7 @@ public record Sys_Job : VersionEntity, IFieldEnabled, IFieldSummary | ||||
|     ///     上次执行状态 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual HttpStatusCode? LastStatusCode { get; init; } | ||||
|  | ||||
| @@ -62,6 +67,7 @@ public record Sys_Job : VersionEntity, IFieldEnabled, IFieldSummary | ||||
|     ///     下次执行时间 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual DateTime? NextExecTime { get; init; } | ||||
|  | ||||
| @@ -69,6 +75,7 @@ public record Sys_Job : VersionEntity, IFieldEnabled, IFieldSummary | ||||
|     ///     下次执行时间编号 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual long? NextTimeId { get; init; } | ||||
|  | ||||
| @@ -80,6 +87,7 @@ public record Sys_Job : VersionEntity, IFieldEnabled, IFieldSummary | ||||
|     #else | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #endif | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string RequestBody { get; init; } | ||||
|  | ||||
| @@ -91,6 +99,7 @@ public record Sys_Job : VersionEntity, IFieldEnabled, IFieldSummary | ||||
|     #else | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #endif | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string RequestHeader { get; init; } | ||||
|  | ||||
| @@ -102,6 +111,7 @@ public record Sys_Job : VersionEntity, IFieldEnabled, IFieldSummary | ||||
|     #else | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #endif | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string RequestUrl { get; init; } | ||||
|  | ||||
| @@ -109,6 +119,7 @@ public record Sys_Job : VersionEntity, IFieldEnabled, IFieldSummary | ||||
|     ///     作业状态 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual JobStatues Status { get; init; } | ||||
|  | ||||
| @@ -118,12 +129,14 @@ public record Sys_Job : VersionEntity, IFieldEnabled, IFieldSummary | ||||
|     #else | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #endif | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string Summary { get; init; } | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     执行用户 | ||||
|     /// </summary> | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     [Navigate(nameof(UserId))] | ||||
|     public Sys_User User { get; init; } | ||||
| @@ -132,6 +145,7 @@ public record Sys_Job : VersionEntity, IFieldEnabled, IFieldSummary | ||||
|     ///     执行用户编号 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual long UserId { get; init; } | ||||
| } | ||||
| @@ -1,4 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using HttpMethods = NetAdmin.Domain.Enums.HttpMethods; | ||||
|  | ||||
| namespace NetAdmin.Domain.DbMaps.Sys; | ||||
| @@ -6,10 +5,11 @@ namespace NetAdmin.Domain.DbMaps.Sys; | ||||
| /// <summary> | ||||
| ///     计划作业执行记录表 | ||||
| /// </summary> | ||||
| [Index($"{Chars.FLG_DB_INDEX_PREFIX}{nameof(JobId)}_{nameof(TimeId)}", $"{nameof(JobId)},{nameof(TimeId)}", true)] | ||||
| [Index(Chars.FLG_DB_INDEX_PREFIX             + nameof(CreatedTime),    nameof(CreatedTime),                 false)] | ||||
| [Index(Chars.FLG_DB_INDEX_PREFIX             + nameof(JobId),          nameof(JobId),                       false)] | ||||
| [Index(Chars.FLG_DB_INDEX_PREFIX             + nameof(HttpStatusCode), nameof(HttpStatusCode),              false)] | ||||
| [FreeSql.DataAnnotations.Index( // | ||||
|     $"{Chars.FLG_DB_INDEX_PREFIX}{nameof(JobId)}_{nameof(TimeId)}", $"{nameof(JobId)},{nameof(TimeId)}", true)] | ||||
| [FreeSql.DataAnnotations.Index(Chars.FLG_DB_INDEX_PREFIX + nameof(CreatedTime), nameof(CreatedTime), false)] | ||||
| [FreeSql.DataAnnotations.Index(Chars.FLG_DB_INDEX_PREFIX + nameof(JobId), nameof(JobId), false)] | ||||
| [FreeSql.DataAnnotations.Index(Chars.FLG_DB_INDEX_PREFIX + nameof(HttpStatusCode), nameof(HttpStatusCode), false)] | ||||
| [Table(Name = Chars.FLG_DB_TABLE_NAME_PREFIX + nameof(Sys_JobRecord))] | ||||
| public record Sys_JobRecord : LiteImmutableEntity | ||||
| { | ||||
| @@ -17,6 +17,7 @@ public record Sys_JobRecord : LiteImmutableEntity | ||||
|     ///     执行耗时(毫秒) | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual long Duration { get; init; } | ||||
|  | ||||
| @@ -24,6 +25,7 @@ public record Sys_JobRecord : LiteImmutableEntity | ||||
|     ///     请求方法 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual HttpMethods HttpMethod { get; init; } | ||||
|  | ||||
| @@ -31,12 +33,14 @@ public record Sys_JobRecord : LiteImmutableEntity | ||||
|     ///     HTTP 状态码 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public int HttpStatusCode { get; init; } | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     拥有者信息 | ||||
|     /// </summary> | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     [Navigate(nameof(JobId))] | ||||
|     public Sys_Job Job { get; init; } | ||||
| @@ -45,6 +49,7 @@ public record Sys_JobRecord : LiteImmutableEntity | ||||
|     ///     作业编号 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual long JobId { get; init; } | ||||
|  | ||||
| @@ -56,6 +61,7 @@ public record Sys_JobRecord : LiteImmutableEntity | ||||
|     #else | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #endif | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string RequestBody { get; init; } | ||||
|  | ||||
| @@ -67,6 +73,7 @@ public record Sys_JobRecord : LiteImmutableEntity | ||||
|     #else | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #endif | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string RequestHeader { get; init; } | ||||
|  | ||||
| @@ -74,6 +81,7 @@ public record Sys_JobRecord : LiteImmutableEntity | ||||
|     ///     请求的网络地址 | ||||
|     /// </summary> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_127)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string RequestUrl { get; init; } | ||||
|  | ||||
| @@ -85,6 +93,7 @@ public record Sys_JobRecord : LiteImmutableEntity | ||||
|     #else | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #endif | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string ResponseBody { get; init; } | ||||
|  | ||||
| @@ -96,6 +105,7 @@ public record Sys_JobRecord : LiteImmutableEntity | ||||
|     #else | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #endif | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string ResponseHeader { get; init; } | ||||
|  | ||||
| @@ -103,6 +113,7 @@ public record Sys_JobRecord : LiteImmutableEntity | ||||
|     ///     执行时间编号 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual long TimeId { get; init; } | ||||
| } | ||||
| @@ -1,5 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.Enums.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.DbMaps.Sys; | ||||
| @@ -7,20 +5,22 @@ namespace NetAdmin.Domain.DbMaps.Sys; | ||||
| /// <summary> | ||||
| ///     菜单表 | ||||
| /// </summary> | ||||
| [Index(Chars.FLG_DB_INDEX_PREFIX             + nameof(Name), nameof(Name), true)] | ||||
| [Table(Name = Chars.FLG_DB_TABLE_NAME_PREFIX + nameof(Sys_Menu))] | ||||
| [FreeSql.DataAnnotations.Index(Chars.FLG_DB_INDEX_PREFIX + nameof(Name), nameof(Name), true)] | ||||
| [Table(Name = Chars.FLG_DB_TABLE_NAME_PREFIX             + nameof(Sys_Menu))] | ||||
| public record Sys_Menu : VersionEntity, IFieldSort | ||||
| { | ||||
|     /// <summary> | ||||
|     ///     子节点或详情页需要高亮的上级菜单路由地址 | ||||
|     /// </summary> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_127)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string Active { get; init; } | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     子节点 | ||||
|     /// </summary> | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     [Navigate(nameof(ParentId))] | ||||
|     public IEnumerable<Sys_Menu> Children { get; init; } | ||||
| @@ -29,6 +29,7 @@ public record Sys_Menu : VersionEntity, IFieldSort | ||||
|     ///     背景颜色 | ||||
|     /// </summary> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_7)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string Color { get; init; } | ||||
|  | ||||
| @@ -36,6 +37,7 @@ public record Sys_Menu : VersionEntity, IFieldSort | ||||
|     ///     组件 | ||||
|     /// </summary> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_63)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string Component { get; init; } | ||||
|  | ||||
| @@ -43,6 +45,7 @@ public record Sys_Menu : VersionEntity, IFieldSort | ||||
|     ///     是否整页路由 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual bool FullPageRouting { get; init; } | ||||
|  | ||||
| @@ -50,6 +53,7 @@ public record Sys_Menu : VersionEntity, IFieldSort | ||||
|     ///     是否隐藏菜单 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual bool Hidden { get; init; } | ||||
|  | ||||
| @@ -57,6 +61,7 @@ public record Sys_Menu : VersionEntity, IFieldSort | ||||
|     ///     是否隐藏面包屑 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual bool HiddenBreadCrumb { get; init; } | ||||
|  | ||||
| @@ -64,6 +69,7 @@ public record Sys_Menu : VersionEntity, IFieldSort | ||||
|     ///     图标 | ||||
|     /// </summary> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_31)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string Icon { get; init; } | ||||
|  | ||||
| @@ -71,6 +77,7 @@ public record Sys_Menu : VersionEntity, IFieldSort | ||||
|     ///     菜单名称 | ||||
|     /// </summary> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_63)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string Name { get; init; } | ||||
|  | ||||
| @@ -78,6 +85,7 @@ public record Sys_Menu : VersionEntity, IFieldSort | ||||
|     ///     父编号 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual long ParentId { get; init; } | ||||
|  | ||||
| @@ -85,6 +93,7 @@ public record Sys_Menu : VersionEntity, IFieldSort | ||||
|     ///     菜单路径 | ||||
|     /// </summary> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_127)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string Path { get; init; } | ||||
|  | ||||
| @@ -92,12 +101,14 @@ public record Sys_Menu : VersionEntity, IFieldSort | ||||
|     ///     重定向地址 | ||||
|     /// </summary> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_127)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string Redirect { get; init; } | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     拥有此菜单的角色集合 | ||||
|     /// </summary> | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     [Navigate(ManyToMany = typeof(Sys_RoleMenu))] | ||||
|     public ICollection<Sys_Role> Roles { get; init; } | ||||
| @@ -106,6 +117,7 @@ public record Sys_Menu : VersionEntity, IFieldSort | ||||
|     ///     排序值,越大越前 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual long Sort { get; init; } | ||||
|  | ||||
| @@ -113,6 +125,7 @@ public record Sys_Menu : VersionEntity, IFieldSort | ||||
|     ///     标签 | ||||
|     /// </summary> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_31)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string Tag { get; init; } | ||||
|  | ||||
| @@ -120,6 +133,7 @@ public record Sys_Menu : VersionEntity, IFieldSort | ||||
|     ///     菜单标题 | ||||
|     /// </summary> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_63)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string Title { get; init; } | ||||
|  | ||||
| @@ -127,6 +141,7 @@ public record Sys_Menu : VersionEntity, IFieldSort | ||||
|     ///     菜单类型 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual MenuTypes Type { get; init; } | ||||
| } | ||||
| @@ -1,21 +1,19 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
|  | ||||
| namespace NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| /// <summary> | ||||
| ///     请求日志表 | ||||
| /// </summary> | ||||
| [Index(Chars.FLG_DB_INDEX_PREFIX             + nameof(ApiId),          nameof(ApiId),          false)] | ||||
| [Index(Chars.FLG_DB_INDEX_PREFIX             + nameof(CreatedTime),    nameof(CreatedTime),    false)] | ||||
| [Index(Chars.FLG_DB_INDEX_PREFIX             + nameof(UserId),         nameof(UserId),         false)] | ||||
| [Index(Chars.FLG_DB_INDEX_PREFIX             + nameof(HttpStatusCode), nameof(HttpStatusCode), false)] | ||||
| [Table(Name = Chars.FLG_DB_TABLE_NAME_PREFIX + nameof(Sys_RequestLog))] | ||||
| [FreeSql.DataAnnotations.Index(Chars.FLG_DB_INDEX_PREFIX + nameof(ApiId),          nameof(ApiId),          false)] | ||||
| [FreeSql.DataAnnotations.Index(Chars.FLG_DB_INDEX_PREFIX + nameof(CreatedTime),    nameof(CreatedTime),    false)] | ||||
| [FreeSql.DataAnnotations.Index(Chars.FLG_DB_INDEX_PREFIX + nameof(UserId),         nameof(UserId),         false)] | ||||
| [FreeSql.DataAnnotations.Index(Chars.FLG_DB_INDEX_PREFIX + nameof(HttpStatusCode), nameof(HttpStatusCode), false)] | ||||
| [Table(Name = Chars.FLG_DB_TABLE_NAME_PREFIX             + nameof(Sys_RequestLog))] | ||||
| public record Sys_RequestLog : SimpleEntity, IFieldCreatedTime, IFieldCreatedClient | ||||
| { | ||||
|     /// <summary> | ||||
|     ///     接口 | ||||
|     /// </summary> | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     [Navigate(nameof(ApiId))] | ||||
|     public Sys_Api Api { get; init; } | ||||
| @@ -24,16 +22,19 @@ public record Sys_RequestLog : SimpleEntity, IFieldCreatedTime, IFieldCreatedCli | ||||
|     ///     接口编号 | ||||
|     /// </summary> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_127)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string ApiId { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [Column(Position = -1)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public int? CreatedClientIp { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [Column(ServerTime = DateTimeKind.Local, CanUpdate = false, Position = -1)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual DateTime CreatedTime { get; init; } | ||||
|  | ||||
| @@ -43,6 +44,7 @@ public record Sys_RequestLog : SimpleEntity, IFieldCreatedTime, IFieldCreatedCli | ||||
|     #else | ||||
|     [Column(Position = -1, DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #endif | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string CreatedUserAgent { get; init; } | ||||
|  | ||||
| @@ -50,6 +52,7 @@ public record Sys_RequestLog : SimpleEntity, IFieldCreatedTime, IFieldCreatedCli | ||||
|     ///     执行耗时(微秒) | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual long Duration { get; init; } | ||||
|  | ||||
| @@ -57,6 +60,7 @@ public record Sys_RequestLog : SimpleEntity, IFieldCreatedTime, IFieldCreatedCli | ||||
|     ///     程序响应码 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual ErrorCodes ErrorCode { get; init; } | ||||
|  | ||||
| @@ -68,6 +72,7 @@ public record Sys_RequestLog : SimpleEntity, IFieldCreatedTime, IFieldCreatedCli | ||||
|     #else | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #endif | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string Exception { get; init; } | ||||
|  | ||||
| @@ -75,6 +80,7 @@ public record Sys_RequestLog : SimpleEntity, IFieldCreatedTime, IFieldCreatedCli | ||||
|     ///     HTTP状态码 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual int HttpStatusCode { get; init; } | ||||
|  | ||||
| @@ -82,6 +88,7 @@ public record Sys_RequestLog : SimpleEntity, IFieldCreatedTime, IFieldCreatedCli | ||||
|     ///     请求方法 | ||||
|     /// </summary> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_15)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string Method { get; init; } | ||||
|  | ||||
| @@ -93,6 +100,7 @@ public record Sys_RequestLog : SimpleEntity, IFieldCreatedTime, IFieldCreatedCli | ||||
|     #else | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #endif | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string RequestBody { get; init; } | ||||
|  | ||||
| @@ -100,6 +108,7 @@ public record Sys_RequestLog : SimpleEntity, IFieldCreatedTime, IFieldCreatedCli | ||||
|     ///     请求content-type | ||||
|     /// </summary> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_63)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string RequestContentType { get; init; } | ||||
|  | ||||
| @@ -111,6 +120,7 @@ public record Sys_RequestLog : SimpleEntity, IFieldCreatedTime, IFieldCreatedCli | ||||
|     #else | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #endif | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string RequestHeaders { get; init; } | ||||
|  | ||||
| @@ -118,6 +128,7 @@ public record Sys_RequestLog : SimpleEntity, IFieldCreatedTime, IFieldCreatedCli | ||||
|     ///     请求地址 | ||||
|     /// </summary> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_127)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string RequestUrl { get; init; } | ||||
|  | ||||
| @@ -129,6 +140,7 @@ public record Sys_RequestLog : SimpleEntity, IFieldCreatedTime, IFieldCreatedCli | ||||
|     #else | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #endif | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string ResponseBody { get; init; } | ||||
|  | ||||
| @@ -136,6 +148,7 @@ public record Sys_RequestLog : SimpleEntity, IFieldCreatedTime, IFieldCreatedCli | ||||
|     ///     响应content-type | ||||
|     /// </summary> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_63)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string ResponseContentType { get; init; } | ||||
|  | ||||
| @@ -147,6 +160,7 @@ public record Sys_RequestLog : SimpleEntity, IFieldCreatedTime, IFieldCreatedCli | ||||
|     #else | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #endif | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string ResponseHeaders { get; init; } | ||||
|  | ||||
| @@ -154,12 +168,14 @@ public record Sys_RequestLog : SimpleEntity, IFieldCreatedTime, IFieldCreatedCli | ||||
|     ///     服务器IP | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual int? ServerIp { get; init; } | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     用户 | ||||
|     /// </summary> | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     [Navigate(nameof(UserId))] | ||||
|     public Sys_User User { get; init; } | ||||
| @@ -168,6 +184,7 @@ public record Sys_RequestLog : SimpleEntity, IFieldCreatedTime, IFieldCreatedCli | ||||
|     ///     用户编号 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual long? UserId { get; init; } | ||||
| } | ||||
| @@ -1,5 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.Dto.Sys.Role; | ||||
| using NetAdmin.Domain.Enums.Sys; | ||||
|  | ||||
| @@ -8,27 +6,42 @@ namespace NetAdmin.Domain.DbMaps.Sys; | ||||
| /// <summary> | ||||
| ///     角色表 | ||||
| /// </summary> | ||||
| [Index(Chars.FLG_DB_INDEX_PREFIX             + nameof(Name), nameof(Name), true)] | ||||
| [Table(Name = Chars.FLG_DB_TABLE_NAME_PREFIX + nameof(Sys_Role))] | ||||
| [FreeSql.DataAnnotations.Index(Chars.FLG_DB_INDEX_PREFIX + nameof(Name), nameof(Name), true)] | ||||
| [Table(Name = Chars.FLG_DB_TABLE_NAME_PREFIX             + nameof(Sys_Role))] | ||||
| public record Sys_Role : VersionEntity, IFieldSort, IFieldEnabled, IFieldSummary, IRegister | ||||
| { | ||||
|     /// <summary> | ||||
|     ///     角色-接口映射 | ||||
|     /// </summary> | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     [Navigate(ManyToMany = typeof(Sys_RoleApi))] | ||||
|     public ICollection<Sys_Api> Apis { get; init; } | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     仪表板布局 | ||||
|     /// </summary> | ||||
|     #if DBTYPE_SQLSERVER | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)] | ||||
|     #else | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #endif | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string DashboardLayout { get; set; } | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     数据范围 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual DataScopes DataScope { get; init; } | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     角色-部门映射 | ||||
|     /// </summary> | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     [Navigate(ManyToMany = typeof(Sys_RoleDept))] | ||||
|     public ICollection<Sys_Dept> Depts { get; init; } | ||||
| @@ -37,6 +50,7 @@ public record Sys_Role : VersionEntity, IFieldSort, IFieldEnabled, IFieldSummary | ||||
|     ///     是否显示仪表板 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual bool DisplayDashboard { get; init; } | ||||
|  | ||||
| @@ -44,6 +58,7 @@ public record Sys_Role : VersionEntity, IFieldSort, IFieldEnabled, IFieldSummary | ||||
|     ///     是否启用 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual bool Enabled { get; init; } | ||||
|  | ||||
| @@ -51,12 +66,14 @@ public record Sys_Role : VersionEntity, IFieldSort, IFieldEnabled, IFieldSummary | ||||
|     ///     是否忽略权限控制 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual bool IgnorePermissionControl { get; init; } | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     角色-菜单映射 | ||||
|     /// </summary> | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     [Navigate(ManyToMany = typeof(Sys_RoleMenu))] | ||||
|     public ICollection<Sys_Menu> Menus { get; init; } | ||||
| @@ -65,12 +82,14 @@ public record Sys_Role : VersionEntity, IFieldSort, IFieldEnabled, IFieldSummary | ||||
|     ///     角色名称 | ||||
|     /// </summary> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_31)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string Name { get; init; } | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     发送给此角色的站内信集合 | ||||
|     /// </summary> | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     [Navigate(ManyToMany = typeof(Sys_SiteMsgRole))] | ||||
|     public ICollection<Sys_SiteMsg> SiteMsgs { get; init; } | ||||
| @@ -79,6 +98,7 @@ public record Sys_Role : VersionEntity, IFieldSort, IFieldEnabled, IFieldSummary | ||||
|     ///     排序值,越大越前 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual long Sort { get; init; } | ||||
|  | ||||
| @@ -86,18 +106,20 @@ public record Sys_Role : VersionEntity, IFieldSort, IFieldEnabled, IFieldSummary | ||||
|     ///     备注 | ||||
|     /// </summary> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string Summary { get; init; } | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     此角色下的用户集合 | ||||
|     /// </summary> | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     [Navigate(ManyToMany = typeof(Sys_UserRole))] | ||||
|     public ICollection<Sys_User> Users { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     public void Register(TypeAdapterConfig config) | ||||
|     public virtual void Register(TypeAdapterConfig config) | ||||
|     { | ||||
|         _ = config.ForType<CreateRoleReq, Sys_Role>() | ||||
|                   .Map( // | ||||
|   | ||||
| @@ -1,5 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
|  | ||||
| namespace NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| /// <summary> | ||||
| @@ -11,6 +9,7 @@ public record Sys_RoleApi : ImmutableEntity | ||||
|     /// <summary> | ||||
|     ///     关联的接口 | ||||
|     /// </summary> | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public Sys_Api Api { get; init; } | ||||
|  | ||||
| @@ -18,12 +17,14 @@ public record Sys_RoleApi : ImmutableEntity | ||||
|     ///     接口编号 | ||||
|     /// </summary> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_127)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public string ApiId { get; init; } | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     关联的角色 | ||||
|     /// </summary> | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public Sys_Role Role { get; init; } | ||||
|  | ||||
| @@ -31,6 +32,7 @@ public record Sys_RoleApi : ImmutableEntity | ||||
|     ///     角色编号 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public long RoleId { get; init; } | ||||
| } | ||||
| @@ -1,17 +1,17 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
|  | ||||
| namespace NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| /// <summary> | ||||
| ///     角色-部门映射表 | ||||
| /// </summary> | ||||
| [Index($"{Chars.FLG_DB_INDEX_PREFIX}{nameof(RoleId)}_{nameof(DeptId)}", $"{nameof(RoleId)},{nameof(DeptId)}", true)] | ||||
| [FreeSql.DataAnnotations.Index( // | ||||
|     $"{Chars.FLG_DB_INDEX_PREFIX}{nameof(RoleId)}_{nameof(DeptId)}", $"{nameof(RoleId)},{nameof(DeptId)}", true)] | ||||
| [Table(Name = Chars.FLG_DB_TABLE_NAME_PREFIX + nameof(Sys_RoleDept))] | ||||
| public record Sys_RoleDept : ImmutableEntity | ||||
| { | ||||
|     /// <summary> | ||||
|     ///     关联的部门 | ||||
|     /// </summary> | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public Sys_Dept Dept { get; init; } | ||||
|  | ||||
| @@ -19,12 +19,14 @@ public record Sys_RoleDept : ImmutableEntity | ||||
|     ///     可访问的部门编号 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public long DeptId { get; init; } | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     关联的角色 | ||||
|     /// </summary> | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public Sys_Role Role { get; init; } | ||||
|  | ||||
| @@ -32,6 +34,7 @@ public record Sys_RoleDept : ImmutableEntity | ||||
|     ///     角色编号 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public long RoleId { get; init; } | ||||
| } | ||||
| @@ -1,17 +1,17 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
|  | ||||
| namespace NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| /// <summary> | ||||
| ///     角色-菜单映射表 | ||||
| /// </summary> | ||||
| [Index($"{Chars.FLG_DB_INDEX_PREFIX}{nameof(RoleId)}_{nameof(MenuId)}", $"{nameof(RoleId)},{nameof(MenuId)}", true)] | ||||
| [FreeSql.DataAnnotations.Index( // | ||||
|     $"{Chars.FLG_DB_INDEX_PREFIX}{nameof(RoleId)}_{nameof(MenuId)}", $"{nameof(RoleId)},{nameof(MenuId)}", true)] | ||||
| [Table(Name = Chars.FLG_DB_TABLE_NAME_PREFIX + nameof(Sys_RoleMenu))] | ||||
| public record Sys_RoleMenu : ImmutableEntity | ||||
| { | ||||
|     /// <summary> | ||||
|     ///     关联的菜单 | ||||
|     /// </summary> | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public Sys_Menu Menu { get; init; } | ||||
|  | ||||
| @@ -19,12 +19,14 @@ public record Sys_RoleMenu : ImmutableEntity | ||||
|     ///     菜单编号 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual long MenuId { get; init; } | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     关联的角色 | ||||
|     /// </summary> | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public Sys_Role Role { get; init; } | ||||
|  | ||||
| @@ -32,6 +34,7 @@ public record Sys_RoleMenu : ImmutableEntity | ||||
|     ///     角色编号 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual long RoleId { get; init; } | ||||
| } | ||||
| @@ -1,5 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.Dto.Sys.SiteMsg; | ||||
| using NetAdmin.Domain.Enums.Sys; | ||||
|  | ||||
| @@ -19,12 +17,14 @@ public record Sys_SiteMsg : VersionEntity, IRegister, IFieldSummary | ||||
|     #else | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #endif | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string Content { get; init; } | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     消息-创建者映射 | ||||
|     /// </summary> | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     [Navigate(nameof(CreatedUserId))] | ||||
|     public Sys_User Creator { get; init; } | ||||
| @@ -32,6 +32,7 @@ public record Sys_SiteMsg : VersionEntity, IRegister, IFieldSummary | ||||
|     /// <summary> | ||||
|     ///     消息-部门映射 | ||||
|     /// </summary> | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     [Navigate(ManyToMany = typeof(Sys_SiteMsgDept))] | ||||
|     public ICollection<Sys_Dept> Depts { get; init; } | ||||
| @@ -39,6 +40,7 @@ public record Sys_SiteMsg : VersionEntity, IRegister, IFieldSummary | ||||
|     /// <summary> | ||||
|     ///     消息-标记映射 | ||||
|     /// </summary> | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     [Navigate(nameof(Sys_SiteMsgFlag.SiteMsgId))] | ||||
|     public ICollection<Sys_SiteMsgFlag> Flags { get; init; } | ||||
| @@ -46,12 +48,14 @@ public record Sys_SiteMsg : VersionEntity, IRegister, IFieldSummary | ||||
|     /// <summary> | ||||
|     ///     消息类型 | ||||
|     /// </summary> | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual SiteMsgTypes MsgType { get; init; } | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     消息-角色映射 | ||||
|     /// </summary> | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     [Navigate(ManyToMany = typeof(Sys_SiteMsgRole))] | ||||
|     public ICollection<Sys_Role> Roles { get; init; } | ||||
| @@ -60,6 +64,7 @@ public record Sys_SiteMsg : VersionEntity, IRegister, IFieldSummary | ||||
|     ///     消息摘要 | ||||
|     /// </summary> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string Summary { get; init; } | ||||
|  | ||||
| @@ -67,12 +72,14 @@ public record Sys_SiteMsg : VersionEntity, IRegister, IFieldSummary | ||||
|     ///     消息主题 | ||||
|     /// </summary> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string Title { get; init; } | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     消息-用户映射 | ||||
|     /// </summary> | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     [Navigate(ManyToMany = typeof(Sys_SiteMsgUser))] | ||||
|     public ICollection<Sys_User> Users { get; init; } | ||||
|   | ||||
| @@ -1,18 +1,17 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
|  | ||||
| namespace NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| /// <summary> | ||||
| ///     站内信-部门映射表 | ||||
| /// </summary> | ||||
| [Index($"{Chars.FLG_DB_INDEX_PREFIX}{nameof(DeptId)}_{nameof(SiteMsgId)}", $"{nameof(DeptId)},{nameof(SiteMsgId)}" | ||||
|      , true)] | ||||
| [FreeSql.DataAnnotations.Index( // | ||||
|     $"{Chars.FLG_DB_INDEX_PREFIX}{nameof(DeptId)}_{nameof(SiteMsgId)}", $"{nameof(DeptId)},{nameof(SiteMsgId)}", true)] | ||||
| [Table(Name = Chars.FLG_DB_TABLE_NAME_PREFIX + nameof(Sys_SiteMsgDept))] | ||||
| public record Sys_SiteMsgDept : ImmutableEntity | ||||
| { | ||||
|     /// <summary> | ||||
|     ///     关联的部门 | ||||
|     /// </summary> | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public Sys_Dept Dept { get; init; } | ||||
|  | ||||
| @@ -20,12 +19,14 @@ public record Sys_SiteMsgDept : ImmutableEntity | ||||
|     ///     部门编号 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public long DeptId { get; init; } | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     关联的站内信 | ||||
|     /// </summary> | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public Sys_SiteMsg SiteMsg { get; init; } | ||||
|  | ||||
| @@ -33,6 +34,7 @@ public record Sys_SiteMsgDept : ImmutableEntity | ||||
|     ///     站内信编号 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public long SiteMsgId { get; init; } | ||||
| } | ||||
| @@ -1,4 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.Enums.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.DbMaps.Sys; | ||||
| @@ -6,8 +5,8 @@ namespace NetAdmin.Domain.DbMaps.Sys; | ||||
| /// <summary> | ||||
| ///     站内信标记表 | ||||
| /// </summary> | ||||
| [Index($"{Chars.FLG_DB_INDEX_PREFIX}{nameof(SiteMsgId)}_{nameof(UserId)}", $"{nameof(SiteMsgId)},{nameof(UserId)}" | ||||
|      , true)] | ||||
| [FreeSql.DataAnnotations.Index( // | ||||
|     $"{Chars.FLG_DB_INDEX_PREFIX}{nameof(SiteMsgId)}_{nameof(UserId)}", $"{nameof(SiteMsgId)},{nameof(UserId)}", true)] | ||||
| [Table(Name = Chars.FLG_DB_TABLE_NAME_PREFIX + nameof(Sys_SiteMsgFlag))] | ||||
| public record Sys_SiteMsgFlag : MutableEntity | ||||
| { | ||||
| @@ -15,6 +14,7 @@ public record Sys_SiteMsgFlag : MutableEntity | ||||
|     ///     站内信编号 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual long SiteMsgId { get; init; } | ||||
|  | ||||
| @@ -22,6 +22,7 @@ public record Sys_SiteMsgFlag : MutableEntity | ||||
|     ///     用户编号 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public long UserId { get; init; } | ||||
|  | ||||
| @@ -29,6 +30,7 @@ public record Sys_SiteMsgFlag : MutableEntity | ||||
|     ///     用户站内信状态 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual UserSiteMsgStatues UserSiteMsgStatus { get; init; } | ||||
| } | ||||
| @@ -1,18 +1,17 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
|  | ||||
| namespace NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| /// <summary> | ||||
| ///     站内信-角色映射表 | ||||
| /// </summary> | ||||
| [Index($"{Chars.FLG_DB_INDEX_PREFIX}{nameof(RoleId)}_{nameof(SiteMsgId)}", $"{nameof(RoleId)},{nameof(SiteMsgId)}" | ||||
|      , true)] | ||||
| [FreeSql.DataAnnotations.Index( // | ||||
|     $"{Chars.FLG_DB_INDEX_PREFIX}{nameof(RoleId)}_{nameof(SiteMsgId)}", $"{nameof(RoleId)},{nameof(SiteMsgId)}", true)] | ||||
| [Table(Name = Chars.FLG_DB_TABLE_NAME_PREFIX + nameof(Sys_SiteMsgRole))] | ||||
| public record Sys_SiteMsgRole : ImmutableEntity | ||||
| { | ||||
|     /// <summary> | ||||
|     ///     关联的角色 | ||||
|     /// </summary> | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public Sys_Role Role { get; init; } | ||||
|  | ||||
| @@ -20,12 +19,14 @@ public record Sys_SiteMsgRole : ImmutableEntity | ||||
|     ///     角色编号 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public long RoleId { get; init; } | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     关联的站内信 | ||||
|     /// </summary> | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public Sys_SiteMsg SiteMsg { get; init; } | ||||
|  | ||||
| @@ -33,6 +34,7 @@ public record Sys_SiteMsgRole : ImmutableEntity | ||||
|     ///     站内信编号 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public long SiteMsgId { get; init; } | ||||
| } | ||||
| @@ -1,18 +1,17 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
|  | ||||
| namespace NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| /// <summary> | ||||
| ///     站内信-用户映射表 | ||||
| /// </summary> | ||||
| [Index($"{Chars.FLG_DB_INDEX_PREFIX}{nameof(UserId)}_{nameof(SiteMsgId)}", $"{nameof(UserId)},{nameof(SiteMsgId)}" | ||||
|      , true)] | ||||
| [FreeSql.DataAnnotations.Index( // | ||||
|     $"{Chars.FLG_DB_INDEX_PREFIX}{nameof(UserId)}_{nameof(SiteMsgId)}", $"{nameof(UserId)},{nameof(SiteMsgId)}", true)] | ||||
| [Table(Name = Chars.FLG_DB_TABLE_NAME_PREFIX + nameof(Sys_SiteMsgUser))] | ||||
| public record Sys_SiteMsgUser : ImmutableEntity | ||||
| { | ||||
|     /// <summary> | ||||
|     ///     关联的站内信 | ||||
|     /// </summary> | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public Sys_SiteMsg SiteMsg { get; init; } | ||||
|  | ||||
| @@ -20,12 +19,14 @@ public record Sys_SiteMsgUser : ImmutableEntity | ||||
|     ///     站内信编号 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public long SiteMsgId { get; init; } | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     关联的用户 | ||||
|     /// </summary> | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public Sys_User User { get; init; } | ||||
|  | ||||
| @@ -33,6 +34,7 @@ public record Sys_SiteMsgUser : ImmutableEntity | ||||
|     ///     用户编号 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public long UserId { get; init; } | ||||
| } | ||||
| @@ -1,5 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.Dto.Sys.User; | ||||
|  | ||||
| namespace NetAdmin.Domain.DbMaps.Sys; | ||||
| @@ -7,22 +5,24 @@ namespace NetAdmin.Domain.DbMaps.Sys; | ||||
| /// <summary> | ||||
| ///     用户基本信息表 | ||||
| /// </summary> | ||||
| [Index(Chars.FLG_DB_INDEX_PREFIX             + nameof(Email),    nameof(Email),    true)] | ||||
| [Index(Chars.FLG_DB_INDEX_PREFIX             + nameof(Mobile),   nameof(Mobile),   true)] | ||||
| [Index(Chars.FLG_DB_INDEX_PREFIX             + nameof(UserName), nameof(UserName), true)] | ||||
| [Table(Name = Chars.FLG_DB_TABLE_NAME_PREFIX + nameof(Sys_User))] | ||||
| [FreeSql.DataAnnotations.Index(Chars.FLG_DB_INDEX_PREFIX + nameof(Email),    nameof(Email),    true)] | ||||
| [FreeSql.DataAnnotations.Index(Chars.FLG_DB_INDEX_PREFIX + nameof(Mobile),   nameof(Mobile),   true)] | ||||
| [FreeSql.DataAnnotations.Index(Chars.FLG_DB_INDEX_PREFIX + nameof(UserName), nameof(UserName), true)] | ||||
| [Table(Name = Chars.FLG_DB_TABLE_NAME_PREFIX             + nameof(Sys_User))] | ||||
| public record Sys_User : VersionEntity, IFieldSummary, IFieldEnabled, IRegister | ||||
| { | ||||
|     /// <summary> | ||||
|     ///     头像链接 | ||||
|     /// </summary> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_127)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string Avatar { get; init; } | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     所属部门 | ||||
|     /// </summary> | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     [Navigate(nameof(DeptId))] | ||||
|     public Sys_Dept Dept { get; init; } | ||||
| @@ -31,6 +31,7 @@ public record Sys_User : VersionEntity, IFieldSummary, IFieldEnabled, IRegister | ||||
|     ///     部门编号 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual long DeptId { get; init; } | ||||
|  | ||||
| @@ -38,6 +39,7 @@ public record Sys_User : VersionEntity, IFieldSummary, IFieldEnabled, IRegister | ||||
|     ///     邮箱 | ||||
|     /// </summary> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_63)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string Email { get; init; } | ||||
|  | ||||
| @@ -45,6 +47,7 @@ public record Sys_User : VersionEntity, IFieldSummary, IFieldEnabled, IRegister | ||||
|     ///     是否启用 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual bool Enabled { get; init; } | ||||
|  | ||||
| @@ -52,6 +55,7 @@ public record Sys_User : VersionEntity, IFieldSummary, IFieldEnabled, IRegister | ||||
|     ///     手机号码 | ||||
|     /// </summary> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_15)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string Mobile { get; init; } | ||||
|  | ||||
| @@ -59,18 +63,21 @@ public record Sys_User : VersionEntity, IFieldSummary, IFieldEnabled, IRegister | ||||
|     ///     密码 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public Guid Password { get; init; } | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     用户档案 | ||||
|     /// </summary> | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public Sys_UserProfile Profile { get; init; } | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     所属角色 | ||||
|     /// </summary> | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     [Navigate(ManyToMany = typeof(Sys_UserRole))] | ||||
|     public ICollection<Sys_Role> Roles { get; init; } | ||||
| @@ -78,6 +85,7 @@ public record Sys_User : VersionEntity, IFieldSummary, IFieldEnabled, IRegister | ||||
|     /// <summary> | ||||
|     ///     发送给此用户的站内信集合 | ||||
|     /// </summary> | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     [Navigate(ManyToMany = typeof(Sys_SiteMsgUser))] | ||||
|     public ICollection<Sys_SiteMsg> SiteMsgs { get; init; } | ||||
| @@ -86,6 +94,7 @@ public record Sys_User : VersionEntity, IFieldSummary, IFieldEnabled, IRegister | ||||
|     ///     描述 | ||||
|     /// </summary> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string Summary { get; init; } | ||||
|  | ||||
| @@ -93,6 +102,7 @@ public record Sys_User : VersionEntity, IFieldSummary, IFieldEnabled, IRegister | ||||
|     ///     授权验证Token,全局唯一,可以随时重置(强制下线) | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public Guid Token { get; init; } | ||||
|  | ||||
| @@ -100,11 +110,12 @@ public record Sys_User : VersionEntity, IFieldSummary, IFieldEnabled, IRegister | ||||
|     ///     用户名 | ||||
|     /// </summary> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_31)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string UserName { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     public void Register(TypeAdapterConfig config) | ||||
|     public virtual void Register(TypeAdapterConfig config) | ||||
|     { | ||||
|         _ = config.ForType<CreateUserReq, Sys_User>() | ||||
|                   .Map(d => d.Password, s => s.PasswordText.Pwd().Guid()) | ||||
|   | ||||
| @@ -1,4 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.Dto.Sys.UserProfile; | ||||
|  | ||||
| namespace NetAdmin.Domain.DbMaps.Sys; | ||||
| @@ -17,13 +16,15 @@ public record Sys_UserProfile : VersionEntity, IRegister | ||||
|     #else | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #endif | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string AppConfig { get; init; } | ||||
|     public virtual string AppConfig { get; set; } | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     出生日期 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual DateTime? BornDate { get; init; } | ||||
|  | ||||
| @@ -31,6 +32,7 @@ public record Sys_UserProfile : VersionEntity, IRegister | ||||
|     ///     证件号码 | ||||
|     /// </summary> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_63)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string CertificateNumber { get; init; } | ||||
|  | ||||
| @@ -38,6 +40,7 @@ public record Sys_UserProfile : VersionEntity, IRegister | ||||
|     ///     证件类型 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual CertificateTypes? CertificateType { get; init; } | ||||
|  | ||||
| @@ -45,6 +48,7 @@ public record Sys_UserProfile : VersionEntity, IRegister | ||||
|     ///     工作地址 | ||||
|     /// </summary> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_127)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string CompanyAddress { get; init; } | ||||
|  | ||||
| @@ -52,6 +56,7 @@ public record Sys_UserProfile : VersionEntity, IRegister | ||||
|     ///     工作地区 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public int? CompanyArea { get; init; } | ||||
|  | ||||
| @@ -59,6 +64,7 @@ public record Sys_UserProfile : VersionEntity, IRegister | ||||
|     ///     工作单位 | ||||
|     /// </summary> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_31)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string CompanyName { get; init; } | ||||
|  | ||||
| @@ -66,6 +72,7 @@ public record Sys_UserProfile : VersionEntity, IRegister | ||||
|     ///     工作电话 | ||||
|     /// </summary> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_31)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string CompanyTelephone { get; init; } | ||||
|  | ||||
| @@ -73,6 +80,7 @@ public record Sys_UserProfile : VersionEntity, IRegister | ||||
|     ///     文化程度 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual Educations? Education { get; init; } | ||||
|  | ||||
| @@ -80,6 +88,7 @@ public record Sys_UserProfile : VersionEntity, IRegister | ||||
|     ///     紧急联系地址 | ||||
|     /// </summary> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_127)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string EmergencyContactAddress { get; init; } | ||||
|  | ||||
| @@ -87,13 +96,15 @@ public record Sys_UserProfile : VersionEntity, IRegister | ||||
|     ///     紧急联系地区 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public int? EmergencyContactArea { get; init; } | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     紧急联系人手机号码 | ||||
|     ///     紧急联系人手机号 | ||||
|     /// </summary> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_15)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string EmergencyContactMobile { get; init; } | ||||
|  | ||||
| @@ -101,6 +112,7 @@ public record Sys_UserProfile : VersionEntity, IRegister | ||||
|     ///     紧急联系人 | ||||
|     /// </summary> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_31)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string EmergencyContactName { get; init; } | ||||
|  | ||||
| @@ -108,6 +120,7 @@ public record Sys_UserProfile : VersionEntity, IRegister | ||||
|     ///     毕业学校 | ||||
|     /// </summary> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_31)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string GraduateSchool { get; init; } | ||||
|  | ||||
| @@ -115,6 +128,7 @@ public record Sys_UserProfile : VersionEntity, IRegister | ||||
|     ///     身高 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual int? Height { get; init; } | ||||
|  | ||||
| @@ -122,6 +136,7 @@ public record Sys_UserProfile : VersionEntity, IRegister | ||||
|     ///     住宅地址 | ||||
|     /// </summary> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_127)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string HomeAddress { get; init; } | ||||
|  | ||||
| @@ -129,6 +144,7 @@ public record Sys_UserProfile : VersionEntity, IRegister | ||||
|     ///     住宅地区 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public int? HomeArea { get; init; } | ||||
|  | ||||
| @@ -136,6 +152,7 @@ public record Sys_UserProfile : VersionEntity, IRegister | ||||
|     ///     住宅电话 | ||||
|     /// </summary> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_31)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string HomeTelephone { get; init; } | ||||
|  | ||||
| @@ -143,6 +160,7 @@ public record Sys_UserProfile : VersionEntity, IRegister | ||||
|     ///     婚姻状况 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual MarriageStatues? MarriageStatus { get; init; } | ||||
|  | ||||
| @@ -151,6 +169,7 @@ public record Sys_UserProfile : VersionEntity, IRegister | ||||
|     /// </summary> | ||||
|     /// 7 | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual Nations? Nation { get; init; } | ||||
|  | ||||
| @@ -158,6 +177,7 @@ public record Sys_UserProfile : VersionEntity, IRegister | ||||
|     ///     籍贯 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public int? NationArea { get; init; } | ||||
|  | ||||
| @@ -165,6 +185,7 @@ public record Sys_UserProfile : VersionEntity, IRegister | ||||
|     ///     政治面貌 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual PoliticalStatues? PoliticalStatus { get; init; } | ||||
|  | ||||
| @@ -172,6 +193,7 @@ public record Sys_UserProfile : VersionEntity, IRegister | ||||
|     ///     职业 | ||||
|     /// </summary> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_31)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string Profession { get; init; } | ||||
|  | ||||
| @@ -179,6 +201,7 @@ public record Sys_UserProfile : VersionEntity, IRegister | ||||
|     ///     真实姓名 | ||||
|     /// </summary> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_31)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string RealName { get; init; } | ||||
|  | ||||
| @@ -186,12 +209,14 @@ public record Sys_UserProfile : VersionEntity, IRegister | ||||
|     ///     性别 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual Sexes? Sex { get; init; } | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     用户基本信息 | ||||
|     /// </summary> | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public Sys_User User { get; init; } | ||||
|  | ||||
|   | ||||
| @@ -1,5 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
|  | ||||
| namespace NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| /// <summary> | ||||
| @@ -11,6 +9,7 @@ public record Sys_UserRole : VersionEntity | ||||
|     /// <summary> | ||||
|     ///     关联的角色 | ||||
|     /// </summary> | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public Sys_Role Role { get; init; } | ||||
|  | ||||
| @@ -18,12 +17,14 @@ public record Sys_UserRole : VersionEntity | ||||
|     ///     角色编号 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public long RoleId { get; init; } | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     关联的用户 | ||||
|     /// </summary> | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public Sys_User User { get; init; } | ||||
|  | ||||
| @@ -31,6 +32,7 @@ public record Sys_UserRole : VersionEntity | ||||
|     ///     用户编号 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public long UserId { get; init; } | ||||
| } | ||||
| @@ -1,4 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.Enums.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.DbMaps.Sys; | ||||
| @@ -13,6 +12,7 @@ public record Sys_VerifyCode : VersionEntity | ||||
|     ///     验证码 | ||||
|     /// </summary> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_7)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string Code { get; init; } | ||||
|  | ||||
| @@ -20,6 +20,7 @@ public record Sys_VerifyCode : VersionEntity | ||||
|     ///     目标设备 | ||||
|     /// </summary> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_63)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual string DestDevice { get; init; } | ||||
|  | ||||
| @@ -27,6 +28,7 @@ public record Sys_VerifyCode : VersionEntity | ||||
|     ///     设备类型 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual VerifyCodeDeviceTypes DeviceType { get; init; } | ||||
|  | ||||
| @@ -34,6 +36,7 @@ public record Sys_VerifyCode : VersionEntity | ||||
|     ///     发送报告 | ||||
|     /// </summary> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public string Report { get; init; } | ||||
|  | ||||
| @@ -41,6 +44,7 @@ public record Sys_VerifyCode : VersionEntity | ||||
|     ///     验证码状态 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual VerifyCodeStatues Status { get; init; } | ||||
|  | ||||
| @@ -48,6 +52,7 @@ public record Sys_VerifyCode : VersionEntity | ||||
|     ///     验证码类型 | ||||
|     /// </summary> | ||||
|     [Column] | ||||
|     [Ignore] | ||||
|     [JsonIgnore] | ||||
|     public virtual VerifyCodeTypes Type { get; init; } | ||||
| } | ||||
| @@ -1,5 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
|  | ||||
| namespace NetAdmin.Domain.DbMaps.Tpl; | ||||
|  | ||||
| /// <summary> | ||||
|   | ||||
| @@ -1,5 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Dependency; | ||||
|  | ||||
| /// <inheritdoc cref="DelReq{T}" /> | ||||
|   | ||||
| @@ -1,5 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.Api; | ||||
|  | ||||
| /// <summary> | ||||
|   | ||||
							
								
								
									
										35
									
								
								src/backend/NetAdmin.Domain/Dto/Sys/Api/ExportApiRsp.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								src/backend/NetAdmin.Domain/Dto/Sys/Api/ExportApiRsp.cs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,35 @@ | ||||
| namespace NetAdmin.Domain.Dto.Sys.Api; | ||||
|  | ||||
| /// <summary> | ||||
| ///     响应:导出接口 | ||||
| /// </summary> | ||||
| public record ExportApiRsp : QueryApiRsp | ||||
| { | ||||
|     /// <inheritdoc /> | ||||
|     [Ignore] | ||||
|     public override IEnumerable<QueryApiRsp> Children { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [CsvIndex(0)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.接口路径))] | ||||
|     public override string Id { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [CsvIndex(2)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.请求方式))] | ||||
|     public override string Method { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [CsvIndex(1)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.接口名称))] | ||||
|     public override string Name { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [CsvIndex(3)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.接口描述))] | ||||
|     public override string Summary { get; init; } | ||||
| } | ||||
| @@ -1,5 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.Api; | ||||
|  | ||||
| /// <summary> | ||||
|   | ||||
| @@ -1,16 +1,12 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.Api; | ||||
|  | ||||
| /// <summary> | ||||
| ///     响应:查询接口 | ||||
| /// </summary> | ||||
| public sealed record QueryApiRsp : Sys_Api | ||||
| public record QueryApiRsp : Sys_Api | ||||
| { | ||||
|     /// <inheritdoc cref="Sys_Api.Children" /> | ||||
|     public new IEnumerable<QueryApiRsp> Children { get; init; } | ||||
|     public new virtual IEnumerable<QueryApiRsp> Children { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     public override string Id { get; init; } | ||||
|   | ||||
| @@ -1,6 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.Config; | ||||
|  | ||||
| /// <summary> | ||||
|   | ||||
| @@ -1,5 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.Config; | ||||
|  | ||||
| /// <summary> | ||||
|   | ||||
| @@ -0,0 +1,60 @@ | ||||
| using NetAdmin.Domain.Dto.Sys.Dept; | ||||
| using NetAdmin.Domain.Dto.Sys.Role; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.Config; | ||||
|  | ||||
| /// <summary> | ||||
| ///     响应:导出配置 | ||||
| /// </summary> | ||||
| public record ExportConfigRsp : QueryConfigRsp, IRegister | ||||
| { | ||||
|     /// <inheritdoc /> | ||||
|     [CsvIndex(6)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.是否启用))] | ||||
|     public override bool Enabled { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [CsvIndex(0)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.唯一编码))] | ||||
|     public override long Id { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [CsvIndex(3)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.人工审核))] | ||||
|     public override bool UserRegisterConfirm { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [Ignore] | ||||
|     public override QueryDeptRsp UserRegisterDept { get; init; } | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     默认部门 | ||||
|     /// </summary> | ||||
|     [CsvIndex(1)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.默认部门))] | ||||
|     public string UserRegisterDeptName { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [Ignore] | ||||
|     public override QueryRoleRsp UserRegisterRole { get; init; } | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     默认角色 | ||||
|     /// </summary> | ||||
|     [CsvIndex(2)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.默认角色))] | ||||
|     public string UserRegisterRoleName { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     public void Register(TypeAdapterConfig config) | ||||
|     { | ||||
|         _ = config.ForType<Sys_Config, ExportConfigRsp>() | ||||
|                   .Map(d => d.UserRegisterDeptName, s => s.UserRegisterDept.Name) | ||||
|                   .Map(d => d.UserRegisterRoleName, s => s.UserRegisterRole.Name); | ||||
|     } | ||||
| } | ||||
| @@ -1,7 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.Config; | ||||
|  | ||||
| /// <summary> | ||||
|   | ||||
| @@ -1,6 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
| using NetAdmin.Domain.Dto.Sys.Dept; | ||||
| using NetAdmin.Domain.Dto.Sys.Role; | ||||
|  | ||||
| @@ -9,7 +6,7 @@ namespace NetAdmin.Domain.Dto.Sys.Config; | ||||
| /// <summary> | ||||
| ///     响应:查询配置 | ||||
| /// </summary> | ||||
| public sealed record QueryConfigRsp : Sys_Config | ||||
| public record QueryConfigRsp : Sys_Config | ||||
| { | ||||
|     /// <inheritdoc cref="IFieldCreatedTime.CreatedTime" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
| @@ -29,7 +26,7 @@ public sealed record QueryConfigRsp : Sys_Config | ||||
|  | ||||
|     /// <inheritdoc cref="Sys_Config.UserRegisterDept" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] | ||||
|     public new QueryDeptRsp UserRegisterDept { get; init; } | ||||
|     public new virtual QueryDeptRsp UserRegisterDept { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="Sys_Config.UserRegisterDeptId" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
| @@ -37,7 +34,7 @@ public sealed record QueryConfigRsp : Sys_Config | ||||
|  | ||||
|     /// <inheritdoc cref="Sys_Config.UserRegisterRole" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] | ||||
|     public new QueryRoleRsp UserRegisterRole { get; init; } | ||||
|     public new virtual QueryRoleRsp UserRegisterRole { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="Sys_Config.UserRegisterRoleId" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|   | ||||
| @@ -1,7 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.Config; | ||||
|  | ||||
| /// <summary> | ||||
|   | ||||
| @@ -1,6 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.Dept; | ||||
|  | ||||
| /// <summary> | ||||
|   | ||||
| @@ -1,6 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.Dept; | ||||
|  | ||||
| /// <summary> | ||||
|   | ||||
							
								
								
									
										47
									
								
								src/backend/NetAdmin.Domain/Dto/Sys/Dept/ExportDeptRsp.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										47
									
								
								src/backend/NetAdmin.Domain/Dto/Sys/Dept/ExportDeptRsp.cs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,47 @@ | ||||
| namespace NetAdmin.Domain.Dto.Sys.Dept; | ||||
|  | ||||
| /// <summary> | ||||
| ///     响应:导出部门 | ||||
| /// </summary> | ||||
| public record ExportDeptRsp : QueryDeptRsp | ||||
| { | ||||
|     /// <inheritdoc /> | ||||
|     [Ignore] | ||||
|     public override IEnumerable<QueryDeptRsp> Children { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [CsvIndex(5)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.创建时间))] | ||||
|     public override DateTime CreatedTime { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [CsvIndex(4)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.是否启用))] | ||||
|     public override bool Enabled { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [CsvIndex(0)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.唯一编码))] | ||||
|     public override long Id { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [CsvIndex(1)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.部门名称))] | ||||
|     public override string Name { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [CsvIndex(2)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.排序))] | ||||
|     public override long Sort { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [CsvIndex(3)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.备注))] | ||||
|     public override string Summary { get; init; } | ||||
| } | ||||
| @@ -1,6 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.Dept; | ||||
|  | ||||
| /// <summary> | ||||
|   | ||||
| @@ -1,16 +1,12 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.Dept; | ||||
|  | ||||
| /// <summary> | ||||
| ///     响应:查询部门 | ||||
| /// </summary> | ||||
| public sealed record QueryDeptRsp : Sys_Dept | ||||
| public record QueryDeptRsp : Sys_Dept | ||||
| { | ||||
|     /// <inheritdoc cref="Sys_Dept.Children" /> | ||||
|     public new IEnumerable<QueryDeptRsp> Children { get; init; } | ||||
|     public new virtual IEnumerable<QueryDeptRsp> Children { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="IFieldCreatedTime.CreatedTime" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|   | ||||
| @@ -1,7 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.Dept; | ||||
|  | ||||
| /// <summary> | ||||
|   | ||||
| @@ -1,5 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.Dic.Catalog; | ||||
|  | ||||
| /// <summary> | ||||
|   | ||||
| @@ -1,5 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.Dic.Catalog; | ||||
|  | ||||
| /// <summary> | ||||
|   | ||||
| @@ -1,5 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.Dic.Catalog; | ||||
|  | ||||
| /// <summary> | ||||
|   | ||||
| @@ -1,7 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.Dic.Catalog; | ||||
|  | ||||
| /// <summary> | ||||
|   | ||||
| @@ -1,5 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.Dic.Content; | ||||
|  | ||||
| /// <summary> | ||||
|   | ||||
| @@ -1,5 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.Dic.Content; | ||||
|  | ||||
| /// <summary> | ||||
|   | ||||
| @@ -0,0 +1,25 @@ | ||||
| namespace NetAdmin.Domain.Dto.Sys.Dic.Content; | ||||
|  | ||||
| /// <summary> | ||||
| ///     响应:导出字典内容 | ||||
| /// </summary> | ||||
| public record ExportDicContentRsp : QueryDicContentRsp | ||||
| { | ||||
|     /// <inheritdoc /> | ||||
|     [CsvIndex(2)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.创建时间))] | ||||
|     public override DateTime CreatedTime { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [CsvIndex(0)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.项名))] | ||||
|     public override string Key { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [CsvIndex(1)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.项值))] | ||||
|     public override string Value { get; init; } | ||||
| } | ||||
| @@ -1,5 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.Dic.Content; | ||||
|  | ||||
| /// <summary> | ||||
|   | ||||
| @@ -1,5 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.Dic.Content; | ||||
|  | ||||
| /// <summary> | ||||
|   | ||||
| @@ -1,12 +1,9 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.Dic.Content; | ||||
|  | ||||
| /// <summary> | ||||
| ///     响应:查询字典内容 | ||||
| /// </summary> | ||||
| public sealed record QueryDicContentRsp : Sys_DicContent | ||||
| public record QueryDicContentRsp : Sys_DicContent | ||||
| { | ||||
|     /// <inheritdoc cref="Sys_DicContent.CatalogId" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|   | ||||
| @@ -1,6 +1,3 @@ | ||||
| using NetAdmin.Domain.Attributes.DataValidation; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
| using NetAdmin.Domain.Enums.Sys; | ||||
| using HttpMethods = NetAdmin.Domain.Enums.HttpMethods; | ||||
|  | ||||
|   | ||||
							
								
								
									
										81
									
								
								src/backend/NetAdmin.Domain/Dto/Sys/Job/ExportJobRsp.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										81
									
								
								src/backend/NetAdmin.Domain/Dto/Sys/Job/ExportJobRsp.cs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,81 @@ | ||||
| using NetAdmin.Domain.Dto.Sys.User; | ||||
| using NetAdmin.Domain.Enums.Sys; | ||||
| using HttpMethods = NetAdmin.Domain.Enums.HttpMethods; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.Job; | ||||
|  | ||||
| /// <summary> | ||||
| ///     响应:导出计划作业 | ||||
| /// </summary> | ||||
| public record ExportJobRsp : QueryJobRsp | ||||
| { | ||||
|     /// <inheritdoc /> | ||||
|     [CsvIndex(5)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.上次执行状态))] | ||||
|     public override string LastStatusCode => base.LastStatusCode; | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [CsvIndex(10)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.创建时间))] | ||||
|     public override DateTime CreatedTime { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [CsvIndex(9)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.是否启用))] | ||||
|     public override bool Enabled { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [CsvIndex(2)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.执行计划))] | ||||
|     public override string ExecutionCron { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [CsvIndex(4)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.请求方式))] | ||||
|     public override HttpMethods HttpMethod { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [CsvIndex(0)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.唯一编码))] | ||||
|     public override long Id { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [CsvIndex(1)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.作业名称))] | ||||
|     public override string JobName { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [CsvIndex(7)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.上次执行耗时))] | ||||
|     public override long? LastDuration { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [CsvIndex(6)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.上次执行时间))] | ||||
|     public override DateTime? LastExecTime { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [CsvIndex(8)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.下次执行时间))] | ||||
|     public override DateTime? NextExecTime { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [CsvIndex(3)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.作业状态))] | ||||
|     public override JobStatues Status { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [Ignore] | ||||
|     public override QueryUserRsp User { get; init; } | ||||
| } | ||||
| @@ -1,5 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.Job; | ||||
|  | ||||
| /// <summary> | ||||
|   | ||||
| @@ -1,6 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.Job; | ||||
|  | ||||
| /// <summary> | ||||
|   | ||||
| @@ -1,6 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
| using NetAdmin.Domain.Dto.Sys.User; | ||||
| using NetAdmin.Domain.Enums.Sys; | ||||
| using HttpMethods = NetAdmin.Domain.Enums.HttpMethods; | ||||
| @@ -10,10 +7,10 @@ namespace NetAdmin.Domain.Dto.Sys.Job; | ||||
| /// <summary> | ||||
| ///     响应:查询计划作业 | ||||
| /// </summary> | ||||
| public sealed record QueryJobRsp : Sys_Job | ||||
| public record QueryJobRsp : Sys_Job | ||||
| { | ||||
|     /// <inheritdoc cref="Sys_Job.LastStatusCode" /> | ||||
|     public new string LastStatusCode => | ||||
|     public new virtual string LastStatusCode => | ||||
|         #pragma warning disable IDE0072 | ||||
|         base.LastStatusCode switch { | ||||
|             #pragma warning restore IDE0072 | ||||
| @@ -104,7 +101,7 @@ public sealed record QueryJobRsp : Sys_Job | ||||
|     public override string Summary { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="Sys_Job.User" /> | ||||
|     public new QueryUserRsp User { get; init; } | ||||
|     public new virtual QueryUserRsp User { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="Sys_Job.UserId" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|   | ||||
| @@ -1,6 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.Job; | ||||
|  | ||||
| /// <summary> | ||||
|   | ||||
| @@ -1,5 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.JobRecord; | ||||
|  | ||||
| /// <summary> | ||||
|   | ||||
| @@ -0,0 +1,57 @@ | ||||
| using NetAdmin.Domain.Dto.Sys.Job; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.JobRecord; | ||||
|  | ||||
| /// <summary> | ||||
| ///     响应:导出计划作业执行记录 | ||||
| /// </summary> | ||||
| public record ExportJobRecordRsp : QueryJobRecordRsp, IRegister | ||||
| { | ||||
|     /// <inheritdoc /> | ||||
|     [CsvIndex(1)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.响应状态码))] | ||||
|     public override string HttpStatusCode => base.HttpStatusCode; | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [CsvIndex(6)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.创建时间))] | ||||
|     public override DateTime CreatedTime { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [CsvIndex(3)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.执行耗时))] | ||||
|     public override long Duration { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [CsvIndex(0)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.唯一编码))] | ||||
|     public override long Id { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [Ignore] | ||||
|     public override QueryJobRsp Job { get; init; } | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     作业名称 | ||||
|     /// </summary> | ||||
|     [CsvIndex(4)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.作业名称))] | ||||
|     public string JobName { get; set; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [CsvIndex(5)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.响应体))] | ||||
|     public override string ResponseBody { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     public void Register(TypeAdapterConfig config) | ||||
|     { | ||||
|         _ = config.ForType<Sys_JobRecord, ExportJobRecordRsp>().Map(d => d.JobName, s => s.Job.JobName); | ||||
|     } | ||||
| } | ||||
| @@ -1,6 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.JobRecord; | ||||
|  | ||||
| /// <summary> | ||||
|   | ||||
| @@ -1,6 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
| using NetAdmin.Domain.Dto.Sys.Job; | ||||
| using HttpMethods = NetAdmin.Domain.Enums.HttpMethods; | ||||
|  | ||||
| @@ -9,10 +6,10 @@ namespace NetAdmin.Domain.Dto.Sys.JobRecord; | ||||
| /// <summary> | ||||
| ///     响应:查询计划作业执行记录 | ||||
| /// </summary> | ||||
| public sealed record QueryJobRecordRsp : Sys_JobRecord | ||||
| public record QueryJobRecordRsp : Sys_JobRecord | ||||
| { | ||||
|     /// <inheritdoc cref="Sys_JobRecord.HttpStatusCode" /> | ||||
|     public new string HttpStatusCode => | ||||
|     public new virtual string HttpStatusCode => | ||||
|         base.HttpStatusCode == Numbers.HTTP_STATUS_BIZ_FAIL | ||||
|             ? nameof(ErrorCodes.Unhandled).ToLowerCamelCase() | ||||
|             : ((HttpStatusCode)base.HttpStatusCode).ToString().ToLowerCamelCase(); | ||||
| @@ -36,7 +33,7 @@ public sealed record QueryJobRecordRsp : Sys_JobRecord | ||||
|     /// <summary> | ||||
|     ///     作业信息 | ||||
|     /// </summary> | ||||
|     public new QueryJobRsp Job { get; init; } | ||||
|     public new virtual QueryJobRsp Job { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="Sys_JobRecord.JobId" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|   | ||||
| @@ -1,5 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
| using NetAdmin.Domain.Enums.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.Menu; | ||||
|   | ||||
| @@ -1,6 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.Menu; | ||||
|  | ||||
| /// <summary> | ||||
|   | ||||
| @@ -1,6 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.Menu; | ||||
|  | ||||
| /// <summary> | ||||
|   | ||||
| @@ -1,7 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.Menu; | ||||
|  | ||||
| /// <summary> | ||||
|   | ||||
| @@ -1,5 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.RequestLog; | ||||
|  | ||||
| /// <summary> | ||||
|   | ||||
| @@ -0,0 +1,79 @@ | ||||
| using NetAdmin.Domain.Dto.Sys.User; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.RequestLog; | ||||
|  | ||||
| /// <summary> | ||||
| ///     响应:导出请求日志 | ||||
| /// </summary> | ||||
| public record ExportRequestLogRsp : QueryRequestLogRsp | ||||
| { | ||||
|     /// <inheritdoc /> | ||||
|     [CsvIndex(6)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.客户端IP))] | ||||
|     public override string CreatedClientIp => base.CreatedClientIp; | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [Ignore] | ||||
|     public override string LoginName => base.LoginName; | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [CsvIndex(7)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.操作系统))] | ||||
|     public override string Os => base.Os; | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [CsvIndex(2)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.接口路径))] | ||||
|     public override string ApiId { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [CsvIndex(8)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.用户代理))] | ||||
|     public override string CreatedUserAgent { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [CsvIndex(4)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.执行耗时))] | ||||
|     public override long Duration { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [CsvIndex(1)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.响应状态码))] | ||||
|     public override int HttpStatusCode { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [CsvIndex(0)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.唯一编码))] | ||||
|     public override long Id { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [CsvIndex(3)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.请求方式))] | ||||
|     public override string Method { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [Ignore] | ||||
|     public override QueryUserRsp User { get; init; } | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     用户名 | ||||
|     /// </summary> | ||||
|     [CsvIndex(5)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.用户名))] | ||||
|     public string UserName { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     public override void Register(TypeAdapterConfig config) | ||||
|     { | ||||
|         _ = config.ForType<Sys_RequestLog, ExportRequestLogRsp>().Map(d => d.UserName, s => s.User.UserName); | ||||
|     } | ||||
| } | ||||
| @@ -1,5 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.RequestLog; | ||||
|  | ||||
| /// <summary> | ||||
|   | ||||
| @@ -1,5 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
| using NetAdmin.Domain.Dto.Sys.User; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.RequestLog; | ||||
| @@ -7,22 +5,22 @@ namespace NetAdmin.Domain.Dto.Sys.RequestLog; | ||||
| /// <summary> | ||||
| ///     响应:查询请求日志 | ||||
| /// </summary> | ||||
| public sealed record QueryRequestLogRsp : Sys_RequestLog, IRegister | ||||
| public record QueryRequestLogRsp : Sys_RequestLog, IRegister | ||||
| { | ||||
|     /// <summary> | ||||
|     ///     创建者客户端IP | ||||
|     /// </summary> | ||||
|     public new string CreatedClientIp => base.CreatedClientIp?.ToIpV4(); | ||||
|     public new virtual string CreatedClientIp => base.CreatedClientIp?.ToIpV4(); | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     登录名 | ||||
|     /// </summary> | ||||
|     public string LoginName => RequestBody?.ToObject<LoginByPwdReq>()?.Account; | ||||
|     public virtual string LoginName => RequestBody?.ToObject<LoginByPwdReq>()?.Account; | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     操作系统 | ||||
|     /// </summary> | ||||
|     public string Os => UserAgentParser.Create(CreatedUserAgent)?.Platform; | ||||
|     public virtual string Os => UserAgentParser.Create(CreatedUserAgent)?.Platform; | ||||
|  | ||||
|     /// <inheritdoc cref="Sys_RequestLog.ApiId" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] | ||||
| @@ -94,14 +92,14 @@ public sealed record QueryRequestLogRsp : Sys_RequestLog, IRegister | ||||
|     public override int? ServerIp { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="Sys_RequestLog.User" /> | ||||
|     public new QueryUserRsp User { get; init; } | ||||
|     public new virtual QueryUserRsp User { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="Sys_RequestLog.UserId" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] | ||||
|     public override long? UserId { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     public void Register(TypeAdapterConfig config) | ||||
|     public virtual void Register(TypeAdapterConfig config) | ||||
|     { | ||||
|         _ = config.ForType<Sys_RequestLog, QueryRequestLogRsp>().Map(d => d.ApiSummary, s => s.Api.Summary); | ||||
|     } | ||||
|   | ||||
| @@ -1,6 +1,3 @@ | ||||
| using NetAdmin.Domain.Attributes.DataValidation; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
| using NetAdmin.Domain.Enums.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.Role; | ||||
| @@ -8,13 +5,18 @@ namespace NetAdmin.Domain.Dto.Sys.Role; | ||||
| /// <summary> | ||||
| ///     请求:创建角色 | ||||
| /// </summary> | ||||
| public record CreateRoleReq : Sys_Role | ||||
| public record CreateRoleReq : Sys_Role, IValidatableObject | ||||
| { | ||||
|     /// <summary> | ||||
|     ///     角色-接口映射 | ||||
|     /// </summary> | ||||
|     public IReadOnlyCollection<string> ApiIds { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="Sys_Role.DashboardLayout" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] | ||||
|     [JsonString] | ||||
|     public override string DashboardLayout { get; set; } | ||||
|  | ||||
|     /// <inheritdoc cref="Sys_Role.DataScope" /> | ||||
|     [EnumDataType(typeof(DataScopes), ErrorMessageResourceType = typeof(Ln) | ||||
|                 , ErrorMessageResourceName = nameof(Ln.角色数据范围不正确))] | ||||
| @@ -55,4 +57,14 @@ public record CreateRoleReq : Sys_Role | ||||
|     /// <inheritdoc cref="IFieldSummary.Summary" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] | ||||
|     public override string Summary { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     public IEnumerable<ValidationResult> Validate(ValidationContext validationContext) | ||||
|     { | ||||
|         if (validationContext.MemberName != null) { | ||||
|             DashboardLayout = JsonSerializer.Serialize(JsonDocument.Parse(DashboardLayout)); | ||||
|         } | ||||
|  | ||||
|         yield break; | ||||
|     } | ||||
| } | ||||
| @@ -1,6 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.Role; | ||||
|  | ||||
| /// <summary> | ||||
|   | ||||
							
								
								
									
										57
									
								
								src/backend/NetAdmin.Domain/Dto/Sys/Role/ExportRoleRsp.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										57
									
								
								src/backend/NetAdmin.Domain/Dto/Sys/Role/ExportRoleRsp.cs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,57 @@ | ||||
| using NetAdmin.Domain.Enums.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.Role; | ||||
|  | ||||
| /// <summary> | ||||
| ///     响应:导出角色 | ||||
| /// </summary> | ||||
| public sealed record ExportRoleRsp : QueryRoleRsp | ||||
| { | ||||
|     /// <inheritdoc /> | ||||
|     [CsvIndex(7)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.创建时间))] | ||||
|     public override DateTime CreatedTime { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [CsvIndex(4)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.数据范围))] | ||||
|     public override DataScopes DataScope { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [CsvIndex(5)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.显示仪表板))] | ||||
|     public override bool DisplayDashboard { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [CsvIndex(6)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.是否启用))] | ||||
|     public override bool Enabled { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [CsvIndex(0)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.唯一编码))] | ||||
|     public override long Id { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [CsvIndex(3)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.无限权限))] | ||||
|     public override bool IgnorePermissionControl { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [CsvIndex(1)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.角色名称))] | ||||
|     public override string Name { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [CsvIndex(2)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.排序))] | ||||
|     public override long Sort { get; init; } | ||||
| } | ||||
| @@ -1,5 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.Role; | ||||
|  | ||||
| /// <summary> | ||||
|   | ||||
| @@ -1,6 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.Role; | ||||
|  | ||||
| /// <summary> | ||||
|   | ||||
| @@ -1,6 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
| using NetAdmin.Domain.Enums.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.Role; | ||||
| @@ -8,7 +5,7 @@ namespace NetAdmin.Domain.Dto.Sys.Role; | ||||
| /// <summary> | ||||
| ///     响应:查询角色 | ||||
| /// </summary> | ||||
| public sealed record QueryRoleRsp : Sys_Role, IRegister | ||||
| public record QueryRoleRsp : Sys_Role | ||||
| { | ||||
|     /// <summary> | ||||
|     ///     角色-接口映射 | ||||
| @@ -20,6 +17,10 @@ public sealed record QueryRoleRsp : Sys_Role, IRegister | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     public override DateTime CreatedTime { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="Sys_Role.DashboardLayout" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] | ||||
|     public override string DashboardLayout { get; set; } | ||||
|  | ||||
|     /// <inheritdoc cref="Sys_Role.DataScope" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     public override DataScopes DataScope { get; init; } | ||||
| @@ -69,7 +70,7 @@ public sealed record QueryRoleRsp : Sys_Role, IRegister | ||||
|     public override long Version { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     public new void Register(TypeAdapterConfig config) | ||||
|     public override void Register(TypeAdapterConfig config) | ||||
|     { | ||||
|         _ = config.ForType<Sys_Role, QueryRoleRsp>() // | ||||
|                   .IgnoreIf((s, _) => s.Depts == null, d => d.DeptIds) | ||||
|   | ||||
| @@ -1,7 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.Role; | ||||
|  | ||||
| /// <summary> | ||||
|   | ||||
| @@ -1,7 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.Role; | ||||
|  | ||||
| /// <summary> | ||||
|   | ||||
| @@ -1,7 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.Role; | ||||
|  | ||||
| /// <summary> | ||||
|   | ||||
| @@ -1,4 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
| using NetAdmin.Domain.Enums.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.SiteMsg; | ||||
|   | ||||
| @@ -0,0 +1,60 @@ | ||||
| using NetAdmin.Domain.Dto.Sys.Dept; | ||||
| using NetAdmin.Domain.Dto.Sys.Role; | ||||
| using NetAdmin.Domain.Dto.Sys.User; | ||||
| using NetAdmin.Domain.Enums.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.SiteMsg; | ||||
|  | ||||
| /// <summary> | ||||
| ///     响应:导出站内信 | ||||
| /// </summary> | ||||
| public record ExportSiteMsgRsp : QuerySiteMsgRsp | ||||
| { | ||||
|     /// <inheritdoc /> | ||||
|     [CsvIndex(5)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.创建时间))] | ||||
|     public override DateTime CreatedTime { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [CsvIndex(1)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.用户名))] | ||||
|     public override string CreatedUserName { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [Ignore] | ||||
|     public override IEnumerable<QueryDeptRsp> Depts { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [CsvIndex(0)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.唯一编码))] | ||||
|     public override long Id { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [CsvIndex(2)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.消息类型))] | ||||
|     public override SiteMsgTypes MsgType { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [Ignore] | ||||
|     public override IEnumerable<QueryRoleRsp> Roles { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [CsvIndex(4)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.消息摘要))] | ||||
|     public override string Summary { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [CsvIndex(3)] | ||||
|     [Ignore(false)] | ||||
|     [Name(nameof(Ln.消息主题))] | ||||
|     public override string Title { get; init; } | ||||
|  | ||||
|     /// <inheritdoc /> | ||||
|     [Ignore] | ||||
|     public override IEnumerable<QueryUserRsp> Users { get; init; } | ||||
| } | ||||
| @@ -1,6 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.SiteMsg; | ||||
|  | ||||
| /// <summary> | ||||
|   | ||||
| @@ -1,6 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
| using NetAdmin.Domain.Dto.Sys.Dept; | ||||
| using NetAdmin.Domain.Dto.Sys.Role; | ||||
| using NetAdmin.Domain.Dto.Sys.SiteMsgFlag; | ||||
| @@ -12,7 +9,7 @@ namespace NetAdmin.Domain.Dto.Sys.SiteMsg; | ||||
| /// <summary> | ||||
| ///     响应:查询站内信 | ||||
| /// </summary> | ||||
| public sealed record QuerySiteMsgRsp : Sys_SiteMsg | ||||
| public record QuerySiteMsgRsp : Sys_SiteMsg | ||||
| { | ||||
|     /// <inheritdoc cref="Sys_SiteMsg.Content" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] | ||||
| @@ -28,7 +25,7 @@ public sealed record QuerySiteMsgRsp : Sys_SiteMsg | ||||
|  | ||||
|     /// <inheritdoc cref="Sys_SiteMsg.Depts" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] | ||||
|     public new IEnumerable<QueryDeptRsp> Depts { get; init; } | ||||
|     public new virtual IEnumerable<QueryDeptRsp> Depts { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
| @@ -49,7 +46,7 @@ public sealed record QuerySiteMsgRsp : Sys_SiteMsg | ||||
|  | ||||
|     /// <inheritdoc cref="Sys_SiteMsg.Roles" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] | ||||
|     public new IEnumerable<QueryRoleRsp> Roles { get; init; } | ||||
|     public new virtual IEnumerable<QueryRoleRsp> Roles { get; init; } | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     消息发送者 | ||||
| @@ -66,7 +63,7 @@ public sealed record QuerySiteMsgRsp : Sys_SiteMsg | ||||
|  | ||||
|     /// <inheritdoc cref="Sys_SiteMsg.Users" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] | ||||
|     public new IEnumerable<QueryUserRsp> Users { get; init; } | ||||
|     public new virtual IEnumerable<QueryUserRsp> Users { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="IFieldVersion.Version" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|   | ||||
| @@ -1,5 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.SiteMsgDept; | ||||
|  | ||||
| /// <summary> | ||||
|   | ||||
| @@ -1,6 +1,3 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.SiteMsgDept; | ||||
|  | ||||
| /// <summary> | ||||
|   | ||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user
	 GitHub
						GitHub