mirror of
https://github.com/nsnail/NetAdmin.git
synced 2025-06-19 18:28:17 +08:00
feat: ✨ 基础模块
注册登录 用户管理 角色管理 部门管理 消息管理 接口管理 菜单管理 字典管理 缓存管理 请求日志 系统设置 版本信息 代码生成
This commit is contained in:
@ -59,11 +59,12 @@ global using NetAdmin.Infrastructure.Configuration.Options.SubNodes.Upload;
|
||||
global using NetAdmin.Infrastructure.Constant;
|
||||
global using NetAdmin.Infrastructure.Enums;
|
||||
global using NetAdmin.Infrastructure.Exceptions;
|
||||
global using NetAdmin.Infrastructure.Exceptions.InvalidInput;
|
||||
global using NetAdmin.Infrastructure.Exceptions.InvalidOperation;
|
||||
global using NetAdmin.Infrastructure.Exceptions.Unexpected;
|
||||
global using NetAdmin.Infrastructure.Extensions;
|
||||
global using NetAdmin.Infrastructure.Languages;
|
||||
global using NetAdmin.Infrastructure.Utils;
|
||||
global using NSExt.Attributes;
|
||||
global using NSExt.Extensions;
|
||||
global using NSExt.Extensions;
|
||||
#if !INFRAS
|
||||
global using DynamicFilterInfo = NetAdmin.Domain.Dto.Dependency.DynamicFilterInfo;
|
||||
global using DynamicFilterOperators = NetAdmin.Domain.Enums.DynamicFilterOperators;
|
||||
#endif
|
@ -1,5 +1,5 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Import Project="$(SolutionDir)/CodeQuality.props"/>
|
||||
<Import Project="$(SolutionDir)/code.quality.props"/>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="../NetAdmin.Domain/NetAdmin.Domain.csproj"/>
|
||||
</ItemGroup>
|
||||
|
@ -0,0 +1,19 @@
|
||||
using NetAdmin.Domain.Contexts;
|
||||
using NetAdmin.Domain.DbMaps.Dependency;
|
||||
|
||||
namespace NetAdmin.Application.Repositories;
|
||||
|
||||
/// <summary>
|
||||
/// 默认仓储
|
||||
/// </summary>
|
||||
public sealed class DefaultRepository<TEntity>(IFreeSql fSql //
|
||||
, UnitOfWorkManager uowManger //
|
||||
, ContextUserToken userToken) //
|
||||
: DefaultRepository<TEntity, long>(fSql, uowManger)
|
||||
where TEntity : EntityBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 当前上下文关联的用户
|
||||
/// </summary>
|
||||
public ContextUserToken UserToken => userToken;
|
||||
}
|
@ -1,39 +0,0 @@
|
||||
using NetAdmin.Domain.Contexts;
|
||||
using NetAdmin.Domain.DbMaps.Dependency;
|
||||
|
||||
namespace NetAdmin.Application.Repositories;
|
||||
|
||||
/// <summary>
|
||||
/// 基础仓储接口
|
||||
/// </summary>
|
||||
public interface IRepository<TEntity> : IBaseRepository<TEntity>
|
||||
where TEntity : EntityBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 当前上下文关联的用户
|
||||
/// </summary>
|
||||
ContextUserToken UserToken { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 递归删除
|
||||
/// </summary>
|
||||
/// <param name="exp">exp</param>
|
||||
/// <param name="disableGlobalFilterNames">禁用全局过滤器名</param>
|
||||
Task<bool> DeleteRecursiveAsync(Expression<Func<TEntity, bool>> exp, params string[] disableGlobalFilterNames);
|
||||
|
||||
/// <summary>
|
||||
/// 获得Dto
|
||||
/// </summary>
|
||||
/// <param name="id">主键</param>
|
||||
Task<TDto> GetAsync<TDto>(long id);
|
||||
|
||||
/// <summary>
|
||||
/// 根据条件获取Dto
|
||||
/// </summary>
|
||||
Task<TDto> GetAsync<TDto>(Expression<Func<TEntity, bool>> exp);
|
||||
|
||||
/// <summary>
|
||||
/// 根据条件获取实体
|
||||
/// </summary>
|
||||
Task<TEntity> GetAsync(Expression<Func<TEntity, bool>> exp);
|
||||
}
|
@ -1,82 +0,0 @@
|
||||
using NetAdmin.Domain.Contexts;
|
||||
using NetAdmin.Domain.DbMaps.Dependency;
|
||||
|
||||
namespace NetAdmin.Application.Repositories;
|
||||
|
||||
/// <inheritdoc cref="IRepository{TEntity}" />
|
||||
public sealed class Repository<TEntity> : DefaultRepository<TEntity, long>, IRepository<TEntity>
|
||||
where TEntity : EntityBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Repository{TEntity}" /> class.
|
||||
/// </summary>
|
||||
public Repository(IFreeSql fSql, UnitOfWorkManager uowManger, ContextUserToken userToken) //
|
||||
: base(fSql, uowManger)
|
||||
{
|
||||
UserToken = userToken;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 当前上下文关联的用户
|
||||
/// </summary>
|
||||
public ContextUserToken UserToken { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 递归删除
|
||||
/// </summary>
|
||||
/// <param name="exp">exp</param>
|
||||
/// <param name="disableGlobalFilterNames">禁用全局过滤器名</param>
|
||||
public async Task<bool> DeleteRecursiveAsync( //
|
||||
Expression<Func<TEntity, bool>> exp, params string[] disableGlobalFilterNames)
|
||||
{
|
||||
_ = await Select.Where(exp)
|
||||
.DisableGlobalFilter(disableGlobalFilterNames)
|
||||
.AsTreeCte()
|
||||
.ToDelete()
|
||||
.ExecuteAffrowsAsync();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得Dto
|
||||
/// </summary>
|
||||
/// <param name="id">主键</param>
|
||||
public Task<TDto> GetAsync<TDto>(long id)
|
||||
{
|
||||
return Select.WhereDynamic(id).ToOneAsync<TDto>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据条件获取Dto
|
||||
/// </summary>
|
||||
public Task<TDto> GetAsync<TDto>(Expression<Func<TEntity, bool>> exp)
|
||||
{
|
||||
return Select.Where(exp).ToOneAsync<TDto>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据条件获取实体
|
||||
/// </summary>
|
||||
public Task<TEntity> GetAsync(Expression<Func<TEntity, bool>> exp)
|
||||
{
|
||||
return Select.Where(exp).ToOneAsync();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取分页列表
|
||||
/// </summary>
|
||||
/// <param name="dynamicFilterInfo">动态过滤器</param>
|
||||
/// <param name="page">页码</param>
|
||||
/// <param name="pageSize">页容量</param>
|
||||
/// <returns>分页列表和总条数</returns>
|
||||
public async Task<(IEnumerable<TEntity> List, long Total)> GetPagedListAsync(
|
||||
DynamicFilterInfo dynamicFilterInfo, int page, int pageSize)
|
||||
{
|
||||
var list = await Select.WhereDynamicFilter(dynamicFilterInfo)
|
||||
.Count(out var total)
|
||||
.Page(page, pageSize)
|
||||
.ToListAsync();
|
||||
return (list, total);
|
||||
}
|
||||
}
|
@ -14,7 +14,7 @@ public abstract class RepositoryService<TEntity, TLogger> : ServiceBase<TLogger>
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="RepositoryService{TEntity, TLogger}" /> class.
|
||||
/// </summary>
|
||||
protected RepositoryService(Repository<TEntity> rpo) //
|
||||
protected RepositoryService(DefaultRepository<TEntity> rpo) //
|
||||
{
|
||||
Rpo = rpo;
|
||||
}
|
||||
@ -22,7 +22,7 @@ public abstract class RepositoryService<TEntity, TLogger> : ServiceBase<TLogger>
|
||||
/// <summary>
|
||||
/// 默认仓储
|
||||
/// </summary>
|
||||
protected Repository<TEntity> Rpo { get; }
|
||||
protected DefaultRepository<TEntity> Rpo { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 启用级联保存
|
||||
@ -31,4 +31,12 @@ public abstract class RepositoryService<TEntity, TLogger> : ServiceBase<TLogger>
|
||||
get => Rpo.DbContextOptions.EnableCascadeSave;
|
||||
set => Rpo.DbContextOptions.EnableCascadeSave = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 针对 Sqlite 数据的更新操作
|
||||
/// </summary>
|
||||
/// <returns>
|
||||
/// 非 Sqlite 数据库请删除
|
||||
/// </returns>
|
||||
protected abstract Task<TEntity> UpdateForSqliteAsync(TEntity req);
|
||||
}
|
@ -33,13 +33,9 @@ public abstract class ServiceBase : IScoped, IService
|
||||
ServiceId = Guid.NewGuid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 服务编号
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
public Guid ServiceId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 上下文用户
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
public ContextUserToken UserToken { get; set; }
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Import Project="$(SolutionDir)/CodeQuality.props"/>
|
||||
<Import Project="$(SolutionDir)/code.quality.props"/>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="../NetAdmin.SysComponent.Application/NetAdmin.SysComponent.Application.csproj"/>
|
||||
</ItemGroup>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Import Project="$(SolutionDir)/CodeQuality.props"/>
|
||||
<Import Project="$(SolutionDir)/code.quality.props"/>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="../NetAdmin.SysComponent.Cache/NetAdmin.SysComponent.Cache.csproj"/>
|
||||
<ProjectReference Include="../NetAdmin.BizServer.Application/NetAdmin.BizServer.Application.csproj"/>
|
||||
|
@ -0,0 +1,66 @@
|
||||
namespace NetAdmin.BizServer.Host.Extensions;
|
||||
|
||||
/// <summary>
|
||||
/// ApplicationBuilder对象 扩展方法
|
||||
/// </summary>
|
||||
[SuppressSniffer]
|
||||
|
||||
// ReSharper disable once InconsistentNaming
|
||||
public static class IApplicationBuilderExtensions
|
||||
{
|
||||
private const string _INDEX_HTML_PATH = ".index.html";
|
||||
private const string _RES_PFX = $"{nameof(NetAdmin)}.{nameof(BizServer)}.{nameof(Host)}.UI";
|
||||
private static readonly Regex _regex = new(@"\.(\w+)$", RegexOptions.Compiled);
|
||||
private static IEnumerable<string> _allResNames;
|
||||
|
||||
/// <summary>
|
||||
/// 托管管理后台
|
||||
/// </summary>
|
||||
public static IApplicationBuilder UseVueAdmin(this IApplicationBuilder me)
|
||||
{
|
||||
if (Assembly.GetExecutingAssembly().GetManifestResourceInfo(_RES_PFX + _INDEX_HTML_PATH) == null) {
|
||||
return me;
|
||||
}
|
||||
|
||||
_allResNames = Assembly.GetExecutingAssembly()
|
||||
.GetManifestResourceNames()
|
||||
.Where(x => x.StartsWith(_RES_PFX, StringComparison.OrdinalIgnoreCase))
|
||||
.Select(x => x[_RES_PFX.Length..]);
|
||||
|
||||
return me.Use(UseVueAdminAsync);
|
||||
}
|
||||
|
||||
private static Stream GetManifestResourceStream(string path)
|
||||
{
|
||||
return Assembly.GetExecutingAssembly().GetManifestResourceStream(_RES_PFX + path);
|
||||
}
|
||||
|
||||
private static async Task UseVueAdminAsync(HttpContext context, Func<Task> next)
|
||||
{
|
||||
if (!context.Request.Path.StartsWithSegments(new PathString("/api"))) {
|
||||
var path = context.Request.Path.Value;
|
||||
if (path == "/" || path?.Length == 0) {
|
||||
path = _INDEX_HTML_PATH;
|
||||
}
|
||||
|
||||
path = path!.Replace('/', '.');
|
||||
|
||||
var output = GetManifestResourceStream(path);
|
||||
if (output == null) {
|
||||
var resName = _allResNames.FirstOrDefault(x => path.EndsWith(x, StringComparison.OrdinalIgnoreCase));
|
||||
output = resName == null
|
||||
? GetManifestResourceStream(_INDEX_HTML_PATH)
|
||||
: GetManifestResourceStream(resName);
|
||||
}
|
||||
|
||||
if (output != null) {
|
||||
context.Response.ContentLength = output.Length;
|
||||
context.Response.ContentType = MimeTypeHelper.GetMimeTypeByExtName(_regex.Match(path!).Groups[1].Value);
|
||||
await output.CopyToAsync(context.Response.Body);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
await next.Invoke();
|
||||
}
|
||||
}
|
@ -13,11 +13,11 @@ namespace NetAdmin.BizServer.Host.Extensions;
|
||||
public static class ServiceCollectionExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// 注册FreeSql
|
||||
/// 添加 FreeSql
|
||||
/// </summary>
|
||||
public static IServiceCollection AddFreeSql(this IServiceCollection me)
|
||||
{
|
||||
_ = me.AddFreeSql( //
|
||||
return me.AddFreeSql( //
|
||||
FreeSqlInitOptions.SyncStructure | FreeSqlInitOptions.InsertSeedData, freeSql => {
|
||||
// 数据权限过滤器
|
||||
_ = freeSql.GlobalFilter.ApplyOnlyIf<IFieldOwner>( //
|
||||
@ -25,11 +25,10 @@ public static class ServiceCollectionExtensions
|
||||
, () => ContextUserInfo.Create()?.Roles.All(x => x.DataScope == DataScopes.Self) ?? false
|
||||
, a => a.OwnerId == ContextUserInfo.Create().Id);
|
||||
});
|
||||
return me;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// jwt授权处理器
|
||||
/// 添加 jwt 授权处理器
|
||||
/// </summary>
|
||||
public static IServiceCollection AddJwt(this IServiceCollection me)
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
<Import Project="$(SolutionDir)/CodeQuality.props"/>
|
||||
<Import Project="$(SolutionDir)/code.quality.props"/>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="$(SolutionDir)/assets/captcha/**" LinkBase="Assets/Captcha"/>
|
||||
</ItemGroup>
|
||||
@ -12,4 +12,7 @@
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="../../../dist/frontend/admin/**/*" LinkBase="UI"/>
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -5,8 +5,8 @@
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "http://localhost:65010",
|
||||
"applicationUrl": "http://[::]:65010",
|
||||
"launchUrl": "http://localhost:5010",
|
||||
"applicationUrl": "http://[::]:5010",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
|
@ -1,7 +1,9 @@
|
||||
using NetAdmin.BizServer.Host.Extensions;
|
||||
using NetAdmin.Host.Extensions;
|
||||
using NetAdmin.Host.Middlewares;
|
||||
#if !DEBUG
|
||||
using Prometheus;
|
||||
#endif
|
||||
|
||||
namespace NetAdmin.BizServer.Host;
|
||||
|
||||
@ -25,21 +27,23 @@ public sealed class Startup : NetAdmin.Host.Startup
|
||||
public void Configure(IApplicationBuilder app)
|
||||
{
|
||||
_ = app //
|
||||
.UseRealIp() // 获取真实IP
|
||||
.EnableBuffering() // 启用 Body 重读
|
||||
.UseMiddleware<RequestAuditMiddleware>() // 请求审计
|
||||
.UseRealIp() // 使用RealIp中间件,用于获取真实客户端IP地址
|
||||
.EnableBuffering() // 启用请求体缓冲,允许多次读取请求体
|
||||
.UseMiddleware<RequestAuditMiddleware>() // 使用RequestAuditMiddleware中间件,执行请求审计
|
||||
#if DEBUG
|
||||
.UseOpenApiSkin() // Swagger皮肤
|
||||
.UseOpenApiSkin() // 使用OpenApiSkin中间件(仅在调试模式下),提供Swagger UI皮肤
|
||||
#else
|
||||
.UseVueAdmin() // 托管管理后台,仅在非调试模式下
|
||||
.UseHttpMetrics() // 使用HttpMetrics中间件,启用HTTP性能监控
|
||||
#endif
|
||||
.UseInject(string.Empty) // / Furion脚手架
|
||||
.UseUnifyResultStatusCodes() // 状态码拦截
|
||||
.UseCorsAccessor() // 跨域访问
|
||||
.UseRouting() // 路由映射
|
||||
.UseHttpMetrics() // 性能监控
|
||||
.UseAuthentication() // / 认证
|
||||
.UseAuthorization() // 授权
|
||||
.UseMiddleware<RemoveNullNodeMiddleware>() // 删除json空节点
|
||||
.UseEndpoints(); // 执行匹配的端点
|
||||
.UseInject(string.Empty) // 使用Inject中间件,Furion脚手架的依赖注入支持
|
||||
.UseUnifyResultStatusCodes() // 使用UnifyResultStatusCodes中间件,用于统一处理结果状态码
|
||||
.UseCorsAccessor() // 使用CorsAccessor中间件,启用跨域资源共享(CORS)支持
|
||||
.UseRouting() // 使用Routing中间件,配置路由映射
|
||||
.UseAuthentication() // 使用Authentication中间件,启用身份验证
|
||||
.UseAuthorization() // 使用Authorization中间件,启用授权
|
||||
.UseMiddleware<RemoveNullNodeMiddleware>() // 使用RemoveNullNodeMiddleware中间件,删除JSON中的空节点
|
||||
.UseEndpoints(); // 配置端点以处理请求
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -47,21 +51,21 @@ public sealed class Startup : NetAdmin.Host.Startup
|
||||
/// </summary>
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
_ = services.AddConsoleFormatter() // 控制台日志模板
|
||||
.AddAllOptions() // 注册配置项
|
||||
.AddJwt() // Jwt 授权处理器
|
||||
.AddSnowflake() // 雪花编号生成器
|
||||
.AddEventBus() // 事件总线
|
||||
.AddFreeSql() // freeSql
|
||||
.AddRemoteRequest() // 注册远程请求
|
||||
.AddCorsAccessor() // 支持跨域访问
|
||||
.AddContextUser() // 上下文用户
|
||||
.AddRedisCache() // Redis缓存
|
||||
_ = services.AddConsoleFormatter() // 添加控制台日志模板
|
||||
.AddAllOptions() // 添加配置项
|
||||
.AddJwt() // 添加 Jwt 授权处理器
|
||||
.AddSnowflake() // 添加雪花编号生成器
|
||||
.AddEventBus() // 添加事件总线
|
||||
.AddFreeSql() // 添加 freeSql
|
||||
.AddRemoteRequest() // 添加远程请求
|
||||
.AddCorsAccessor() // 添加支持跨域访问
|
||||
.AddContextUser() // 添加上下文用户
|
||||
.AddRedisCache() // 添加 Redis 缓存
|
||||
|
||||
// IMvcBuilder
|
||||
.AddControllers() // 注册控制器
|
||||
.AddJsonSerializer(true) // json序列化配置
|
||||
.AddDefaultApiResultHandler() // Api结果处理器
|
||||
.AddControllers() // 添加控制器
|
||||
.AddJsonSerializer(true) // 添加JSON序列化器,并设置显示枚举名而非数字枚举值
|
||||
.AddDefaultApiResultHandler() // 添加默认的API结果处理程序
|
||||
;
|
||||
}
|
||||
}
|
172
src/backend/NetAdmin.BizServer.Tests/AllTests.cs
Normal file
172
src/backend/NetAdmin.BizServer.Tests/AllTests.cs
Normal file
@ -0,0 +1,172 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Net.Http.Json;
|
||||
using Microsoft.AspNetCore.Mvc.Testing;
|
||||
using NetAdmin.BizServer.Host;
|
||||
using NetAdmin.Domain.Dto.Dependency;
|
||||
using NetAdmin.Domain.Dto.Sys.Api;
|
||||
using NetAdmin.Domain.Dto.Sys.Cache;
|
||||
using NetAdmin.Domain.Dto.Sys.Config;
|
||||
using NetAdmin.Domain.Dto.Sys.Tool;
|
||||
using NetAdmin.SysComponent.Application.Modules.Sys;
|
||||
using NetAdmin.Tests;
|
||||
using Xunit;
|
||||
using Xunit.Abstractions;
|
||||
|
||||
namespace NetAdmin.BizServer.Tests;
|
||||
|
||||
/// <summary>
|
||||
/// 所有测试
|
||||
/// </summary>
|
||||
[SuppressMessage("Usage", "xUnit1028:Test method must have valid return type")]
|
||||
public class AllTests(WebApplicationFactory<Startup> factory, ITestOutputHelper testOutputHelper) :
|
||||
WebApiTestBase<Startup>(factory, testOutputHelper), IToolsModule, ICacheModule, IApiModule, IConfigModule
|
||||
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public Task<int> BulkDeleteAsync(BulkReq<DelReq> req)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
[Fact]
|
||||
public async Task<CacheStatisticsRsp> CacheStatisticsAsync()
|
||||
{
|
||||
var rsp = await PostAsync("/api/sys/cache/cache.statistics", null);
|
||||
Assert.Equal(HttpStatusCode.OK, rsp.StatusCode);
|
||||
return default;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public Task<QueryConfigRsp> CreateAsync(CreateConfigReq req)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public Task<QueryApiRsp> CreateAsync(CreateApiReq req)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public Task<int> DeleteAsync(DelReq req)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public Task<bool> ExistAsync(QueryReq<QueryConfigReq> req)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public Task<bool> ExistAsync(QueryReq<QueryApiReq> req)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
[Theory]
|
||||
[InlineData(default)]
|
||||
public async Task<PagedQueryRsp<GetAllEntriesRsp>> GetAllEntriesAsync(PagedQueryReq<GetAllEntriesReq> req)
|
||||
{
|
||||
var rsp = await PostAsync("/api/sys/cache/get.all.entries"
|
||||
, JsonContent.Create(new PagedQueryReq<GetAllEntriesReq>()));
|
||||
Assert.Equal(HttpStatusCode.OK, rsp.StatusCode);
|
||||
return default;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public Task<QueryConfigRsp> GetAsync(QueryConfigReq req)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public Task<QueryApiRsp> GetAsync(QueryApiReq req)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public Task<QueryConfigRsp> GetLatestConfigAsync()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public Task<IEnumerable<GetModulesRsp>> GetModulesAsync()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
[Fact]
|
||||
public async Task<DateTime> GetServerUtcTimeAsync()
|
||||
{
|
||||
var response = await PostAsync("/api/sys/tools/get.server.utc.time", null);
|
||||
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
|
||||
return default;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
[Fact]
|
||||
public async Task<string> GetVersionAsync()
|
||||
{
|
||||
var response = await PostAsync("/api/sys/tools/version", null);
|
||||
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
|
||||
return default;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public Task<IEnumerable<(string Name, string Version)>> ModulesAsync()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public Task<PagedQueryRsp<QueryConfigRsp>> PagedQueryAsync(PagedQueryReq<QueryConfigReq> req)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public Task<PagedQueryRsp<QueryApiRsp>> PagedQueryAsync(PagedQueryReq<QueryApiReq> req)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public Task<IEnumerable<QueryConfigRsp>> QueryAsync(QueryReq<QueryConfigReq> req)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public Task<IEnumerable<QueryApiRsp>> QueryAsync(QueryReq<QueryApiReq> req)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
[Fact]
|
||||
public async Task SyncAsync()
|
||||
{
|
||||
var response = await PostAsync("/api/sys/api/sync", null);
|
||||
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public Task<QueryConfigRsp> UpdateAsync(UpdateConfigReq req)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public Task<NopReq> UpdateAsync(NopReq req)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
@ -1,21 +1,9 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<IsTestProject>true</IsTestProject>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="../NetAdmin.Host/NetAdmin.Host.csproj"/>
|
||||
<ProjectReference Include="..\NetAdmin.BizServer.Host\NetAdmin.BizServer.Host.csproj"/>
|
||||
<ProjectReference Include="../NetAdmin.Tests/NetAdmin.Tests.csproj"/>
|
||||
<ProjectReference Include="../NetAdmin.BizServer.Host/NetAdmin.BizServer.Host.csproj"/>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0-preview-23371-04"/>
|
||||
<PackageReference Include="xunit" Version="2.5.1-pre.20"/>
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.1-pre.10">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="coverlet.collector" Version="6.0.0">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0-preview-23531-01"/>
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -1,18 +0,0 @@
|
||||
using Xunit;
|
||||
|
||||
namespace NetAdmin.BizServer.Tests;
|
||||
|
||||
/// <summary>
|
||||
/// UsedNumberTests
|
||||
/// </summary>
|
||||
public class UsedNumberTests
|
||||
{
|
||||
/// <summary>
|
||||
/// Test1
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void Test1()
|
||||
{
|
||||
// Assert.True("1".Int32() == 2);
|
||||
}
|
||||
}
|
@ -17,13 +17,9 @@ public abstract class CacheBase<TCacheContainer, TService> : ICache<TCacheContai
|
||||
Service = service;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 缓存对象
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
public TCacheContainer Cache { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 关联的服务
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
public TService Service { get; }
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Import Project="$(SolutionDir)/CodeQuality.props"/>
|
||||
<Import Project="$(SolutionDir)/code.quality.props"/>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="../NetAdmin.Application/NetAdmin.Application.csproj"/>
|
||||
</ItemGroup>
|
||||
|
@ -1,7 +1,7 @@
|
||||
namespace NetAdmin.Domain.Attributes.DataValidation;
|
||||
|
||||
/// <summary>
|
||||
/// 证件号码
|
||||
/// 证件号码验证器
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Parameter)]
|
||||
public sealed class CertificateAttribute : RegexAttribute
|
||||
|
@ -1,7 +1,7 @@
|
||||
namespace NetAdmin.Domain.Attributes.DataValidation;
|
||||
|
||||
/// <summary>
|
||||
/// 中文姓名
|
||||
/// 中文姓名验证器
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Parameter)]
|
||||
public sealed class ChineseNameAttribute : RegexAttribute
|
||||
|
@ -1,23 +0,0 @@
|
||||
namespace NetAdmin.Domain.Attributes.DataValidation;
|
||||
|
||||
/// <summary>
|
||||
/// 电话验证器(手机或固话)
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Parameter)]
|
||||
public sealed class CulturePhoneAttribute : ValidationAttribute
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="CulturePhoneAttribute" /> class.
|
||||
/// </summary>
|
||||
public CulturePhoneAttribute()
|
||||
{
|
||||
ErrorMessageResourceName = nameof(Ln.手机号码或座机号码);
|
||||
ErrorMessageResourceType = typeof(Ln);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override bool IsValid(object value)
|
||||
{
|
||||
return new MobileAttribute().IsValid(value) || new TelephoneAttribute().IsValid(value);
|
||||
}
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
namespace NetAdmin.Domain.Attributes.DataValidation;
|
||||
|
||||
/// <summary>
|
||||
/// 区间验证器
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Parameter)]
|
||||
public sealed class CultureRangeAttribute : RangeAttribute
|
||||
{
|
||||
/// <inheritdoc cref="RangeAttribute" />
|
||||
public CultureRangeAttribute(double minimum, double maximum) //
|
||||
: base(minimum, maximum) { }
|
||||
|
||||
/// <inheritdoc cref="RangeAttribute" />
|
||||
public CultureRangeAttribute(int minimum, int maximum) //
|
||||
: base(minimum, maximum) { }
|
||||
|
||||
/// <inheritdoc cref="RangeAttribute" />
|
||||
public CultureRangeAttribute(Type type, string minimum, string maximum) //
|
||||
: base(type, minimum, maximum) { }
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string FormatErrorMessage(string name)
|
||||
{
|
||||
return $"{ErrorMessageString} {Ln.必须介于} {Minimum} - {Maximum}";
|
||||
}
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
namespace NetAdmin.Domain.Attributes.DataValidation;
|
||||
|
||||
/// <summary>
|
||||
/// 非空验证器
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Parameter)]
|
||||
public sealed class CultureRequiredAttribute : RequiredAttribute
|
||||
{
|
||||
/// <summary>Applies formatting to an error message, based on the data field where the error occurred.</summary>
|
||||
/// <param name="name">The name to include in the formatted message.</param>
|
||||
/// <exception cref="T:System.InvalidOperationException">The current attribute is malformed.</exception>
|
||||
/// <returns>An instance of the formatted error message.</returns>
|
||||
public override string FormatErrorMessage(string name)
|
||||
{
|
||||
return $"{ErrorMessageString.NullOrEmpty(name)} {Ln.不能为空}";
|
||||
}
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
|
||||
namespace NetAdmin.Domain.Attributes.DataValidation;
|
||||
|
||||
/// <summary>
|
||||
/// Url验证器
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Parameter)]
|
||||
public sealed class CultureUrlAttribute : RegexAttribute
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="CultureUrlAttribute" /> class.
|
||||
/// </summary>
|
||||
public CultureUrlAttribute() //
|
||||
: base(Chars.RGX_URL)
|
||||
{
|
||||
ErrorMessageResourceName = nameof(Ln.无效网络地址);
|
||||
ErrorMessageResourceType = typeof(Ln);
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
namespace NetAdmin.Domain.Attributes.DataValidation;
|
||||
|
||||
/// <summary>
|
||||
/// 端口号验证器
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Parameter)]
|
||||
public sealed class PortAttribute : RangeAttribute
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="PortAttribute" /> class.
|
||||
/// </summary>
|
||||
public PortAttribute() //
|
||||
: base(1, 65535)
|
||||
{
|
||||
ErrorMessageResourceName = nameof(Ln.无效端口号);
|
||||
ErrorMessageResourceType = typeof(Ln);
|
||||
}
|
||||
}
|
@ -6,7 +6,4 @@ namespace NetAdmin.Domain.Attributes;
|
||||
/// 标记一个字段启用雪花编号生成
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Property)]
|
||||
public sealed class SnowflakeAttribute : Attribute
|
||||
{
|
||||
//
|
||||
}
|
||||
public sealed class SnowflakeAttribute : Attribute { }
|
@ -10,16 +10,19 @@ public sealed record ContextUserToken : DataAbstraction
|
||||
/// <summary>
|
||||
/// 用户编号
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
/// ReSharper disable once MemberCanBePrivate.Global
|
||||
public long Id { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 做授权验证的Token,全局唯一,可以随时重置(强制下线)
|
||||
/// </summary>
|
||||
/// ReSharper disable once MemberCanBePrivate.Global
|
||||
public Guid Token { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 用户名
|
||||
/// </summary>
|
||||
/// ReSharper disable once MemberCanBePrivate.Global
|
||||
public string UserName { get; init; }
|
||||
|
||||
/// <summary>
|
||||
|
@ -3,14 +3,10 @@ using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
|
||||
namespace NetAdmin.Domain.DbMaps.Dependency;
|
||||
|
||||
/// <summary>
|
||||
/// 不可变实体
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
public abstract record ImmutableEntity : ImmutableEntity<long>
|
||||
{
|
||||
/// <summary>
|
||||
/// 唯一编码
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
[Snowflake]
|
||||
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
|
||||
public override long Id { get; init; }
|
||||
@ -19,26 +15,20 @@ public abstract record ImmutableEntity : ImmutableEntity<long>
|
||||
/// <summary>
|
||||
/// 不可变实体
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <typeparam name="T">主键类型</typeparam>
|
||||
public abstract record ImmutableEntity<T> : LiteImmutableEntity<T>, IFieldCreatedUser
|
||||
{
|
||||
/// <summary>
|
||||
/// 创建者编号
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="IFieldCreatedUser.CreatedUserId" />
|
||||
[JsonIgnore]
|
||||
[Column(CanUpdate = false, Position = -1)]
|
||||
public long? CreatedUserId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建者用户名
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="IFieldCreatedUser.CreatedUserName" />
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_31, CanUpdate = false, Position = -1)]
|
||||
public virtual string CreatedUserName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 唯一编码
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
|
||||
public override T Id { get; init; }
|
||||
}
|
@ -3,14 +3,10 @@ using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
|
||||
namespace NetAdmin.Domain.DbMaps.Dependency;
|
||||
|
||||
/// <summary>
|
||||
/// 轻型不可变实体
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
public abstract record LiteImmutableEntity : LiteImmutableEntity<long>
|
||||
{
|
||||
/// <summary>
|
||||
/// 唯一编码
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
[Snowflake]
|
||||
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
|
||||
public override long Id { get; init; }
|
||||
@ -19,19 +15,15 @@ public abstract record LiteImmutableEntity : LiteImmutableEntity<long>
|
||||
/// <summary>
|
||||
/// 轻型不可变实体
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <typeparam name="T">主键类型</typeparam>
|
||||
public abstract record LiteImmutableEntity<T> : EntityBase, IFieldPrimary<T>, IFieldCreatedTime
|
||||
{
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="IFieldCreatedTime.CreatedTime" />
|
||||
[JsonIgnore]
|
||||
[Column(ServerTime = DateTimeKind.Utc, CanUpdate = false, Position = -1)]
|
||||
public virtual DateTime CreatedTime { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 唯一编码
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
[JsonIgnore]
|
||||
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
|
||||
public virtual T Id { get; init; }
|
||||
|
@ -3,14 +3,10 @@ using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
|
||||
namespace NetAdmin.Domain.DbMaps.Dependency;
|
||||
|
||||
/// <summary>
|
||||
/// 轻型可变实体
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
public abstract record LiteMutableEntity : LiteMutableEntity<long>
|
||||
{
|
||||
/// <summary>
|
||||
/// 唯一编码
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
[Snowflake]
|
||||
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
|
||||
public override long Id { get; init; }
|
||||
@ -21,15 +17,11 @@ public abstract record LiteMutableEntity : LiteMutableEntity<long>
|
||||
/// </summary>
|
||||
public abstract record LiteMutableEntity<T> : LiteImmutableEntity<T>, IFieldModifiedTime
|
||||
{
|
||||
/// <summary>
|
||||
/// 唯一编码
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
|
||||
public override T Id { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 修改时间
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="IFieldModifiedTime.ModifiedTime" />
|
||||
[JsonIgnore]
|
||||
[Column(ServerTime = DateTimeKind.Utc, CanInsert = false, Position = -1)]
|
||||
public virtual DateTime? ModifiedTime { get; init; }
|
||||
|
@ -3,14 +3,10 @@ using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
|
||||
namespace NetAdmin.Domain.DbMaps.Dependency;
|
||||
|
||||
/// <summary>
|
||||
/// 乐观锁轻型可变实体
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
public abstract record LiteVersionEntity : LiteVersionEntity<long>
|
||||
{
|
||||
/// <summary>
|
||||
/// 唯一编码
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
[Snowflake]
|
||||
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
|
||||
public override long Id { get; init; }
|
||||
@ -21,15 +17,11 @@ public abstract record LiteVersionEntity : LiteVersionEntity<long>
|
||||
/// </summary>
|
||||
public abstract record LiteVersionEntity<T> : LiteMutableEntity<T>, IFieldVersion
|
||||
{
|
||||
/// <summary>
|
||||
/// 唯一编码
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
|
||||
public override T Id { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 数据版本
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="IFieldVersion.Version" />
|
||||
[JsonIgnore]
|
||||
[Column(IsVersion = true, Position = -1)]
|
||||
public virtual long Version { get; init; }
|
||||
|
@ -3,14 +3,10 @@ using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
|
||||
namespace NetAdmin.Domain.DbMaps.Dependency;
|
||||
|
||||
/// <summary>
|
||||
/// 可变实体
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
public abstract record MutableEntity : MutableEntity<long>
|
||||
{
|
||||
/// <summary>
|
||||
/// 唯一编码
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
[Snowflake]
|
||||
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
|
||||
public override long Id { get; init; }
|
||||
@ -21,22 +17,16 @@ public abstract record MutableEntity : MutableEntity<long>
|
||||
/// </summary>
|
||||
public abstract record MutableEntity<T> : LiteMutableEntity<T>, IFieldModifiedUser
|
||||
{
|
||||
/// <summary>
|
||||
/// 唯一编码
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
|
||||
public override T Id { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 修改者编号
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="IFieldModifiedUser.ModifiedUserId" />
|
||||
[JsonIgnore]
|
||||
[Column(CanInsert = false, Position = -1)]
|
||||
public long? ModifiedUserId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 修改者用户名
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="IFieldModifiedUser.ModifiedUserName" />
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_31, CanInsert = false, Position = -1)]
|
||||
public string ModifiedUserName { get; init; }
|
||||
|
@ -3,14 +3,10 @@ using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
|
||||
namespace NetAdmin.Domain.DbMaps.Dependency;
|
||||
|
||||
/// <summary>
|
||||
/// 乐观锁可变实体
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
public abstract record VersionEntity : VersionEntity<long>
|
||||
{
|
||||
/// <summary>
|
||||
/// 唯一编码
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
[Snowflake]
|
||||
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
|
||||
public override long Id { get; init; }
|
||||
@ -19,24 +15,28 @@ public abstract record VersionEntity : VersionEntity<long>
|
||||
/// <summary>
|
||||
/// 乐观锁可变实体
|
||||
/// </summary>
|
||||
public abstract record VersionEntity<T> : LiteVersionEntity<T>, IFieldModifiedUser
|
||||
public abstract record VersionEntity<T> : LiteVersionEntity<T>, IFieldModifiedUser, IFieldCreatedUser
|
||||
{
|
||||
/// <summary>
|
||||
/// 唯一编码
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
[JsonIgnore]
|
||||
[Column(CanUpdate = false, Position = -1)]
|
||||
public long? CreatedUserId { get; init; }
|
||||
|
||||
/// <inheritdoc />
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_31, CanUpdate = false, Position = -1)]
|
||||
public string CreatedUserName { get; set; }
|
||||
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
|
||||
public override T Id { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 修改者编号
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="IFieldModifiedUser.ModifiedUserId" />
|
||||
[JsonIgnore]
|
||||
[Column(CanInsert = false, Position = -1)]
|
||||
public long? ModifiedUserId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 修改者用户名
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="IFieldModifiedUser.ModifiedUserName" />
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_31, CanInsert = false, Position = -1)]
|
||||
public string ModifiedUserName { get; init; }
|
||||
|
@ -16,9 +16,7 @@ public record Sys_Api : ImmutableEntity<string>, IFieldSummary
|
||||
[Navigate(nameof(ParentId))]
|
||||
public IEnumerable<Sys_Api> Children { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 唯一编码
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_127, IsIdentity = false, IsPrimary = true, Position = 1)]
|
||||
public override string Id { get; init; }
|
||||
@ -42,7 +40,9 @@ public record Sys_Api : ImmutableEntity<string>, IFieldSummary
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_31)]
|
||||
#pragma warning disable CA1716
|
||||
public virtual string Namespace { get; init; }
|
||||
#pragma warning restore CA1716
|
||||
|
||||
/// <summary>
|
||||
/// 父编号
|
||||
|
@ -44,6 +44,13 @@ public record Sys_Dept : VersionEntity, IFieldEnabled, IFieldSummary, IFieldSort
|
||||
[Navigate(ManyToMany = typeof(Sys_RoleDept))]
|
||||
public ICollection<Sys_Role> Roles { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 发送给此部门的站内信集合
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Navigate(ManyToMany = typeof(Sys_SiteMsgDept))]
|
||||
public ICollection<Sys_SiteMsg> SiteMsgs { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 排序值,越大越前
|
||||
/// </summary>
|
||||
|
@ -7,7 +7,7 @@ namespace NetAdmin.Domain.DbMaps.Sys;
|
||||
/// <summary>
|
||||
/// 菜单表
|
||||
/// </summary>
|
||||
[Table(Name = "Sys_Menu")]
|
||||
[Table(Name = Chars.FLG_TABLE_NAME_PREFIX + nameof(Sys_Menu))]
|
||||
[Index($"idx_{{tablename}}_{nameof(Name)}", nameof(Name), true)]
|
||||
public record Sys_Menu : VersionEntity, IFieldSort
|
||||
{
|
||||
|
@ -6,7 +6,7 @@ namespace NetAdmin.Domain.DbMaps.Sys;
|
||||
/// <summary>
|
||||
/// 请求日志表
|
||||
/// </summary>
|
||||
[Table(Name = "Sys_RequestLog")]
|
||||
[Table(Name = Chars.FLG_TABLE_NAME_PREFIX + nameof(Sys_RequestLog))]
|
||||
public record Sys_RequestLog : ImmutableEntity, IFieldCreatedClient
|
||||
{
|
||||
/// <summary>
|
||||
|
@ -68,6 +68,13 @@ public record Sys_Role : VersionEntity, IFieldSort, IFieldEnabled, IFieldSummary
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_31)]
|
||||
public virtual string Name { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 发送给此角色的站内信集合
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Navigate(ManyToMany = typeof(Sys_SiteMsgRole))]
|
||||
public ICollection<Sys_SiteMsg> SiteMsgs { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 排序值,越大越前
|
||||
/// </summary>
|
||||
|
101
src/backend/NetAdmin.Domain/DbMaps/Sys/Sys_SiteMsg.cs
Normal file
101
src/backend/NetAdmin.Domain/DbMaps/Sys/Sys_SiteMsg.cs
Normal file
@ -0,0 +1,101 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency;
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.Dto.Sys.SiteMsg;
|
||||
using NetAdmin.Domain.Enums.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
/// <summary>
|
||||
/// 站内信表
|
||||
/// </summary>
|
||||
[Table(Name = Chars.FLG_TABLE_NAME_PREFIX + nameof(Sys_SiteMsg))]
|
||||
public record Sys_SiteMsg : VersionEntity, IRegister, IFieldSummary
|
||||
{
|
||||
/// <summary>
|
||||
/// 消息内容
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_TEXT)]
|
||||
public virtual string Content { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 消息-创建者映射
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Navigate(nameof(CreatedUserId))]
|
||||
public virtual Sys_User Creator { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 消息-部门映射
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Navigate(ManyToMany = typeof(Sys_SiteMsgDept))]
|
||||
public virtual ICollection<Sys_Dept> Depts { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 消息-标记映射
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Navigate(nameof(Sys_SiteMsgFlag.SiteMsgId))]
|
||||
public ICollection<Sys_SiteMsgFlag> Flags { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 消息类型
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
public virtual SiteMsgTypes MsgType { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 消息-角色映射
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Navigate(ManyToMany = typeof(Sys_SiteMsgRole))]
|
||||
public virtual ICollection<Sys_Role> Roles { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 消息摘要
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||
public virtual string Summary { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 消息主题
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||
public virtual string Title { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 消息-用户映射
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Navigate(ManyToMany = typeof(Sys_SiteMsgUser))]
|
||||
public virtual ICollection<Sys_User> Users { get; init; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public void Register(TypeAdapterConfig config)
|
||||
{
|
||||
_ = config.ForType<CreateSiteMsgReq, Sys_SiteMsg>()
|
||||
.Map( //
|
||||
d => d.Summary, s => s.Content.RemoveHtmlTag().HtmlDe().Sub(0, 100))
|
||||
.Map( //
|
||||
d => d.Roles
|
||||
, s => s.RoleIds.NullOrEmpty()
|
||||
? Array.Empty<Sys_Role>()
|
||||
: s.RoleIds.Select(x => new Sys_Role { Id = x }))
|
||||
.Map( //
|
||||
d => d.Users
|
||||
, s => s.UserIds.NullOrEmpty()
|
||||
? Array.Empty<Sys_User>()
|
||||
: s.UserIds.Select(x => new Sys_User { Id = x }))
|
||||
.Map( //
|
||||
d => d.Depts
|
||||
, s => s.DeptIds.NullOrEmpty()
|
||||
? Array.Empty<Sys_Dept>()
|
||||
: s.DeptIds.Select(x => new Sys_Dept { Id = x }))
|
||||
|
||||
//
|
||||
;
|
||||
}
|
||||
}
|
37
src/backend/NetAdmin.Domain/DbMaps/Sys/Sys_SiteMsgDept.cs
Normal file
37
src/backend/NetAdmin.Domain/DbMaps/Sys/Sys_SiteMsgDept.cs
Normal file
@ -0,0 +1,37 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency;
|
||||
|
||||
namespace NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
/// <summary>
|
||||
/// 站内信-部门映射表
|
||||
/// </summary>
|
||||
[Table(Name = Chars.FLG_TABLE_NAME_PREFIX + nameof(Sys_SiteMsgDept))]
|
||||
[Index($"idx_{{tablename}}_{nameof(DeptId)}_{nameof(SiteMsgId)}", $"{nameof(DeptId)},{nameof(SiteMsgId)}", true)]
|
||||
public record Sys_SiteMsgDept : ImmutableEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// 关联的部门
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
public Sys_Dept Dept { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 部门编号
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
public virtual long DeptId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 关联的站内信
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
public Sys_SiteMsg SiteMsg { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 站内信编号
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
public virtual long SiteMsgId { get; init; }
|
||||
}
|
29
src/backend/NetAdmin.Domain/DbMaps/Sys/Sys_SiteMsgFlag.cs
Normal file
29
src/backend/NetAdmin.Domain/DbMaps/Sys/Sys_SiteMsgFlag.cs
Normal file
@ -0,0 +1,29 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency;
|
||||
|
||||
namespace NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
/// <summary>
|
||||
/// 站内信标记表
|
||||
/// </summary>
|
||||
[Table(Name = Chars.FLG_TABLE_NAME_PREFIX + nameof(Sys_SiteMsgFlag))]
|
||||
[Index($"idx_{{tablename}}_{nameof(SiteMsgId)}_{nameof(UserId)}", $"{nameof(SiteMsgId)},{nameof(UserId)}", true)]
|
||||
public record Sys_SiteMsgFlag : MutableEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// 站内信编号
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
public virtual long SiteMsgId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 用户编号
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
public virtual long UserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 用户站内信状态
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
public virtual UserSiteMsgStatues UserSiteMsgStatus { get; set; }
|
||||
}
|
37
src/backend/NetAdmin.Domain/DbMaps/Sys/Sys_SiteMsgRole.cs
Normal file
37
src/backend/NetAdmin.Domain/DbMaps/Sys/Sys_SiteMsgRole.cs
Normal file
@ -0,0 +1,37 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency;
|
||||
|
||||
namespace NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
/// <summary>
|
||||
/// 站内信-角色映射表
|
||||
/// </summary>
|
||||
[Table(Name = Chars.FLG_TABLE_NAME_PREFIX + nameof(Sys_SiteMsgRole))]
|
||||
[Index($"idx_{{tablename}}_{nameof(RoleId)}_{nameof(SiteMsgId)}", $"{nameof(RoleId)},{nameof(SiteMsgId)}", true)]
|
||||
public record Sys_SiteMsgRole : ImmutableEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// 关联的角色
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
public Sys_Role Role { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 角色编号
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
public virtual long RoleId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 关联的站内信
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
public Sys_SiteMsg SiteMsg { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 站内信编号
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
public virtual long SiteMsgId { get; init; }
|
||||
}
|
37
src/backend/NetAdmin.Domain/DbMaps/Sys/Sys_SiteMsgUser.cs
Normal file
37
src/backend/NetAdmin.Domain/DbMaps/Sys/Sys_SiteMsgUser.cs
Normal file
@ -0,0 +1,37 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency;
|
||||
|
||||
namespace NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
/// <summary>
|
||||
/// 站内信-用户映射表
|
||||
/// </summary>
|
||||
[Table(Name = Chars.FLG_TABLE_NAME_PREFIX + nameof(Sys_SiteMsgUser))]
|
||||
[Index($"idx_{{tablename}}_{nameof(UserId)}_{nameof(SiteMsgId)}", $"{nameof(UserId)},{nameof(SiteMsgId)}", true)]
|
||||
public record Sys_SiteMsgUser : ImmutableEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// 关联的站内信
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
public Sys_SiteMsg SiteMsg { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 站内信编号
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
public virtual long SiteMsgId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 关联的用户
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
public Sys_User User { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 用户编号
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
public virtual long UserId { get; init; }
|
||||
}
|
@ -60,7 +60,7 @@ public record Sys_User : VersionEntity, IFieldSummary, IFieldEnabled, IRegister
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
public Guid Password { get; set; }
|
||||
public Guid Password { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 用户档案
|
||||
@ -75,6 +75,13 @@ public record Sys_User : VersionEntity, IFieldSummary, IFieldEnabled, IRegister
|
||||
[Navigate(ManyToMany = typeof(Sys_UserRole))]
|
||||
public ICollection<Sys_Role> Roles { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 发送给此用户的站内信集合
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Navigate(ManyToMany = typeof(Sys_SiteMsgUser))]
|
||||
public ICollection<Sys_SiteMsg> SiteMsgs { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 描述
|
||||
/// </summary>
|
||||
|
@ -6,7 +6,7 @@ namespace NetAdmin.Domain.DbMaps.Sys;
|
||||
/// <summary>
|
||||
/// 用户档案表
|
||||
/// </summary>
|
||||
[Table(Name = "Sys_UserProfile")]
|
||||
[Table(Name = Chars.FLG_TABLE_NAME_PREFIX + nameof(Sys_UserProfile))]
|
||||
public record Sys_UserProfile : VersionEntity, IRegister
|
||||
{
|
||||
/// <summary>
|
||||
|
@ -1,5 +1,3 @@
|
||||
using NetAdmin.Domain.Attributes.DataValidation;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Dependency;
|
||||
|
||||
/// <summary>
|
||||
@ -11,7 +9,7 @@ public sealed record BulkReq<T> : DataAbstraction
|
||||
/// <summary>
|
||||
/// 请求对象
|
||||
/// </summary>
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.请求对象))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.请求对象不能为空))]
|
||||
[MinLength(1)]
|
||||
[MaxLength(Numbers.BULK_REQ_LIMIT)]
|
||||
public IEnumerable<T> Items { get; init; }
|
||||
|
@ -0,0 +1,42 @@
|
||||
using NetAdmin.Domain.Enums;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Dependency;
|
||||
|
||||
/// <summary>
|
||||
/// 动态过滤条件
|
||||
/// </summary>
|
||||
public record DynamicFilterInfo : DataAbstraction
|
||||
{
|
||||
/// <summary>
|
||||
/// 字段名
|
||||
/// </summary>
|
||||
public string Field { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 子过滤条件
|
||||
/// </summary>
|
||||
public List<DynamicFilterInfo> Filters { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 子过滤条件逻辑关系
|
||||
/// </summary>
|
||||
public DynamicFilterLogics Logic { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 操作符
|
||||
/// </summary>
|
||||
public DynamicFilterOperators Operator { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 值
|
||||
/// </summary>
|
||||
public object Value { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 隐式转换为 FreeSql 的 DynamicFilterInfo 对象
|
||||
/// </summary>
|
||||
public static implicit operator FreeSql.Internal.Model.DynamicFilterInfo(DynamicFilterInfo d)
|
||||
{
|
||||
return d.Adapt<FreeSql.Internal.Model.DynamicFilterInfo>();
|
||||
}
|
||||
}
|
@ -19,5 +19,5 @@ public record RestfulInfo<T> : DataAbstraction
|
||||
/// <summary>
|
||||
/// 消息
|
||||
/// </summary>
|
||||
public object Msg { get; init; }
|
||||
public virtual object Msg { get; init; }
|
||||
}
|
@ -8,9 +8,7 @@ namespace NetAdmin.Domain.Dto.Sys.Api;
|
||||
/// </summary>
|
||||
public sealed record QueryApiRsp : Sys_Api
|
||||
{
|
||||
/// <summary>
|
||||
/// 子节点
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="Sys_Api.Children" />
|
||||
public new IEnumerable<QueryApiRsp> Children { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
|
@ -1,5 +1,3 @@
|
||||
using NetAdmin.Domain.Attributes.DataValidation;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.Captcha;
|
||||
|
||||
/// <summary>
|
||||
@ -10,7 +8,7 @@ public sealed record VerifyCaptchaReq : DataAbstraction
|
||||
/// <summary>
|
||||
/// 唯一编码
|
||||
/// </summary>
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.唯一编码))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.唯一编码不能为空))]
|
||||
public string Id { get; init; }
|
||||
|
||||
/// <summary>
|
||||
@ -22,6 +20,6 @@ public sealed record VerifyCaptchaReq : DataAbstraction
|
||||
/// <summary>
|
||||
/// 验证数据
|
||||
/// </summary>
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.验证数据))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.验证数据不能为空))]
|
||||
public string VerifyData { get; init; }
|
||||
}
|
@ -8,9 +8,7 @@ namespace NetAdmin.Domain.Dto.Sys.Config;
|
||||
/// </summary>
|
||||
public sealed record QueryConfigReq : Sys_Config
|
||||
{
|
||||
/// <summary>
|
||||
/// 是否启用
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="IFieldEnabled.Enabled" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public new bool? Enabled { get; init; }
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
using NetAdmin.Domain.Attributes.DataValidation;
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
@ -15,7 +14,7 @@ public record CreateDeptReq : Sys_Dept
|
||||
|
||||
/// <inheritdoc cref="Sys_Dept.Name" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.部门名称))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.部门名称不能为空))]
|
||||
public override string Name { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_Dept.ParentId" />
|
||||
|
@ -8,9 +8,7 @@ namespace NetAdmin.Domain.Dto.Sys.Dept;
|
||||
/// </summary>
|
||||
public record QueryDeptRsp : Sys_Dept
|
||||
{
|
||||
/// <summary>
|
||||
/// 子节点
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="Sys_Dept.Children" />
|
||||
public new virtual IEnumerable<QueryDeptRsp> Children { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldCreatedTime.CreatedTime" />
|
||||
|
@ -8,11 +8,13 @@ public sealed record GenerateCsCodeReq : DataAbstraction
|
||||
/// <summary>
|
||||
/// 模块名称
|
||||
/// </summary>
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.模块名称不能为空))]
|
||||
public string ModuleName { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 模块说明
|
||||
/// </summary>
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.模块说明不能为空))]
|
||||
public string ModuleRemark { get; init; }
|
||||
|
||||
/// <summary>
|
||||
|
@ -1,5 +1,3 @@
|
||||
using NetAdmin.Domain.Attributes.DataValidation;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.Dev;
|
||||
|
||||
/// <summary>
|
||||
@ -10,12 +8,12 @@ public sealed record GenerateIconCodeReq : DataAbstraction
|
||||
/// <summary>
|
||||
/// 图标名称
|
||||
/// </summary>
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.图标名称))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.图标名称不能为空))]
|
||||
public string IconName { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 图标代码
|
||||
/// </summary>
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.图标代码))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.图标代码不能为空))]
|
||||
public string SvgCode { get; init; }
|
||||
}
|
@ -1,4 +1,3 @@
|
||||
using NetAdmin.Domain.Attributes.DataValidation;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.Dic.Catalog;
|
||||
@ -10,12 +9,12 @@ public record CreateDicCatalogReq : Sys_DicCatalog
|
||||
{
|
||||
/// <inheritdoc cref="Sys_DicCatalog.Code" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.字典编码))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.字典编码不能为空))]
|
||||
public override string Code { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_DicCatalog.Name" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.字典名称))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.字典名称不能为空))]
|
||||
public override string Name { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_DicCatalog.ParentId" />
|
||||
|
@ -8,9 +8,7 @@ namespace NetAdmin.Domain.Dto.Sys.Dic.Catalog;
|
||||
/// </summary>
|
||||
public sealed record QueryDicCatalogRsp : Sys_DicCatalog
|
||||
{
|
||||
/// <summary>
|
||||
/// 子节点
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="Sys_DicCatalog.Children" />
|
||||
public new IEnumerable<QueryDicCatalogRsp> Children { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_DicCatalog.Code" />
|
||||
|
@ -1,4 +1,3 @@
|
||||
using NetAdmin.Domain.Attributes.DataValidation;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.Dic.Content;
|
||||
@ -10,16 +9,16 @@ public record CreateDicContentReq : Sys_DicContent
|
||||
{
|
||||
/// <inheritdoc cref="Sys_DicContent.CatalogId" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.字典目录编号))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.字典目录编号不能为空))]
|
||||
public override long CatalogId { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_DicContent.Key" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.键名称))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.键名称不能为空))]
|
||||
public override string Key { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_DicContent.Value" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.键值))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.键值不能为空))]
|
||||
public override string Value { get; init; }
|
||||
}
|
@ -1,4 +1,3 @@
|
||||
using NetAdmin.Domain.Attributes.DataValidation;
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
using NetAdmin.Domain.Enums.Sys;
|
||||
@ -40,7 +39,7 @@ public record CreateMenuReq : Sys_Menu
|
||||
|
||||
/// <inheritdoc cref="Sys_Menu.Name" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.菜单名称))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.菜单名称不能为空))]
|
||||
public override string Name { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_Menu.ParentId" />
|
||||
@ -63,7 +62,7 @@ public record CreateMenuReq : Sys_Menu
|
||||
public override string Tag => Meta.Tag;
|
||||
|
||||
/// <inheritdoc cref="Sys_Menu.Title" />
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.菜单标题))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.菜单标题不能为空))]
|
||||
public override string Title => Meta.Title;
|
||||
|
||||
/// <inheritdoc cref="Sys_Menu.Type" />
|
||||
|
@ -17,9 +17,7 @@ public sealed record QueryMenuRsp : Sys_Menu, IRegister
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public override string Active { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 子节点
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="Sys_Menu.Children" />
|
||||
public new IEnumerable<QueryMenuRsp> Children { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_Menu.Component" />
|
||||
|
@ -44,7 +44,7 @@ public record CreateRoleReq : Sys_Role
|
||||
|
||||
/// <inheritdoc cref="Sys_Role.Name" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.角色名称))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.角色名称不能为空))]
|
||||
public override string Name { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldSort.Sort" />
|
||||
|
@ -1,5 +1,3 @@
|
||||
using NetAdmin.Domain.Attributes.DataValidation;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.Role;
|
||||
|
||||
/// <summary>
|
||||
@ -10,12 +8,12 @@ public sealed record MapMenusReq : DataAbstraction
|
||||
/// <summary>
|
||||
/// 菜单编号
|
||||
/// </summary>
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.菜单编号))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.菜单编号不能为空))]
|
||||
public IReadOnlyCollection<long> MenuIds { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 角色编号
|
||||
/// </summary>
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.角色编号))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.角色编号不能为空))]
|
||||
public long RoleId { get; init; }
|
||||
}
|
@ -1,4 +1,3 @@
|
||||
using NetAdmin.Domain.Attributes.DataValidation;
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.Role;
|
||||
@ -10,11 +9,11 @@ public sealed record UpdateRoleReq : CreateRoleReq
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.唯一编码))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.唯一编码不能为空))]
|
||||
public override long Id { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldVersion.Version" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.数据版本))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.数据版本不能为空))]
|
||||
public override long Version { get; init; }
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
using NetAdmin.Domain.Enums.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsg;
|
||||
|
||||
/// <summary>
|
||||
/// 请求:创建站内信
|
||||
/// </summary>
|
||||
public record CreateSiteMsgReq : Sys_SiteMsg
|
||||
{
|
||||
/// <inheritdoc cref="Sys_SiteMsg.Content" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.消息内容不能为空))]
|
||||
public override string Content { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 部门编号列表
|
||||
/// </summary>
|
||||
[MinLength(1)]
|
||||
[MaxLength(Numbers.BULK_REQ_LIMIT)]
|
||||
public IReadOnlyCollection<long> DeptIds { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_SiteMsg.MsgType" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
[EnumDataType(typeof(SiteMsgTypes))]
|
||||
public override SiteMsgTypes MsgType { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 角色编号列表
|
||||
/// </summary>
|
||||
[MinLength(1)]
|
||||
[MaxLength(Numbers.BULK_REQ_LIMIT)]
|
||||
public IReadOnlyCollection<long> RoleIds { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_SiteMsg.Title" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.消息主题不能为空))]
|
||||
public override string Title { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 用户编号列表
|
||||
/// </summary>
|
||||
[MinLength(1)]
|
||||
[MaxLength(Numbers.BULK_REQ_LIMIT)]
|
||||
public IReadOnlyCollection<long> UserIds { get; init; }
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsg;
|
||||
|
||||
/// <summary>
|
||||
/// 请求:查询站内信
|
||||
/// </summary>
|
||||
public sealed record QuerySiteMsgReq : Sys_SiteMsg
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
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;
|
||||
using NetAdmin.Domain.Dto.Sys.User;
|
||||
using NetAdmin.Domain.Enums.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsg;
|
||||
|
||||
/// <summary>
|
||||
/// 响应:查询站内信
|
||||
/// </summary>
|
||||
public sealed record QuerySiteMsgRsp : Sys_SiteMsg
|
||||
{
|
||||
/// <inheritdoc cref="Sys_SiteMsg.Content" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public override string Content { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldCreatedTime.CreatedTime" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override DateTime CreatedTime { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_SiteMsg.Depts" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public new IEnumerable<QueryDeptRsp> Depts { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldModifiedTime.ModifiedTime" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public override DateTime? ModifiedTime { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_SiteMsg.MsgType" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override SiteMsgTypes MsgType { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 我的标记
|
||||
/// </summary>
|
||||
public QuerySiteMsgFlagRsp MyFlags { get; set; }
|
||||
|
||||
/// <inheritdoc cref="Sys_SiteMsg.Roles" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public new IEnumerable<QueryRoleRsp> Roles { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 消息发送者
|
||||
/// </summary>
|
||||
public QueryUserRsp Sender { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_SiteMsg.Summary" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public override string Summary { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_SiteMsg.Title" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public override string Title { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_SiteMsg.Users" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public new IEnumerable<QueryUserRsp> Users { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldVersion.Version" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Version { get; init; }
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsg;
|
||||
|
||||
/// <summary>
|
||||
/// 请求:更新站内信
|
||||
/// </summary>
|
||||
public sealed record UpdateSiteMsgReq : CreateSiteMsgReq
|
||||
{
|
||||
/// <inheritdoc cref="IFieldVersion.Version" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Version { get; init; }
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsgDept;
|
||||
|
||||
/// <summary>
|
||||
/// 请求:创建站内信-部门映射
|
||||
/// </summary>
|
||||
public record CreateSiteMsgDeptReq : Sys_SiteMsgDept;
|
@ -0,0 +1,14 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsgDept;
|
||||
|
||||
/// <summary>
|
||||
/// 请求:查询站内信-部门映射
|
||||
/// </summary>
|
||||
public sealed record QuerySiteMsgDeptReq : Sys_SiteMsgDept
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsgDept;
|
||||
|
||||
/// <summary>
|
||||
/// 响应:查询站内信-部门映射
|
||||
/// </summary>
|
||||
public sealed record QuerySiteMsgDeptRsp : Sys_SiteMsgDept
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsgDept;
|
||||
|
||||
/// <summary>
|
||||
/// 请求:更新站内信-部门映射
|
||||
/// </summary>
|
||||
public sealed record UpdateSiteMsgDeptReq : CreateSiteMsgDeptReq { }
|
@ -0,0 +1,18 @@
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsgFlag;
|
||||
|
||||
/// <summary>
|
||||
/// 请求:创建站内信标记
|
||||
/// </summary>
|
||||
public record CreateSiteMsgFlagReq : Sys_SiteMsgFlag
|
||||
{
|
||||
/// <inheritdoc cref="Sys_SiteMsgFlag.SiteMsgId" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long SiteMsgId { get; set; }
|
||||
|
||||
/// <inheritdoc cref="Sys_SiteMsgFlag.UserSiteMsgStatus" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
[EnumDataType(typeof(UserSiteMsgStatues))]
|
||||
public override UserSiteMsgStatues UserSiteMsgStatus { get; set; }
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsgFlag;
|
||||
|
||||
/// <summary>
|
||||
/// 请求:查询站内信标记
|
||||
/// </summary>
|
||||
public sealed record QuerySiteMsgFlagReq : Sys_SiteMsgFlag
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsgFlag;
|
||||
|
||||
/// <summary>
|
||||
/// 响应:查询站内信标记
|
||||
/// </summary>
|
||||
public sealed record QuerySiteMsgFlagRsp : Sys_SiteMsgFlag
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
|
||||
/// <inheritdoc />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override UserSiteMsgStatues UserSiteMsgStatus { get; set; }
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsgFlag;
|
||||
|
||||
/// <summary>
|
||||
/// 请求:更新站内信标记
|
||||
/// </summary>
|
||||
public sealed record UpdateSiteMsgFlagReq : CreateSiteMsgFlagReq { }
|
@ -0,0 +1,8 @@
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsgRole;
|
||||
|
||||
/// <summary>
|
||||
/// 请求:创建站内信-角色映射
|
||||
/// </summary>
|
||||
public record CreateSiteMsgRoleReq : Sys_SiteMsgRole;
|
@ -0,0 +1,14 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsgRole;
|
||||
|
||||
/// <summary>
|
||||
/// 请求:查询站内信-角色映射
|
||||
/// </summary>
|
||||
public sealed record QuerySiteMsgRoleReq : Sys_SiteMsgRole
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsgRole;
|
||||
|
||||
/// <summary>
|
||||
/// 响应:查询站内信-角色映射
|
||||
/// </summary>
|
||||
public sealed record QuerySiteMsgRoleRsp : Sys_SiteMsgRole
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsgRole;
|
||||
|
||||
/// <summary>
|
||||
/// 请求:更新站内信-角色映射
|
||||
/// </summary>
|
||||
public sealed record UpdateSiteMsgRoleReq : CreateSiteMsgRoleReq { }
|
@ -0,0 +1,8 @@
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsgUser;
|
||||
|
||||
/// <summary>
|
||||
/// 请求:创建站内信-用户映射
|
||||
/// </summary>
|
||||
public record CreateSiteMsgUserReq : Sys_SiteMsgUser;
|
@ -0,0 +1,14 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsgUser;
|
||||
|
||||
/// <summary>
|
||||
/// 请求:查询站内信-用户映射
|
||||
/// </summary>
|
||||
public sealed record QuerySiteMsgUserReq : Sys_SiteMsgUser
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsgUser;
|
||||
|
||||
/// <summary>
|
||||
/// 响应:查询站内信-用户映射
|
||||
/// </summary>
|
||||
public sealed record QuerySiteMsgUserRsp : Sys_SiteMsgUser
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsgUser;
|
||||
|
||||
/// <summary>
|
||||
/// 请求:更新站内信-用户映射
|
||||
/// </summary>
|
||||
public sealed record UpdateSiteMsgUserReq : CreateSiteMsgUserReq { }
|
17
src/backend/NetAdmin.Domain/Dto/Sys/Tool/GetModulesRsp.cs
Normal file
17
src/backend/NetAdmin.Domain/Dto/Sys/Tool/GetModulesRsp.cs
Normal file
@ -0,0 +1,17 @@
|
||||
namespace NetAdmin.Domain.Dto.Sys.Tool;
|
||||
|
||||
/// <summary>
|
||||
/// 响应:获取模块信息
|
||||
/// </summary>
|
||||
public record GetModulesRsp : DataAbstraction
|
||||
{
|
||||
/// <summary>
|
||||
/// 模块名称
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 模块版本
|
||||
/// </summary>
|
||||
public string Version { get; set; }
|
||||
}
|
@ -15,7 +15,7 @@ public sealed record CheckUserNameAvailableReq : Sys_User
|
||||
|
||||
/// <inheritdoc cref="Sys_User.UserName" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.用户名))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.用户名不能为空))]
|
||||
[UserName]
|
||||
public override string UserName { get; init; }
|
||||
}
|
@ -10,7 +10,7 @@ namespace NetAdmin.Domain.Dto.Sys.User;
|
||||
public abstract record CreateUpdateUserReq : Sys_User
|
||||
{
|
||||
/// <inheritdoc cref="Sys_User.Avatar" />
|
||||
[CultureUrl]
|
||||
[Url]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override string Avatar { get; init; }
|
||||
|
||||
@ -41,7 +41,7 @@ public abstract record CreateUpdateUserReq : Sys_User
|
||||
/// <summary>
|
||||
/// 角色编号列表
|
||||
/// </summary>
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.角色编号列表))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.角色编号列表不能为空))]
|
||||
[MinLength(1)]
|
||||
[MaxLength(Numbers.BULK_REQ_LIMIT)]
|
||||
public IReadOnlyCollection<long> RoleIds { get; init; }
|
||||
@ -51,7 +51,7 @@ public abstract record CreateUpdateUserReq : Sys_User
|
||||
public override string Summary { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_User.UserName" />
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.用户名))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.用户名不能为空))]
|
||||
[UserName]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override string UserName { get; init; }
|
||||
|
@ -1,4 +1,3 @@
|
||||
using NetAdmin.Domain.Attributes.DataValidation;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
using NetAdmin.Domain.Dto.Sys.UserProfile;
|
||||
|
||||
@ -10,11 +9,11 @@ namespace NetAdmin.Domain.Dto.Sys.User;
|
||||
public record CreateUserReq : CreateUpdateUserReq, IRegister
|
||||
{
|
||||
/// <inheritdoc cref="CreateUpdateUserReq.PasswordText" />
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.密码))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.密码不能为空))]
|
||||
public override string PasswordText { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_User.Profile" />
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.用户档案))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.用户档案不能为空))]
|
||||
public new CreateUserProfileReq Profile { get; init; }
|
||||
|
||||
/// <inheritdoc />
|
||||
|
@ -1,4 +1,3 @@
|
||||
using NetAdmin.Domain.Attributes.DataValidation;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.User;
|
||||
@ -11,10 +10,10 @@ public record LoginByPwdReq : DataAbstraction
|
||||
/// <summary>
|
||||
/// 用户名、手机号、邮箱
|
||||
/// </summary>
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.账号))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.账号不能为空))]
|
||||
public string Account { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_User.Password" />
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.密码))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.密码不能为空))]
|
||||
public string Password { get; init; }
|
||||
}
|
@ -1,3 +1,4 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.User;
|
||||
@ -7,15 +8,11 @@ namespace NetAdmin.Domain.Dto.Sys.User;
|
||||
/// </summary>
|
||||
public sealed record QueryUserReq : Sys_User
|
||||
{
|
||||
/// <summary>
|
||||
/// 部门编号
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="Sys_User.DeptId" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long DeptId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// id
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
|
||||
|
@ -18,9 +18,7 @@ public record QueryUserRsp : Sys_User
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override DateTime CreatedTime { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 部门
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="Sys_User.Dept" />
|
||||
public new virtual QueryDeptRsp Dept { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_User.Email" />
|
||||
@ -39,9 +37,7 @@ public record QueryUserRsp : Sys_User
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public override string Mobile { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 角色列表
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="Sys_User.Roles" />
|
||||
public new virtual IEnumerable<QueryRoleRsp> Roles { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_User.Summary" />
|
||||
|
@ -12,7 +12,7 @@ public record RegisterUserReq : Sys_User
|
||||
/// <summary>
|
||||
/// 密码
|
||||
/// </summary>
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.密码))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.密码不能为空))]
|
||||
[Password]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public virtual string PasswordText { get; init; }
|
||||
@ -23,10 +23,8 @@ public record RegisterUserReq : Sys_User
|
||||
[JsonIgnore]
|
||||
public IReadOnlyCollection<long> RoleIds { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 用户名
|
||||
/// </summary>
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.用户名))]
|
||||
/// <inheritdoc cref="Sys_User.UserName" />
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.用户名不能为空))]
|
||||
[UserName]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override string UserName { get; init; }
|
||||
@ -34,6 +32,6 @@ public record RegisterUserReq : Sys_User
|
||||
/// <summary>
|
||||
/// 短信验证请求
|
||||
/// </summary>
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.短信验证请求))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.短信验证请求不能为空))]
|
||||
public VerifySmsCodeReq VerifySmsCodeReq { get; set; }
|
||||
}
|
@ -11,13 +11,13 @@ public sealed record ResetPasswordReq : DataAbstraction
|
||||
/// <summary>
|
||||
/// 密码
|
||||
/// </summary>
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.密码))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.密码不能为空))]
|
||||
[Password]
|
||||
public string PasswordText { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 短信验证请求
|
||||
/// </summary>
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.短信验证请求))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.短信验证请求不能为空))]
|
||||
public VerifySmsCodeReq VerifySmsCodeReq { get; init; }
|
||||
}
|
@ -1,4 +1,3 @@
|
||||
using NetAdmin.Domain.Attributes.DataValidation;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.User;
|
||||
@ -9,8 +8,8 @@ namespace NetAdmin.Domain.Dto.Sys.User;
|
||||
public sealed record SetAvatarReq : Sys_User
|
||||
{
|
||||
/// <inheritdoc cref="Sys_User.Avatar" />
|
||||
[CultureUrl]
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.用户头像))]
|
||||
[Url]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.用户头像不能为空))]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override string Avatar { get; init; }
|
||||
}
|
@ -1,4 +1,3 @@
|
||||
using NetAdmin.Domain.Attributes.DataValidation;
|
||||
using NetAdmin.Domain.Dto.Sys.VerifyCode;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.User;
|
||||
@ -11,7 +10,7 @@ public sealed record SetMobileReq : DataAbstraction
|
||||
/// <summary>
|
||||
/// 新手机短信验证请求
|
||||
/// </summary>
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.短信验证请求))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.短信验证请求不能为空))]
|
||||
public VerifySmsCodeReq NewVerifySmsCodeReq { get; init; }
|
||||
|
||||
/// <summary>
|
||||
|
@ -10,14 +10,14 @@ public sealed record SetPasswordReq : DataAbstraction
|
||||
/// <summary>
|
||||
/// 新密码
|
||||
/// </summary>
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.新密码))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.新密码不能为空))]
|
||||
[Password]
|
||||
public string NewPassword { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 旧密码
|
||||
/// </summary>
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.旧密码))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.旧密码不能为空))]
|
||||
[Password]
|
||||
public string OldPassword { get; init; }
|
||||
}
|
@ -1,4 +1,3 @@
|
||||
using NetAdmin.Domain.Attributes.DataValidation;
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
using NetAdmin.Domain.Dto.Sys.UserProfile;
|
||||
@ -15,7 +14,7 @@ public sealed record UpdateUserReq : CreateUpdateUserReq
|
||||
public override long Id { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_User.Profile" />
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.用户档案))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.用户档案不能为空))]
|
||||
public new UpdateUserProfileReq Profile { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldVersion.Version" />
|
||||
|
@ -9,10 +9,10 @@ namespace NetAdmin.Domain.Dto.Sys.User;
|
||||
/// </summary>
|
||||
public record UserInfoRsp : QueryUserRsp, IRegister
|
||||
{
|
||||
/// <inheritdoc />
|
||||
/// <inheritdoc cref="Sys_User.Dept" />
|
||||
public override QueryDeptRsp Dept { get; init; }
|
||||
|
||||
/// <inheritdoc />
|
||||
/// <inheritdoc cref="Sys_User.Roles" />
|
||||
public override IEnumerable<QueryRoleRsp> Roles { get; init; }
|
||||
|
||||
/// <inheritdoc />
|
||||
|
@ -27,9 +27,7 @@ public record CreateUserProfileReq : Sys_UserProfile
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override string CompanyAddress { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 工作地区
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="Sys_UserProfile.CompanyArea" />
|
||||
public new QueryDicContentRsp CompanyArea { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_UserProfile.CompanyName" />
|
||||
@ -50,9 +48,7 @@ public record CreateUserProfileReq : Sys_UserProfile
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override string EmergencyContactAddress { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 紧急联系地区
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="Sys_UserProfile.EmergencyContactArea" />
|
||||
public new QueryDicContentRsp EmergencyContactArea { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_UserProfile.EmergencyContactMobile" />
|
||||
@ -77,9 +73,7 @@ public record CreateUserProfileReq : Sys_UserProfile
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override string HomeAddress { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 住宅地区
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="Sys_UserProfile.HomeArea" />
|
||||
public new QueryDicContentRsp HomeArea { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_UserProfile.HomeTelephone" />
|
||||
@ -97,9 +91,7 @@ public record CreateUserProfileReq : Sys_UserProfile
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override Nations? Nation { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 籍贯
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="Sys_UserProfile.NationArea" />
|
||||
public new CreateDicContentReq NationArea { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_UserProfile.PoliticalStatus" />
|
||||
|
@ -25,9 +25,7 @@ public sealed record QueryUserProfileRsp : Sys_UserProfile
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public override string CompanyAddress { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 工作地区
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="Sys_UserProfile.CompanyArea" />
|
||||
public new QueryDicContentRsp CompanyArea { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_UserProfile.CompanyName" />
|
||||
@ -46,9 +44,7 @@ public sealed record QueryUserProfileRsp : Sys_UserProfile
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public override string EmergencyContactAddress { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 紧急联系地区
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="Sys_UserProfile.EmergencyContactArea" />
|
||||
public new QueryDicContentRsp EmergencyContactArea { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_UserProfile.EmergencyContactMobile" />
|
||||
@ -71,9 +67,7 @@ public sealed record QueryUserProfileRsp : Sys_UserProfile
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public override string HomeAddress { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 住宅地区
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="Sys_UserProfile.HomeArea" />
|
||||
public new QueryDicContentRsp HomeArea { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_UserProfile.HomeTelephone" />
|
||||
@ -92,9 +86,7 @@ public sealed record QueryUserProfileRsp : Sys_UserProfile
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public override Nations? Nation { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 籍贯
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="Sys_UserProfile.NationArea" />
|
||||
public new QueryDicContentRsp NationArea { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_UserProfile.PoliticalStatus" />
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user