mirror of
https://github.com/nsnail/NetAdmin.git
synced 2025-04-22 22:22:51 +08:00
style: 💄 代码格式整理 (#105)
This commit is contained in:
parent
6bd6e62fb6
commit
f005da8db3
@ -1,8 +1,8 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Net.Http.Json;
|
||||
using Microsoft.AspNetCore.Mvc.Testing;
|
||||
using NetAdmin.Application.Modules;
|
||||
using NetAdmin.AdmServer.Host;
|
||||
using NetAdmin.Application.Modules;
|
||||
using NetAdmin.Domain.Dto.Dependency;
|
||||
using NetAdmin.Domain.Dto.Sys.Api;
|
||||
using NetAdmin.Domain.Dto.Sys.Cache;
|
||||
@ -81,8 +81,8 @@ public class AllTests(WebApplicationFactory<Startup> factory, ITestOutputHelper
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
[Theory]
|
||||
[InlineData(default)]
|
||||
[Theory]
|
||||
public async Task<PagedQueryRsp<GetAllEntriesRsp>> GetAllEntriesAsync(PagedQueryReq<GetAllEntriesReq> req)
|
||||
{
|
||||
var rsp = await PostAsync("/api/sys/cache/get.all.entries"
|
||||
|
@ -7,8 +7,8 @@ namespace NetAdmin.Domain.DbMaps.Dependency;
|
||||
public abstract record ImmutableEntity : ImmutableEntity<long>
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
[Snowflake]
|
||||
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
|
||||
[Snowflake]
|
||||
public override long Id { get; init; }
|
||||
}
|
||||
|
||||
@ -19,13 +19,13 @@ public abstract record ImmutableEntity : ImmutableEntity<long>
|
||||
public abstract record ImmutableEntity<T> : LiteImmutableEntity<T>, IFieldCreatedUser
|
||||
{
|
||||
/// <inheritdoc cref="IFieldCreatedUser.CreatedUserId" />
|
||||
[JsonIgnore]
|
||||
[Column(CanUpdate = false, Position = -1)]
|
||||
[JsonIgnore]
|
||||
public long? CreatedUserId { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldCreatedUser.CreatedUserName" />
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_31, CanUpdate = false, Position = -1)]
|
||||
[JsonIgnore]
|
||||
public virtual string CreatedUserName { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
|
@ -7,8 +7,8 @@ namespace NetAdmin.Domain.DbMaps.Dependency;
|
||||
public abstract record LiteImmutableEntity : LiteImmutableEntity<long>
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
[Snowflake]
|
||||
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
|
||||
[Snowflake]
|
||||
public override long Id { get; init; }
|
||||
}
|
||||
|
||||
@ -19,12 +19,12 @@ public abstract record LiteImmutableEntity : LiteImmutableEntity<long>
|
||||
public abstract record LiteImmutableEntity<T> : EntityBase, IFieldPrimary<T>, IFieldCreatedTime
|
||||
{
|
||||
/// <inheritdoc cref="IFieldCreatedTime.CreatedTime" />
|
||||
[JsonIgnore]
|
||||
[Column(ServerTime = DateTimeKind.Utc, CanUpdate = false, Position = -1)]
|
||||
[JsonIgnore]
|
||||
public virtual DateTime CreatedTime { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
[JsonIgnore]
|
||||
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
|
||||
[JsonIgnore]
|
||||
public virtual T Id { get; init; }
|
||||
}
|
@ -7,8 +7,8 @@ namespace NetAdmin.Domain.DbMaps.Dependency;
|
||||
public abstract record LiteMutableEntity : LiteMutableEntity<long>
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
[Snowflake]
|
||||
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
|
||||
[Snowflake]
|
||||
public override long Id { get; init; }
|
||||
}
|
||||
|
||||
@ -22,7 +22,7 @@ public abstract record LiteMutableEntity<T> : LiteImmutableEntity<T>, IFieldModi
|
||||
public override T Id { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldModifiedTime.ModifiedTime" />
|
||||
[JsonIgnore]
|
||||
[Column(ServerTime = DateTimeKind.Utc, CanInsert = false, Position = -1)]
|
||||
[JsonIgnore]
|
||||
public virtual DateTime? ModifiedTime { get; init; }
|
||||
}
|
@ -7,8 +7,8 @@ namespace NetAdmin.Domain.DbMaps.Dependency;
|
||||
public abstract record LiteVersionEntity : LiteVersionEntity<long>
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
[Snowflake]
|
||||
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
|
||||
[Snowflake]
|
||||
public override long Id { get; init; }
|
||||
}
|
||||
|
||||
@ -22,7 +22,7 @@ public abstract record LiteVersionEntity<T> : LiteMutableEntity<T>, IFieldVersio
|
||||
public override T Id { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldVersion.Version" />
|
||||
[JsonIgnore]
|
||||
[Column(IsVersion = true, Position = -1)]
|
||||
[JsonIgnore]
|
||||
public virtual long Version { get; init; }
|
||||
}
|
@ -7,8 +7,8 @@ namespace NetAdmin.Domain.DbMaps.Dependency;
|
||||
public abstract record MutableEntity : MutableEntity<long>
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
[Snowflake]
|
||||
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
|
||||
[Snowflake]
|
||||
public override long Id { get; init; }
|
||||
}
|
||||
|
||||
@ -22,12 +22,12 @@ public abstract record MutableEntity<T> : LiteMutableEntity<T>, IFieldModifiedUs
|
||||
public override T Id { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldModifiedUser.ModifiedUserId" />
|
||||
[JsonIgnore]
|
||||
[Column(CanInsert = false, Position = -1)]
|
||||
[JsonIgnore]
|
||||
public long? ModifiedUserId { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldModifiedUser.ModifiedUserName" />
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_31, CanInsert = false, Position = -1)]
|
||||
[JsonIgnore]
|
||||
public string ModifiedUserName { get; init; }
|
||||
}
|
@ -7,8 +7,8 @@ namespace NetAdmin.Domain.DbMaps.Dependency;
|
||||
public abstract record VersionEntity : VersionEntity<long>
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
[Snowflake]
|
||||
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
|
||||
[Snowflake]
|
||||
public override long Id { get; init; }
|
||||
}
|
||||
|
||||
@ -18,13 +18,13 @@ public abstract record VersionEntity : VersionEntity<long>
|
||||
public abstract record VersionEntity<T> : LiteVersionEntity<T>, IFieldModifiedUser, IFieldCreatedUser
|
||||
{
|
||||
/// <inheritdoc />
|
||||
[JsonIgnore]
|
||||
[Column(CanUpdate = false, Position = -1)]
|
||||
[JsonIgnore]
|
||||
public virtual long? CreatedUserId { get; init; }
|
||||
|
||||
/// <inheritdoc />
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_31, CanUpdate = false, Position = -1)]
|
||||
[JsonIgnore]
|
||||
public virtual string CreatedUserName { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
@ -32,12 +32,12 @@ public abstract record VersionEntity<T> : LiteVersionEntity<T>, IFieldModifiedUs
|
||||
public override T Id { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldModifiedUser.ModifiedUserId" />
|
||||
[JsonIgnore]
|
||||
[Column(CanInsert = false, Position = -1)]
|
||||
[JsonIgnore]
|
||||
public virtual long? ModifiedUserId { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldModifiedUser.ModifiedUserName" />
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_31, CanInsert = false, Position = -1)]
|
||||
[JsonIgnore]
|
||||
public virtual string ModifiedUserName { get; init; }
|
||||
}
|
@ -17,29 +17,29 @@ public record Sys_Api : ImmutableEntity<string>, IFieldSummary
|
||||
public IEnumerable<Sys_Api> Children { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_127, IsIdentity = false, IsPrimary = true, Position = 1)]
|
||||
[JsonIgnore]
|
||||
public override string Id { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 请求方式
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_15)]
|
||||
[JsonIgnore]
|
||||
public virtual string Method { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 服务名称
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_63)]
|
||||
[JsonIgnore]
|
||||
public virtual string Name { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 命名空间
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_31)]
|
||||
[JsonIgnore]
|
||||
#pragma warning disable CA1716
|
||||
public virtual string Namespace { get; init; }
|
||||
#pragma warning restore CA1716
|
||||
@ -47,8 +47,8 @@ public record Sys_Api : ImmutableEntity<string>, IFieldSummary
|
||||
/// <summary>
|
||||
/// 父编号
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_127)]
|
||||
[JsonIgnore]
|
||||
public virtual string ParentId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
@ -61,7 +61,7 @@ public record Sys_Api : ImmutableEntity<string>, IFieldSummary
|
||||
/// <summary>
|
||||
/// 服务描述
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_63)]
|
||||
[JsonIgnore]
|
||||
public virtual string Summary { get; init; }
|
||||
}
|
@ -12,15 +12,15 @@ public record Sys_Config : VersionEntity, IFieldEnabled
|
||||
/// <summary>
|
||||
/// 是否启用
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public virtual bool Enabled { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 用户注册是否需要人工确认
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public virtual bool UserRegisterConfirm { get; init; }
|
||||
|
||||
/// <summary>
|
||||
@ -33,8 +33,8 @@ public record Sys_Config : VersionEntity, IFieldEnabled
|
||||
/// <summary>
|
||||
/// 用户注册默认部门编号
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public virtual long UserRegisterDeptId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
@ -47,7 +47,7 @@ public record Sys_Config : VersionEntity, IFieldEnabled
|
||||
/// <summary>
|
||||
/// 用户注册默认角色编号
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public virtual long UserRegisterRoleId { get; init; }
|
||||
}
|
@ -19,22 +19,22 @@ public record Sys_Dept : VersionEntity, IFieldEnabled, IFieldSummary, IFieldSort
|
||||
/// <summary>
|
||||
/// 是否启用
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public virtual bool Enabled { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 部门名称
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_31)]
|
||||
[JsonIgnore]
|
||||
public virtual string Name { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 父编号
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public virtual long ParentId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
@ -54,14 +54,14 @@ public record Sys_Dept : VersionEntity, IFieldEnabled, IFieldSummary, IFieldSort
|
||||
/// <summary>
|
||||
/// 排序值,越大越前
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public virtual long Sort { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 部门描述
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||
[JsonIgnore]
|
||||
public virtual string Summary { get; init; }
|
||||
}
|
@ -5,8 +5,8 @@ namespace NetAdmin.Domain.DbMaps.Sys;
|
||||
/// <summary>
|
||||
/// 字典目录表
|
||||
/// </summary>
|
||||
[Table(Name = Chars.FLG_DB_TABLE_NAME_PREFIX + nameof(Sys_DicCatalog))]
|
||||
[Index($"idx_{{tablename}}_{nameof(Code)}", nameof(Code), true)]
|
||||
[Table(Name = Chars.FLG_DB_TABLE_NAME_PREFIX + nameof(Sys_DicCatalog))]
|
||||
public record Sys_DicCatalog : VersionEntity
|
||||
{
|
||||
/// <summary>
|
||||
@ -19,8 +19,8 @@ public record Sys_DicCatalog : VersionEntity
|
||||
/// <summary>
|
||||
/// 字典编码
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_31)]
|
||||
[JsonIgnore]
|
||||
public virtual string Code { get; init; }
|
||||
|
||||
/// <summary>
|
||||
@ -33,14 +33,14 @@ public record Sys_DicCatalog : VersionEntity
|
||||
/// <summary>
|
||||
/// 字典名称
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_31)]
|
||||
[JsonIgnore]
|
||||
public virtual string Name { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 父编号
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public virtual long ParentId { get; init; }
|
||||
}
|
@ -5,9 +5,9 @@ namespace NetAdmin.Domain.DbMaps.Sys;
|
||||
/// <summary>
|
||||
/// 字典内容表
|
||||
/// </summary>
|
||||
[Table(Name = Chars.FLG_DB_TABLE_NAME_PREFIX + nameof(Sys_DicContent))]
|
||||
[Index($"idx_{{tablename}}_{nameof(CatalogId)}_{nameof(Key)}", $"{nameof(CatalogId)},{nameof(Key)}", true)]
|
||||
[Index($"idx_{{tablename}}_{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>
|
||||
@ -20,21 +20,21 @@ public record Sys_DicContent : VersionEntity
|
||||
/// <summary>
|
||||
/// 字典目录编号
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public virtual long CatalogId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 键名称
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_63)]
|
||||
[JsonIgnore]
|
||||
public virtual string Key { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 键值
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||
[JsonIgnore]
|
||||
public virtual string Value { get; init; }
|
||||
}
|
@ -12,103 +12,103 @@ namespace NetAdmin.Domain.DbMaps.Sys;
|
||||
public record Sys_Job : VersionEntity, IFieldEnabled, IFieldSummary
|
||||
{
|
||||
/// <inheritdoc cref="IFieldEnabled.Enabled" />
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public virtual bool Enabled { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 执行时间计划
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_31)]
|
||||
[JsonIgnore]
|
||||
public virtual string ExecutionCron { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 请求方法
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public virtual HttpMethods HttpMethod { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 作业名称
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_63)]
|
||||
[JsonIgnore]
|
||||
public virtual string JobName { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 上次执行时间
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public virtual DateTime? LastExecTime { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 上次执行状态
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public virtual HttpStatusCode? LastStatusCode { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 下次执行时间
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public virtual DateTime? NextExecTime { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 下次执行时间编号
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public virtual long? NextTimeId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 请求体
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||
[JsonIgnore]
|
||||
public virtual string RequestBody { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 请求头
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||
[JsonIgnore]
|
||||
public virtual string RequestHeader { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 请求的网络地址
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||
[JsonIgnore]
|
||||
public virtual string RequestUrl { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 作业状态
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public virtual JobStatues Status { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldSummary.Summary" />
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||
[JsonIgnore]
|
||||
public virtual string Summary { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 执行用户
|
||||
/// </summary>
|
||||
[Navigate(nameof(UserId))]
|
||||
[JsonIgnore]
|
||||
[Navigate(nameof(UserId))]
|
||||
public Sys_User User { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 执行用户编号
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public virtual long UserId { get; init; }
|
||||
}
|
@ -6,8 +6,8 @@ namespace NetAdmin.Domain.DbMaps.Sys;
|
||||
/// <summary>
|
||||
/// 计划作业执行记录表
|
||||
/// </summary>
|
||||
[Table(Name = Chars.FLG_DB_TABLE_NAME_PREFIX + nameof(Sys_JobRecord))]
|
||||
[Index($"idx_{{tablename}}_{nameof(JobId)}_{nameof(TimeId)}", $"{nameof(JobId)},{nameof(TimeId)}", true)]
|
||||
[Table(Name = Chars.FLG_DB_TABLE_NAME_PREFIX + nameof(Sys_JobRecord))]
|
||||
public record Sys_JobRecord : LiteImmutableEntity
|
||||
{
|
||||
/// <summary>
|
||||
@ -20,8 +20,8 @@ public record Sys_JobRecord : LiteImmutableEntity
|
||||
/// <summary>
|
||||
/// 请求方法
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public virtual HttpMethods HttpMethod { get; init; }
|
||||
|
||||
/// <summary>
|
||||
@ -34,8 +34,8 @@ public record Sys_JobRecord : LiteImmutableEntity
|
||||
/// <summary>
|
||||
/// 拥有者信息
|
||||
/// </summary>
|
||||
[Navigate(nameof(JobId))]
|
||||
[JsonIgnore]
|
||||
[Navigate(nameof(JobId))]
|
||||
public Sys_Job Job { get; init; }
|
||||
|
||||
/// <summary>
|
||||
|
@ -7,15 +7,15 @@ namespace NetAdmin.Domain.DbMaps.Sys;
|
||||
/// <summary>
|
||||
/// 菜单表
|
||||
/// </summary>
|
||||
[Table(Name = Chars.FLG_DB_TABLE_NAME_PREFIX + nameof(Sys_Menu))]
|
||||
[Index($"idx_{{tablename}}_{nameof(Name)}", nameof(Name), true)]
|
||||
[Table(Name = Chars.FLG_DB_TABLE_NAME_PREFIX + nameof(Sys_Menu))]
|
||||
public record Sys_Menu : VersionEntity, IFieldSort
|
||||
{
|
||||
/// <summary>
|
||||
/// 子节点或详情页需要高亮的上级菜单路由地址
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_127)]
|
||||
[JsonIgnore]
|
||||
public virtual string Active { get; init; }
|
||||
|
||||
/// <summary>
|
||||
@ -28,71 +28,71 @@ public record Sys_Menu : VersionEntity, IFieldSort
|
||||
/// <summary>
|
||||
/// 背景颜色
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_7)]
|
||||
[JsonIgnore]
|
||||
public virtual string Color { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 组件
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_63)]
|
||||
[JsonIgnore]
|
||||
public virtual string Component { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否整页路由
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public virtual bool FullPageRouting { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否隐藏菜单
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public virtual bool Hidden { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否隐藏面包屑
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public virtual bool HiddenBreadCrumb { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 图标
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_31)]
|
||||
[JsonIgnore]
|
||||
public virtual string Icon { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 菜单名称
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_63)]
|
||||
[JsonIgnore]
|
||||
public virtual string Name { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 父编号
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public virtual long ParentId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 菜单路径
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_127)]
|
||||
[JsonIgnore]
|
||||
public virtual string Path { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 重定向地址
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_127)]
|
||||
[JsonIgnore]
|
||||
public virtual string Redirect { get; init; }
|
||||
|
||||
/// <summary>
|
||||
@ -105,28 +105,28 @@ public record Sys_Menu : VersionEntity, IFieldSort
|
||||
/// <summary>
|
||||
/// 排序值,越大越前
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public virtual long Sort { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 标签
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_31)]
|
||||
[JsonIgnore]
|
||||
public virtual string Tag { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 菜单标题
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_63)]
|
||||
[JsonIgnore]
|
||||
public virtual string Title { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 菜单类型
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public virtual MenuTypes Type { get; init; }
|
||||
}
|
@ -6,9 +6,9 @@ namespace NetAdmin.Domain.DbMaps.Sys;
|
||||
/// <summary>
|
||||
/// 请求日志表
|
||||
/// </summary>
|
||||
[Table(Name = Chars.FLG_DB_TABLE_NAME_PREFIX + nameof(Sys_RequestLog))]
|
||||
[Index($"idx_{{tablename}}_{nameof(ApiId)}", nameof(ApiId), false)]
|
||||
[Index($"idx_{{tablename}}_{nameof(CreatedTime)}", nameof(CreatedTime), false)]
|
||||
[Table(Name = Chars.FLG_DB_TABLE_NAME_PREFIX + nameof(Sys_RequestLog))]
|
||||
public record Sys_RequestLog : ImmutableEntity, IFieldCreatedClient
|
||||
{
|
||||
/// <summary>
|
||||
|
@ -8,8 +8,8 @@ namespace NetAdmin.Domain.DbMaps.Sys;
|
||||
/// <summary>
|
||||
/// 角色表
|
||||
/// </summary>
|
||||
[Table(Name = Chars.FLG_DB_TABLE_NAME_PREFIX + nameof(Sys_Role))]
|
||||
[Index("idx_{tablename}_01", nameof(Name), true)]
|
||||
[Table(Name = Chars.FLG_DB_TABLE_NAME_PREFIX + nameof(Sys_Role))]
|
||||
public record Sys_Role : VersionEntity, IFieldSort, IFieldEnabled, IFieldSummary, IRegister
|
||||
{
|
||||
/// <summary>
|
||||
@ -22,8 +22,8 @@ public record Sys_Role : VersionEntity, IFieldSort, IFieldEnabled, IFieldSummary
|
||||
/// <summary>
|
||||
/// 数据范围
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public virtual DataScopes DataScope { get; init; }
|
||||
|
||||
/// <summary>
|
||||
@ -36,22 +36,22 @@ public record Sys_Role : VersionEntity, IFieldSort, IFieldEnabled, IFieldSummary
|
||||
/// <summary>
|
||||
/// 是否显示仪表板
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public virtual bool DisplayDashboard { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否启用
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public virtual bool Enabled { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否忽略权限控制
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public virtual bool IgnorePermissionControl { get; init; }
|
||||
|
||||
/// <summary>
|
||||
@ -64,8 +64,8 @@ public record Sys_Role : VersionEntity, IFieldSort, IFieldEnabled, IFieldSummary
|
||||
/// <summary>
|
||||
/// 角色名称
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_31)]
|
||||
[JsonIgnore]
|
||||
public virtual string Name { get; init; }
|
||||
|
||||
/// <summary>
|
||||
@ -78,15 +78,15 @@ public record Sys_Role : VersionEntity, IFieldSort, IFieldEnabled, IFieldSummary
|
||||
/// <summary>
|
||||
/// 排序值,越大越前
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public virtual long Sort { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||
[JsonIgnore]
|
||||
public virtual string Summary { get; init; }
|
||||
|
||||
/// <summary>
|
||||
|
@ -17,8 +17,8 @@ public record Sys_RoleApi : ImmutableEntity
|
||||
/// <summary>
|
||||
/// 接口编号
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_127)]
|
||||
[JsonIgnore]
|
||||
public string ApiId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
@ -30,7 +30,7 @@ public record Sys_RoleApi : ImmutableEntity
|
||||
/// <summary>
|
||||
/// 角色编号
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public long RoleId { get; init; }
|
||||
}
|
@ -5,8 +5,8 @@ namespace NetAdmin.Domain.DbMaps.Sys;
|
||||
/// <summary>
|
||||
/// 角色-部门映射表
|
||||
/// </summary>
|
||||
[Table(Name = Chars.FLG_DB_TABLE_NAME_PREFIX + nameof(Sys_RoleDept))]
|
||||
[Index($"idx_{{tablename}}_{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>
|
||||
@ -18,8 +18,8 @@ public record Sys_RoleDept : ImmutableEntity
|
||||
/// <summary>
|
||||
/// 可访问的部门编号
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public long DeptId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
@ -31,7 +31,7 @@ public record Sys_RoleDept : ImmutableEntity
|
||||
/// <summary>
|
||||
/// 角色编号
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public long RoleId { get; init; }
|
||||
}
|
@ -5,8 +5,8 @@ namespace NetAdmin.Domain.DbMaps.Sys;
|
||||
/// <summary>
|
||||
/// 角色-菜单映射表
|
||||
/// </summary>
|
||||
[Table(Name = Chars.FLG_DB_TABLE_NAME_PREFIX + nameof(Sys_RoleMenu))]
|
||||
[Index($"idx_{{tablename}}_{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>
|
||||
@ -18,8 +18,8 @@ public record Sys_RoleMenu : ImmutableEntity
|
||||
/// <summary>
|
||||
/// 菜单编号
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public virtual long MenuId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
@ -31,7 +31,7 @@ public record Sys_RoleMenu : ImmutableEntity
|
||||
/// <summary>
|
||||
/// 角色编号
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public virtual long RoleId { get; init; }
|
||||
}
|
@ -14,8 +14,8 @@ public record Sys_SiteMsg : VersionEntity, IRegister, IFieldSummary
|
||||
/// <summary>
|
||||
/// 消息内容
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||
[JsonIgnore]
|
||||
public virtual string Content { get; init; }
|
||||
|
||||
/// <summary>
|
||||
@ -55,15 +55,15 @@ public record Sys_SiteMsg : VersionEntity, IRegister, IFieldSummary
|
||||
/// <summary>
|
||||
/// 消息摘要
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||
[JsonIgnore]
|
||||
public virtual string Summary { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 消息主题
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||
[JsonIgnore]
|
||||
public virtual string Title { get; init; }
|
||||
|
||||
/// <summary>
|
||||
|
@ -5,8 +5,8 @@ namespace NetAdmin.Domain.DbMaps.Sys;
|
||||
/// <summary>
|
||||
/// 站内信-部门映射表
|
||||
/// </summary>
|
||||
[Table(Name = Chars.FLG_DB_TABLE_NAME_PREFIX + nameof(Sys_SiteMsgDept))]
|
||||
[Index($"idx_{{tablename}}_{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>
|
||||
@ -18,8 +18,8 @@ public record Sys_SiteMsgDept : ImmutableEntity
|
||||
/// <summary>
|
||||
/// 部门编号
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public long DeptId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
@ -31,7 +31,7 @@ public record Sys_SiteMsgDept : ImmutableEntity
|
||||
/// <summary>
|
||||
/// 站内信编号
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public long SiteMsgId { get; init; }
|
||||
}
|
@ -6,25 +6,28 @@ namespace NetAdmin.Domain.DbMaps.Sys;
|
||||
/// <summary>
|
||||
/// 站内信标记表
|
||||
/// </summary>
|
||||
[Table(Name = Chars.FLG_DB_TABLE_NAME_PREFIX + nameof(Sys_SiteMsgFlag))]
|
||||
[Index($"idx_{{tablename}}_{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
|
||||
{
|
||||
/// <summary>
|
||||
/// 站内信编号
|
||||
/// </summary>
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public virtual long SiteMsgId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 用户编号
|
||||
/// </summary>
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public long UserId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 用户站内信状态
|
||||
/// </summary>
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public virtual UserSiteMsgStatues UserSiteMsgStatus { get; init; }
|
||||
}
|
@ -5,8 +5,8 @@ namespace NetAdmin.Domain.DbMaps.Sys;
|
||||
/// <summary>
|
||||
/// 站内信-角色映射表
|
||||
/// </summary>
|
||||
[Table(Name = Chars.FLG_DB_TABLE_NAME_PREFIX + nameof(Sys_SiteMsgRole))]
|
||||
[Index($"idx_{{tablename}}_{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>
|
||||
@ -18,8 +18,8 @@ public record Sys_SiteMsgRole : ImmutableEntity
|
||||
/// <summary>
|
||||
/// 角色编号
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public long RoleId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
@ -31,7 +31,7 @@ public record Sys_SiteMsgRole : ImmutableEntity
|
||||
/// <summary>
|
||||
/// 站内信编号
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public long SiteMsgId { get; init; }
|
||||
}
|
@ -5,8 +5,8 @@ namespace NetAdmin.Domain.DbMaps.Sys;
|
||||
/// <summary>
|
||||
/// 站内信-用户映射表
|
||||
/// </summary>
|
||||
[Table(Name = Chars.FLG_DB_TABLE_NAME_PREFIX + nameof(Sys_SiteMsgUser))]
|
||||
[Index($"idx_{{tablename}}_{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>
|
||||
@ -18,8 +18,8 @@ public record Sys_SiteMsgUser : ImmutableEntity
|
||||
/// <summary>
|
||||
/// 站内信编号
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public long SiteMsgId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
@ -31,7 +31,7 @@ public record Sys_SiteMsgUser : ImmutableEntity
|
||||
/// <summary>
|
||||
/// 用户编号
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public long UserId { get; init; }
|
||||
}
|
@ -7,17 +7,17 @@ namespace NetAdmin.Domain.DbMaps.Sys;
|
||||
/// <summary>
|
||||
/// 用户基本信息表
|
||||
/// </summary>
|
||||
[Table(Name = Chars.FLG_DB_TABLE_NAME_PREFIX + nameof(Sys_User))]
|
||||
[Index($"idx_{{tablename}}_{nameof(UserName)}", nameof(UserName), true)]
|
||||
[Index($"idx_{{tablename}}_{nameof(Mobile)}", nameof(Mobile), true)]
|
||||
[Index($"idx_{{tablename}}_{nameof(Email)}", nameof(Email), true)]
|
||||
[Index($"idx_{{tablename}}_{nameof(Mobile)}", nameof(Mobile), true)]
|
||||
[Index($"idx_{{tablename}}_{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>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_127)]
|
||||
[JsonIgnore]
|
||||
public virtual string Avatar { get; init; }
|
||||
|
||||
/// <summary>
|
||||
@ -30,36 +30,36 @@ public record Sys_User : VersionEntity, IFieldSummary, IFieldEnabled, IRegister
|
||||
/// <summary>
|
||||
/// 部门编号
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public virtual long DeptId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 邮箱
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_63)]
|
||||
[JsonIgnore]
|
||||
public virtual string Email { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否启用
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public virtual bool Enabled { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 手机号
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_15)]
|
||||
[JsonIgnore]
|
||||
public virtual string Mobile { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 密码
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public Guid Password { get; init; }
|
||||
|
||||
/// <summary>
|
||||
@ -85,22 +85,22 @@ public record Sys_User : VersionEntity, IFieldSummary, IFieldEnabled, IRegister
|
||||
/// <summary>
|
||||
/// 描述
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||
[JsonIgnore]
|
||||
public virtual string Summary { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 授权验证Token,全局唯一,可以随时重置(强制下线)
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public Guid Token { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 用户名
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_31)]
|
||||
[JsonIgnore]
|
||||
public virtual string UserName { get; init; }
|
||||
|
||||
/// <inheritdoc />
|
||||
|
@ -12,170 +12,170 @@ public record Sys_UserProfile : VersionEntity, IRegister
|
||||
/// <summary>
|
||||
/// 出生日期
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public virtual DateTime? BornDate { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 证件号码
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_63)]
|
||||
[JsonIgnore]
|
||||
public virtual string CertificateNumber { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 证件类型
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public virtual CertificateTypes? CertificateType { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 工作地址
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_127)]
|
||||
[JsonIgnore]
|
||||
public virtual string CompanyAddress { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 工作地区
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public int? CompanyArea { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 工作单位
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_31)]
|
||||
[JsonIgnore]
|
||||
public virtual string CompanyName { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 工作电话
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_31)]
|
||||
[JsonIgnore]
|
||||
public virtual string CompanyTelephone { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 文化程度
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public virtual Educations? Education { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 紧急联系地址
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_127)]
|
||||
[JsonIgnore]
|
||||
public virtual string EmergencyContactAddress { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 紧急联系地区
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public int? EmergencyContactArea { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 紧急联系人手机号
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_15)]
|
||||
[JsonIgnore]
|
||||
public virtual string EmergencyContactMobile { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 紧急联系人
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_31)]
|
||||
[JsonIgnore]
|
||||
public virtual string EmergencyContactName { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 毕业学校
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_31)]
|
||||
[JsonIgnore]
|
||||
public virtual string GraduateSchool { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 身高
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public virtual int? Height { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 住宅地址
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_127)]
|
||||
[JsonIgnore]
|
||||
public virtual string HomeAddress { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 住宅地区
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public int? HomeArea { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 住宅电话
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_31)]
|
||||
[JsonIgnore]
|
||||
public virtual string HomeTelephone { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 婚姻状况
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public virtual MarriageStatues? MarriageStatus { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 民族
|
||||
/// </summary>
|
||||
/// 7
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public virtual Nations? Nation { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 籍贯
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public int? NationArea { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 政治面貌
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public virtual PoliticalStatues? PoliticalStatus { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 职业
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_31)]
|
||||
[JsonIgnore]
|
||||
public virtual string Profession { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 真实姓名
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_31)]
|
||||
[JsonIgnore]
|
||||
public virtual string RealName { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 性别
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public virtual Sexes? Sex { get; init; }
|
||||
|
||||
/// <summary>
|
||||
|
@ -17,8 +17,8 @@ public record Sys_UserRole : VersionEntity
|
||||
/// <summary>
|
||||
/// 角色编号
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public long RoleId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
@ -30,7 +30,7 @@ public record Sys_UserRole : VersionEntity
|
||||
/// <summary>
|
||||
/// 用户编号
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public long UserId { get; init; }
|
||||
}
|
@ -12,42 +12,42 @@ public record Sys_VerifyCode : VersionEntity
|
||||
/// <summary>
|
||||
/// 验证码
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_7)]
|
||||
[JsonIgnore]
|
||||
public virtual string Code { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 目标设备
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_63)]
|
||||
[JsonIgnore]
|
||||
public virtual string DestDevice { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备类型
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public virtual VerifyCodeDeviceTypes DeviceType { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 发送报告
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||
[JsonIgnore]
|
||||
public string Report { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 验证码状态
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public virtual VerifyCodeStatues Status { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 验证码类型
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public virtual VerifyCodeTypes Type { get; init; }
|
||||
}
|
@ -9,8 +9,8 @@ public sealed record BulkReq<T> : DataAbstraction
|
||||
/// <summary>
|
||||
/// 请求对象
|
||||
/// </summary>
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.请求对象不能为空))]
|
||||
[MinLength(1)]
|
||||
[MaxLength(Numbers.MAX_LIMIT_BULK_REQ)]
|
||||
[MinLength(1)]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.请求对象不能为空))]
|
||||
public IEnumerable<T> Items { get; init; }
|
||||
}
|
@ -16,15 +16,15 @@ public record CreateJobReq : Sys_Job
|
||||
public override bool Enabled { get; init; } = true;
|
||||
|
||||
/// <inheritdoc cref="Sys_Job.ExecutionCron" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
[Cron]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.时间计划不能为空))]
|
||||
public override string ExecutionCron { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_Job.HttpMethod" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
[EnumDataType(typeof(HttpMethods), ErrorMessageResourceType = typeof(Ln)
|
||||
, ErrorMessageResourceName = nameof(Ln.请求方法不正确))]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override HttpMethods HttpMethod { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_Job.JobName" />
|
||||
|
@ -16,21 +16,21 @@ public record CreateSiteMsgReq : Sys_SiteMsg
|
||||
/// <summary>
|
||||
/// 部门编号列表
|
||||
/// </summary>
|
||||
[MinLength(1)]
|
||||
[MaxLength(Numbers.MAX_LIMIT_BULK_REQ)]
|
||||
[MinLength(1)]
|
||||
public IReadOnlyCollection<long> DeptIds { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_SiteMsg.MsgType" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
[EnumDataType(typeof(SiteMsgTypes), ErrorMessageResourceType = typeof(Ln)
|
||||
, ErrorMessageResourceName = nameof(Ln.站内信类型不正确))]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override SiteMsgTypes MsgType { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 角色编号列表
|
||||
/// </summary>
|
||||
[MinLength(1)]
|
||||
[MaxLength(Numbers.MAX_LIMIT_BULK_REQ)]
|
||||
[MinLength(1)]
|
||||
public IReadOnlyCollection<long> RoleIds { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_SiteMsg.Title" />
|
||||
@ -41,7 +41,7 @@ public record CreateSiteMsgReq : Sys_SiteMsg
|
||||
/// <summary>
|
||||
/// 用户编号列表
|
||||
/// </summary>
|
||||
[MinLength(1)]
|
||||
[MaxLength(Numbers.MAX_LIMIT_BULK_REQ)]
|
||||
[MinLength(1)]
|
||||
public IReadOnlyCollection<long> UserIds { get; init; }
|
||||
}
|
@ -13,8 +13,8 @@ public record CreateSiteMsgFlagReq : Sys_SiteMsgFlag
|
||||
public override long SiteMsgId { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_SiteMsgFlag.UserSiteMsgStatus" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
[EnumDataType(typeof(UserSiteMsgStatues), ErrorMessageResourceType = typeof(Ln)
|
||||
, ErrorMessageResourceName = nameof(Ln.站内信状态不正确))]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override UserSiteMsgStatues UserSiteMsgStatus { get; init; }
|
||||
}
|
@ -9,8 +9,8 @@ namespace NetAdmin.Domain.Dto.Sys.User;
|
||||
public sealed record CheckMobileAvailableReq : Sys_User
|
||||
{
|
||||
/// <inheritdoc cref="Sys_User.Mobile" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
[Mobile]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.手机号码不能为空))]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public override string Mobile { get; init; }
|
||||
}
|
@ -10,8 +10,8 @@ namespace NetAdmin.Domain.Dto.Sys.User;
|
||||
public abstract record CreateUpdateUserReq : Sys_User
|
||||
{
|
||||
/// <inheritdoc cref="Sys_User.Avatar" />
|
||||
[Url(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.网络地址不正确))]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
[Url(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.网络地址不正确))]
|
||||
public override string Avatar { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_User.DeptId" />
|
||||
@ -28,8 +28,8 @@ public abstract record CreateUpdateUserReq : Sys_User
|
||||
public override bool Enabled { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_User.Mobile" />
|
||||
[Mobile]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
[Mobile]
|
||||
public override string Mobile { get; init; }
|
||||
|
||||
/// <summary>
|
||||
@ -41,9 +41,9 @@ public abstract record CreateUpdateUserReq : Sys_User
|
||||
/// <summary>
|
||||
/// 角色编号列表
|
||||
/// </summary>
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.角色编号列表不能为空))]
|
||||
[MinLength(1)]
|
||||
[MaxLength(Numbers.MAX_LIMIT_BULK_REQ)]
|
||||
[MinLength(1)]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.角色编号列表不能为空))]
|
||||
public IReadOnlyCollection<long> RoleIds { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_User.Summary" />
|
||||
@ -51,8 +51,8 @@ public abstract record CreateUpdateUserReq : Sys_User
|
||||
public override string Summary { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_User.UserName" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.用户名不能为空))]
|
||||
[UserName]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public override string UserName { get; init; }
|
||||
}
|
@ -12,9 +12,9 @@ public sealed record RegisterUserReq : Sys_User
|
||||
/// <summary>
|
||||
/// 密码
|
||||
/// </summary>
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.密码不能为空))]
|
||||
[Password]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
[Password]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.密码不能为空))]
|
||||
public string PasswordText { get; init; }
|
||||
|
||||
/// <summary>
|
||||
@ -24,9 +24,9 @@ public sealed record RegisterUserReq : Sys_User
|
||||
public IReadOnlyCollection<long> RoleIds { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_User.UserName" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.用户名不能为空))]
|
||||
[UserName]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public override string UserName { get; init; }
|
||||
|
||||
/// <summary>
|
||||
|
@ -11,8 +11,8 @@ public sealed record ResetPasswordReq : DataAbstraction
|
||||
/// <summary>
|
||||
/// 密码
|
||||
/// </summary>
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.密码不能为空))]
|
||||
[Password]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.密码不能为空))]
|
||||
public string PasswordText { get; init; }
|
||||
|
||||
/// <summary>
|
||||
|
@ -8,8 +8,8 @@ namespace NetAdmin.Domain.Dto.Sys.User;
|
||||
public sealed record SetAvatarReq : Sys_User
|
||||
{
|
||||
/// <inheritdoc cref="Sys_User.Avatar" />
|
||||
[Url(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.网络地址不正确))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.用户头像不能为空))]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.用户头像不能为空))]
|
||||
[Url(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.网络地址不正确))]
|
||||
public override string Avatar { get; init; }
|
||||
}
|
@ -10,14 +10,14 @@ public sealed record SetPasswordReq : DataAbstraction
|
||||
/// <summary>
|
||||
/// 新密码
|
||||
/// </summary>
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.新密码不能为空))]
|
||||
[Password]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.新密码不能为空))]
|
||||
public string NewPassword { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 旧密码
|
||||
/// </summary>
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.旧密码不能为空))]
|
||||
[Password]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.旧密码不能为空))]
|
||||
public string OldPassword { get; init; }
|
||||
}
|
@ -13,7 +13,7 @@ public sealed record SetUserEnabledReq : Sys_User
|
||||
public override bool Enabled { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.用户编号不能为空))]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.用户编号不能为空))]
|
||||
public override long Id { get; init; }
|
||||
}
|
@ -36,8 +36,8 @@ public record CreateUserProfileReq : Sys_UserProfile
|
||||
public override string CompanyName { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_UserProfile.CompanyTelephone" />
|
||||
[Telephone]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
[Telephone]
|
||||
public override string CompanyTelephone { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_UserProfile.Education" />
|
||||
@ -54,8 +54,8 @@ public record CreateUserProfileReq : Sys_UserProfile
|
||||
public new QueryDicContentRsp EmergencyContactArea { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_UserProfile.EmergencyContactMobile" />
|
||||
[Mobile]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
[Mobile]
|
||||
public override string EmergencyContactMobile { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_UserProfile.EmergencyContactName" />
|
||||
@ -79,8 +79,8 @@ public record CreateUserProfileReq : Sys_UserProfile
|
||||
public new QueryDicContentRsp HomeArea { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_UserProfile.HomeTelephone" />
|
||||
[Telephone]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
[Telephone]
|
||||
public override string HomeTelephone { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_UserProfile.MarriageStatus" />
|
||||
@ -98,9 +98,9 @@ public record CreateUserProfileReq : Sys_UserProfile
|
||||
public new CreateDicContentReq NationArea { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_UserProfile.PoliticalStatus" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
[EnumDataType(typeof(PoliticalStatues), ErrorMessageResourceType = typeof(Ln)
|
||||
, ErrorMessageResourceName = nameof(Ln.政治面貌不正确))]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override PoliticalStatues? PoliticalStatus { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_UserProfile.Profession" />
|
||||
|
@ -11,25 +11,25 @@ namespace NetAdmin.Domain.Dto.Sys.VerifyCode;
|
||||
public sealed record SendVerifyCodeReq : Sys_VerifyCode, IValidatableObject
|
||||
{
|
||||
/// <inheritdoc cref="Sys_VerifyCode.DestDevice" />
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.目标设备不能为空))]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.目标设备不能为空))]
|
||||
public override string DestDevice { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_VerifyCode.DeviceType" />
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.设备类型不能为空))]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
[EnumDataType(typeof(VerifyCodeDeviceTypes), ErrorMessageResourceType = typeof(Ln)
|
||||
, ErrorMessageResourceName = nameof(Ln.验证码目标设备类型不正确))]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.设备类型不能为空))]
|
||||
public override VerifyCodeDeviceTypes DeviceType { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_VerifyCode.Status" />
|
||||
public override VerifyCodeStatues Status => VerifyCodeStatues.Waiting;
|
||||
|
||||
/// <inheritdoc cref="Sys_VerifyCode.Type" />
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.验证码类型不能为空))]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
[EnumDataType(typeof(VerifyCodeTypes), ErrorMessageResourceType = typeof(Ln)
|
||||
, ErrorMessageResourceName = nameof(Ln.验证码类型不正确))]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.验证码类型不能为空))]
|
||||
public override VerifyCodeTypes Type { get; init; }
|
||||
|
||||
/// <summary>
|
||||
|
@ -9,8 +9,8 @@ namespace NetAdmin.Domain.Dto.Sys.VerifyCode;
|
||||
public abstract record VerifyCodeReq : Sys_VerifyCode
|
||||
{
|
||||
/// <inheritdoc cref="Sys_VerifyCode.Code" />
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.验证码不能为空))]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.验证码不能为空))]
|
||||
[VerifyCode]
|
||||
public override string Code { get; init; }
|
||||
|
||||
|
@ -6,6 +6,6 @@
|
||||
<ItemGroup>
|
||||
<PackageReference Include="IGeekFan.AspNetCore.Knife4jUI.NS" Condition="'$(Configuration)' == 'Debug'" Version="0.0.15-ns2"/>
|
||||
<PackageReference Include="Spectre.Console.Cli.NS" Version="0.45.1-preview.0.161"/>
|
||||
<PackageReference Include="prometheus-net.AspNetCore" Condition="'$(Configuration)' != 'Debug'" Version="8.1.0"/>
|
||||
<PackageReference Include="prometheus-net.AspNetCore" Condition="'$(Configuration)' != 'Debug'" Version="8.2.1"/>
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -8,8 +8,8 @@ public enum LogLevels
|
||||
/// <summary>
|
||||
/// 跟踪
|
||||
/// </summary>
|
||||
[ResourceDescription<Ln>(nameof(Ln.跟踪))]
|
||||
[Display(Name = "[gray]TCE[/]", ShortName = "TCE")]
|
||||
[ResourceDescription<Ln>(nameof(Ln.跟踪))]
|
||||
Trace = 0
|
||||
|
||||
,
|
||||
@ -17,8 +17,8 @@ public enum LogLevels
|
||||
/// <summary>
|
||||
/// 调试
|
||||
/// </summary>
|
||||
[ResourceDescription<Ln>(nameof(Ln.调试))]
|
||||
[Display(Name = "[gray]DBG[/]", ShortName = "DBG")]
|
||||
[ResourceDescription<Ln>(nameof(Ln.调试))]
|
||||
Debug = 1
|
||||
|
||||
,
|
||||
@ -26,8 +26,8 @@ public enum LogLevels
|
||||
/// <summary>
|
||||
/// 信息
|
||||
/// </summary>
|
||||
[ResourceDescription<Ln>(nameof(Ln.信息))]
|
||||
[Display(Name = "[green]INF[/]", ShortName = "INF")]
|
||||
[ResourceDescription<Ln>(nameof(Ln.信息))]
|
||||
Information = 2
|
||||
|
||||
,
|
||||
@ -35,8 +35,8 @@ public enum LogLevels
|
||||
/// <summary>
|
||||
/// 警告
|
||||
/// </summary>
|
||||
[ResourceDescription<Ln>(nameof(Ln.警告))]
|
||||
[Display(Name = "[yellow]WRN[/]", ShortName = "WRN")]
|
||||
[ResourceDescription<Ln>(nameof(Ln.警告))]
|
||||
Warning = 3
|
||||
|
||||
,
|
||||
@ -44,8 +44,8 @@ public enum LogLevels
|
||||
/// <summary>
|
||||
/// 错误
|
||||
/// </summary>
|
||||
[ResourceDescription<Ln>(nameof(Ln.错误))]
|
||||
[Display(Name = "[red]ERR[/]", ShortName = "ERR")]
|
||||
[ResourceDescription<Ln>(nameof(Ln.错误))]
|
||||
Error = 4
|
||||
|
||||
,
|
||||
@ -53,7 +53,7 @@ public enum LogLevels
|
||||
/// <summary>
|
||||
/// 宕机
|
||||
/// </summary>
|
||||
[ResourceDescription<Ln>(nameof(Ln.宕机))]
|
||||
[Display(Name = "[red]CTL[/]", ShortName = "CTL")]
|
||||
[ResourceDescription<Ln>(nameof(Ln.宕机))]
|
||||
Critical = 5
|
||||
}
|
@ -144,8 +144,8 @@ public sealed class JobController(IJobCache cache) : ControllerBase<IJobCache, I
|
||||
/// <summary>
|
||||
/// 更新计划作业
|
||||
/// </summary>
|
||||
[Transaction]
|
||||
[NonAction]
|
||||
[Transaction]
|
||||
public Task<QueryJobRsp> UpdateAsync(UpdateJobReq req)
|
||||
{
|
||||
return Cache.UpdateAsync(req);
|
||||
|
@ -138,8 +138,8 @@ public sealed class UserController(IUserCache cache, IConfigCache configCache)
|
||||
/// <summary>
|
||||
/// 注册用户
|
||||
/// </summary>
|
||||
[Transaction]
|
||||
[AllowAnonymous]
|
||||
[Transaction]
|
||||
public async Task<UserInfoRsp> RegisterAsync(RegisterUserReq req)
|
||||
{
|
||||
var config = await configCache.GetLatestConfigAsync().ConfigureAwait(false);
|
||||
|
@ -89,8 +89,8 @@ public sealed class VerifyCodeController(IVerifyCodeCache cache, ICaptchaCache c
|
||||
/// <summary>
|
||||
/// 发送验证码
|
||||
/// </summary>
|
||||
[Transaction]
|
||||
[AllowAnonymous]
|
||||
[Transaction]
|
||||
public async Task<SendVerifyCodeRsp> SendVerifyCodeAsync(SendVerifyCodeReq req)
|
||||
{
|
||||
await captchaCache.VerifyCaptchaAndRemoveAsync(req.VerifyCaptchaReq).ConfigureAwait(false);
|
||||
@ -109,8 +109,8 @@ public sealed class VerifyCodeController(IVerifyCodeCache cache, ICaptchaCache c
|
||||
/// <summary>
|
||||
/// 完成验证
|
||||
/// </summary>
|
||||
[Transaction]
|
||||
[AllowAnonymous]
|
||||
[Transaction]
|
||||
public Task<bool> VerifyAsync(VerifyCodeReq req)
|
||||
{
|
||||
return Cache.VerifyAsync(req);
|
||||
|
Loading…
x
Reference in New Issue
Block a user