mirror of
				https://github.com/nsnail/NetAdmin.git
				synced 2025-11-04 05:05:27 +08:00 
			
		
		
		
	style: 💄 代码整理 (#88)
This commit is contained in:
		@@ -10,7 +10,7 @@ public interface IService
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    ///     服务编号
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    Guid ServiceId { get; set; }
 | 
			
		||||
    Guid ServiceId { get; init; }
 | 
			
		||||
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    ///     上下文用户令牌
 | 
			
		||||
 
 | 
			
		||||
@@ -34,7 +34,7 @@ public abstract class ServiceBase : IScoped, IService
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /// <inheritdoc />
 | 
			
		||||
    public Guid ServiceId { get; set; }
 | 
			
		||||
    public Guid ServiceId { get; init; }
 | 
			
		||||
 | 
			
		||||
    /// <inheritdoc />
 | 
			
		||||
    public ContextUserToken UserToken { get; set; }
 | 
			
		||||
 
 | 
			
		||||
@@ -52,7 +52,7 @@ public abstract class DistributedCache<TService> : CacheBase<IDistributedCache,
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    ///     获取缓存键
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    protected virtual string GetCacheKey(string id = "0", [CallerMemberName] string memberName = null)
 | 
			
		||||
    protected string GetCacheKey(string id = "0", [CallerMemberName] string memberName = null)
 | 
			
		||||
    {
 | 
			
		||||
        return $"{GetType().FullName}.{memberName}.{id}";
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -13,5 +13,5 @@ public interface IFieldCreatedUser
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    ///     创建者用户名
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    string CreatedUserName { get; set; }
 | 
			
		||||
    string CreatedUserName { get; init; }
 | 
			
		||||
}
 | 
			
		||||
@@ -26,7 +26,7 @@ public abstract record ImmutableEntity<T> : LiteImmutableEntity<T>, IFieldCreate
 | 
			
		||||
    /// <inheritdoc cref="IFieldCreatedUser.CreatedUserName" />
 | 
			
		||||
    [JsonIgnore]
 | 
			
		||||
    [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_31, CanUpdate = false, Position = -1)]
 | 
			
		||||
    public virtual string CreatedUserName { get; set; }
 | 
			
		||||
    public virtual string CreatedUserName { get; init; }
 | 
			
		||||
 | 
			
		||||
    /// <inheritdoc cref="IFieldPrimary{T}.Id" />
 | 
			
		||||
    [Column(IsIdentity = false, IsPrimary = true, Position = 1)]
 | 
			
		||||
 
 | 
			
		||||
@@ -25,7 +25,7 @@ public abstract record VersionEntity<T> : LiteVersionEntity<T>, IFieldModifiedUs
 | 
			
		||||
    /// <inheritdoc />
 | 
			
		||||
    [JsonIgnore]
 | 
			
		||||
    [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_31, CanUpdate = false, Position = -1)]
 | 
			
		||||
    public string CreatedUserName { get; set; }
 | 
			
		||||
    public string CreatedUserName { get; init; }
 | 
			
		||||
 | 
			
		||||
    /// <inheritdoc cref="IFieldPrimary{T}.Id" />
 | 
			
		||||
    [Column(IsIdentity = false, IsPrimary = true, Position = 1)]
 | 
			
		||||
 
 | 
			
		||||
@@ -21,7 +21,7 @@ public record Sys_Config : VersionEntity, IFieldEnabled
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    [JsonIgnore]
 | 
			
		||||
    [Column]
 | 
			
		||||
    public virtual bool UserRegisterConfirm { get; set; }
 | 
			
		||||
    public virtual bool UserRegisterConfirm { get; init; }
 | 
			
		||||
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    ///     用户注册默认部门
 | 
			
		||||
 
 | 
			
		||||
@@ -15,21 +15,21 @@ public record Sys_JobRecord : LiteImmutableEntity
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    [Column]
 | 
			
		||||
    [JsonIgnore]
 | 
			
		||||
    public virtual long Duration { get; init; }
 | 
			
		||||
    public long Duration { get; init; }
 | 
			
		||||
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    ///     请求方法
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    [JsonIgnore]
 | 
			
		||||
    [Column]
 | 
			
		||||
    public virtual HttpMethods HttpMethod { get; init; }
 | 
			
		||||
    public HttpMethods HttpMethod { get; init; }
 | 
			
		||||
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    ///     HTTP 状态码
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    [Column]
 | 
			
		||||
    [JsonIgnore]
 | 
			
		||||
    public virtual HttpStatusCode HttpStatusCode { get; init; }
 | 
			
		||||
    public HttpStatusCode HttpStatusCode { get; init; }
 | 
			
		||||
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    ///     作业编号
 | 
			
		||||
@@ -43,40 +43,40 @@ public record Sys_JobRecord : LiteImmutableEntity
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
 | 
			
		||||
    [JsonIgnore]
 | 
			
		||||
    public virtual string RequestBody { get; init; }
 | 
			
		||||
    public string RequestBody { get; init; }
 | 
			
		||||
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    ///     请求头
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
 | 
			
		||||
    [JsonIgnore]
 | 
			
		||||
    public virtual string RequestHeader { get; init; }
 | 
			
		||||
    public string RequestHeader { get; init; }
 | 
			
		||||
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    ///     请求的网络地址
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_127)]
 | 
			
		||||
    [JsonIgnore]
 | 
			
		||||
    public virtual string RequestUrl { get; init; }
 | 
			
		||||
    public string RequestUrl { get; init; }
 | 
			
		||||
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    ///     响应体
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
 | 
			
		||||
    [JsonIgnore]
 | 
			
		||||
    public virtual string ResponseBody { get; init; }
 | 
			
		||||
    public string ResponseBody { get; init; }
 | 
			
		||||
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    ///     响应头
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
 | 
			
		||||
    [JsonIgnore]
 | 
			
		||||
    public virtual string ResponseHeader { get; init; }
 | 
			
		||||
    public string ResponseHeader { get; init; }
 | 
			
		||||
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    ///     执行时间编号
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    [Column]
 | 
			
		||||
    [JsonIgnore]
 | 
			
		||||
    public long TimeId { get; set; }
 | 
			
		||||
    public long TimeId { get; init; }
 | 
			
		||||
}
 | 
			
		||||
@@ -23,21 +23,21 @@ public record Sys_SiteMsg : VersionEntity, IRegister, IFieldSummary
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    [JsonIgnore]
 | 
			
		||||
    [Navigate(nameof(CreatedUserId))]
 | 
			
		||||
    public virtual Sys_User Creator { get; init; }
 | 
			
		||||
    public Sys_User Creator { get; init; }
 | 
			
		||||
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    ///     消息-部门映射
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    [JsonIgnore]
 | 
			
		||||
    [Navigate(ManyToMany = typeof(Sys_SiteMsgDept))]
 | 
			
		||||
    public virtual ICollection<Sys_Dept> Depts { get; init; }
 | 
			
		||||
    public ICollection<Sys_Dept> Depts { get; init; }
 | 
			
		||||
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    ///     消息-标记映射
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    [JsonIgnore]
 | 
			
		||||
    [Navigate(nameof(Sys_SiteMsgFlag.SiteMsgId))]
 | 
			
		||||
    public ICollection<Sys_SiteMsgFlag> Flags { get; set; }
 | 
			
		||||
    public ICollection<Sys_SiteMsgFlag> Flags { get; init; }
 | 
			
		||||
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    ///     消息类型
 | 
			
		||||
@@ -50,7 +50,7 @@ public record Sys_SiteMsg : VersionEntity, IRegister, IFieldSummary
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    [JsonIgnore]
 | 
			
		||||
    [Navigate(ManyToMany = typeof(Sys_SiteMsgRole))]
 | 
			
		||||
    public virtual ICollection<Sys_Role> Roles { get; init; }
 | 
			
		||||
    public ICollection<Sys_Role> Roles { get; init; }
 | 
			
		||||
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    ///     消息摘要
 | 
			
		||||
@@ -71,7 +71,7 @@ public record Sys_SiteMsg : VersionEntity, IRegister, IFieldSummary
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    [JsonIgnore]
 | 
			
		||||
    [Navigate(ManyToMany = typeof(Sys_SiteMsgUser))]
 | 
			
		||||
    public virtual ICollection<Sys_User> Users { get; init; }
 | 
			
		||||
    public ICollection<Sys_User> Users { get; init; }
 | 
			
		||||
 | 
			
		||||
    /// <inheritdoc />
 | 
			
		||||
    public void Register(TypeAdapterConfig config)
 | 
			
		||||
 
 | 
			
		||||
@@ -20,7 +20,7 @@ public record Sys_SiteMsgDept : ImmutableEntity
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    [JsonIgnore]
 | 
			
		||||
    [Column]
 | 
			
		||||
    public virtual long DeptId { get; init; }
 | 
			
		||||
    public long DeptId { get; init; }
 | 
			
		||||
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    ///     关联的站内信
 | 
			
		||||
@@ -33,5 +33,5 @@ public record Sys_SiteMsgDept : ImmutableEntity
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    [JsonIgnore]
 | 
			
		||||
    [Column]
 | 
			
		||||
    public virtual long SiteMsgId { get; init; }
 | 
			
		||||
    public long SiteMsgId { get; init; }
 | 
			
		||||
}
 | 
			
		||||
@@ -14,17 +14,17 @@ public record Sys_SiteMsgFlag : MutableEntity
 | 
			
		||||
    ///     站内信编号
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    [JsonIgnore]
 | 
			
		||||
    public virtual long SiteMsgId { get; set; }
 | 
			
		||||
    public virtual long SiteMsgId { get; init; }
 | 
			
		||||
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    ///     用户编号
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    [JsonIgnore]
 | 
			
		||||
    public virtual long UserId { get; init; }
 | 
			
		||||
    public long UserId { get; init; }
 | 
			
		||||
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    ///     用户站内信状态
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    [JsonIgnore]
 | 
			
		||||
    public virtual UserSiteMsgStatues UserSiteMsgStatus { get; set; }
 | 
			
		||||
    public virtual UserSiteMsgStatues UserSiteMsgStatus { get; init; }
 | 
			
		||||
}
 | 
			
		||||
@@ -20,7 +20,7 @@ public record Sys_SiteMsgRole : ImmutableEntity
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    [JsonIgnore]
 | 
			
		||||
    [Column]
 | 
			
		||||
    public virtual long RoleId { get; init; }
 | 
			
		||||
    public long RoleId { get; init; }
 | 
			
		||||
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    ///     关联的站内信
 | 
			
		||||
@@ -33,5 +33,5 @@ public record Sys_SiteMsgRole : ImmutableEntity
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    [JsonIgnore]
 | 
			
		||||
    [Column]
 | 
			
		||||
    public virtual long SiteMsgId { get; init; }
 | 
			
		||||
    public long SiteMsgId { get; init; }
 | 
			
		||||
}
 | 
			
		||||
@@ -20,7 +20,7 @@ public record Sys_SiteMsgUser : ImmutableEntity
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    [JsonIgnore]
 | 
			
		||||
    [Column]
 | 
			
		||||
    public virtual long SiteMsgId { get; init; }
 | 
			
		||||
    public long SiteMsgId { get; init; }
 | 
			
		||||
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    ///     关联的用户
 | 
			
		||||
@@ -33,5 +33,5 @@ public record Sys_SiteMsgUser : ImmutableEntity
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    [JsonIgnore]
 | 
			
		||||
    [Column]
 | 
			
		||||
    public virtual long UserId { get; init; }
 | 
			
		||||
    public long UserId { get; init; }
 | 
			
		||||
}
 | 
			
		||||
@@ -10,27 +10,27 @@ public record DynamicFilterInfo : DataAbstraction
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    ///     字段名
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    public string Field { get; set; }
 | 
			
		||||
    public string Field { get; init; }
 | 
			
		||||
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    ///     子过滤条件
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    public List<DynamicFilterInfo> Filters { get; set; }
 | 
			
		||||
    public List<DynamicFilterInfo> Filters { get; init; }
 | 
			
		||||
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    ///     子过滤条件逻辑关系
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    public DynamicFilterLogics Logic { get; set; }
 | 
			
		||||
    public DynamicFilterLogics Logic { get; init; }
 | 
			
		||||
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    ///     操作符
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    public DynamicFilterOperators Operator { get; set; }
 | 
			
		||||
    public DynamicFilterOperators Operator { get; init; }
 | 
			
		||||
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    ///     值
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    public object Value { get; set; }
 | 
			
		||||
    public object Value { get; init; }
 | 
			
		||||
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    ///     隐式转换为 FreeSql 的 DynamicFilterInfo 对象
 | 
			
		||||
 
 | 
			
		||||
@@ -25,7 +25,7 @@ public record QueryReq<T> : DataAbstraction
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    ///     查询关键字
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    public string Keywords { get; set; }
 | 
			
		||||
    public string Keywords { get; init; }
 | 
			
		||||
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    ///     排序方式
 | 
			
		||||
 
 | 
			
		||||
@@ -19,5 +19,5 @@ public record RestfulInfo<T> : DataAbstraction
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    ///     消息
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    public virtual object Msg { get; init; }
 | 
			
		||||
    public object Msg { get; init; }
 | 
			
		||||
}
 | 
			
		||||
@@ -14,7 +14,7 @@ public record CreateConfigReq : Sys_Config
 | 
			
		||||
 | 
			
		||||
    /// <inheritdoc cref="Sys_Config.UserRegisterConfirm" />
 | 
			
		||||
    [JsonIgnore(Condition = JsonIgnoreCondition.Never)]
 | 
			
		||||
    public override bool UserRegisterConfirm { get; set; }
 | 
			
		||||
    public override bool UserRegisterConfirm { get; init; }
 | 
			
		||||
 | 
			
		||||
    /// <inheritdoc cref="Sys_Config.UserRegisterDeptId" />
 | 
			
		||||
    [JsonIgnore(Condition = JsonIgnoreCondition.Never)]
 | 
			
		||||
 
 | 
			
		||||
@@ -20,7 +20,7 @@ public sealed record QueryConfigRsp : Sys_Config
 | 
			
		||||
 | 
			
		||||
    /// <inheritdoc cref="Sys_Config.UserRegisterConfirm" />
 | 
			
		||||
    [JsonIgnore(Condition = JsonIgnoreCondition.Never)]
 | 
			
		||||
    public override bool UserRegisterConfirm { get; set; }
 | 
			
		||||
    public override bool UserRegisterConfirm { get; init; }
 | 
			
		||||
 | 
			
		||||
    /// <inheritdoc cref="Sys_Config.UserRegisterDept" />
 | 
			
		||||
    [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
 | 
			
		||||
 
 | 
			
		||||
@@ -3,4 +3,4 @@ namespace NetAdmin.Domain.Dto.Sys.JobRecord;
 | 
			
		||||
/// <summary>
 | 
			
		||||
///     请求:更新计划作业执行记录
 | 
			
		||||
/// </summary>
 | 
			
		||||
public sealed record UpdateJobRecordReq : CreateJobRecordReq { }
 | 
			
		||||
public sealed record UpdateJobRecordReq : CreateJobRecordReq;
 | 
			
		||||
@@ -66,6 +66,7 @@ public sealed record MetaInfo : DataAbstraction
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    ///     类型
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    [EnumDataType(typeof(MenuTypes))]
 | 
			
		||||
    [EnumDataType(typeof(MenuTypes), ErrorMessageResourceType = typeof(Ln)
 | 
			
		||||
                , ErrorMessageResourceName = nameof(Ln.菜单类型不正确))]
 | 
			
		||||
    public MenuTypes Type { get; init; }
 | 
			
		||||
}
 | 
			
		||||
@@ -37,7 +37,7 @@ public sealed record QueryRequestLogRsp : Sys_RequestLog, IRegister
 | 
			
		||||
 | 
			
		||||
    /// <inheritdoc cref="IFieldCreatedUser.CreatedUserName" />
 | 
			
		||||
    [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
 | 
			
		||||
    public override string CreatedUserName { get; set; }
 | 
			
		||||
    public override string CreatedUserName { get; init; }
 | 
			
		||||
 | 
			
		||||
    /// <inheritdoc cref="Sys_RequestLog.Duration" />
 | 
			
		||||
    [JsonIgnore(Condition = JsonIgnoreCondition.Never)]
 | 
			
		||||
@@ -102,6 +102,6 @@ public sealed record QueryRequestLogRsp : Sys_RequestLog, IRegister
 | 
			
		||||
    /// <inheritdoc />
 | 
			
		||||
    public void Register(TypeAdapterConfig config)
 | 
			
		||||
    {
 | 
			
		||||
        _ = config.ForType<Sys_RequestLog, QueryRequestLogRsp>().Map(dest => dest.ApiSummary, src => src.Api.Summary);
 | 
			
		||||
        _ = config.ForType<Sys_RequestLog, QueryRequestLogRsp>().Map(d => d.ApiSummary, s => s.Api.Summary);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -16,7 +16,8 @@ public record CreateRoleReq : Sys_Role
 | 
			
		||||
    public IReadOnlyCollection<string> ApiIds { get; init; }
 | 
			
		||||
 | 
			
		||||
    /// <inheritdoc cref="Sys_Role.DataScope" />
 | 
			
		||||
    [EnumDataType(typeof(DataScopes))]
 | 
			
		||||
    [EnumDataType(typeof(DataScopes), ErrorMessageResourceType = typeof(Ln)
 | 
			
		||||
                , ErrorMessageResourceName = nameof(Ln.角色数据范围不正确))]
 | 
			
		||||
    public override DataScopes DataScope { get; init; } = DataScopes.All;
 | 
			
		||||
 | 
			
		||||
    /// <summary>
 | 
			
		||||
 
 | 
			
		||||
@@ -22,7 +22,8 @@ public record CreateSiteMsgReq : Sys_SiteMsg
 | 
			
		||||
 | 
			
		||||
    /// <inheritdoc cref="Sys_SiteMsg.MsgType" />
 | 
			
		||||
    [JsonIgnore(Condition = JsonIgnoreCondition.Never)]
 | 
			
		||||
    [EnumDataType(typeof(SiteMsgTypes))]
 | 
			
		||||
    [EnumDataType(typeof(SiteMsgTypes), ErrorMessageResourceType = typeof(Ln)
 | 
			
		||||
                , ErrorMessageResourceName = nameof(Ln.站内信类型不正确))]
 | 
			
		||||
    public override SiteMsgTypes MsgType { get; init; }
 | 
			
		||||
 | 
			
		||||
    /// <summary>
 | 
			
		||||
 
 | 
			
		||||
@@ -40,7 +40,7 @@ public sealed record QuerySiteMsgRsp : Sys_SiteMsg
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    ///     我的标记
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    public QuerySiteMsgFlagRsp MyFlags { get; set; }
 | 
			
		||||
    public QuerySiteMsgFlagRsp MyFlags { get; init; }
 | 
			
		||||
 | 
			
		||||
    /// <inheritdoc cref="Sys_SiteMsg.Roles" />
 | 
			
		||||
    [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
 | 
			
		||||
 
 | 
			
		||||
@@ -10,10 +10,11 @@ public record CreateSiteMsgFlagReq : Sys_SiteMsgFlag
 | 
			
		||||
{
 | 
			
		||||
    /// <inheritdoc cref="Sys_SiteMsgFlag.SiteMsgId" />
 | 
			
		||||
    [JsonIgnore(Condition = JsonIgnoreCondition.Never)]
 | 
			
		||||
    public override long SiteMsgId { get; set; }
 | 
			
		||||
    public override long SiteMsgId { get; init; }
 | 
			
		||||
 | 
			
		||||
    /// <inheritdoc cref="Sys_SiteMsgFlag.UserSiteMsgStatus" />
 | 
			
		||||
    [JsonIgnore(Condition = JsonIgnoreCondition.Never)]
 | 
			
		||||
    [EnumDataType(typeof(UserSiteMsgStatues))]
 | 
			
		||||
    public override UserSiteMsgStatues UserSiteMsgStatus { get; set; }
 | 
			
		||||
    [EnumDataType(typeof(UserSiteMsgStatues), ErrorMessageResourceType = typeof(Ln)
 | 
			
		||||
                , ErrorMessageResourceName = nameof(Ln.站内信状态不正确))]
 | 
			
		||||
    public override UserSiteMsgStatues UserSiteMsgStatus { get; init; }
 | 
			
		||||
}
 | 
			
		||||
@@ -15,5 +15,5 @@ public sealed record QuerySiteMsgFlagRsp : Sys_SiteMsgFlag
 | 
			
		||||
 | 
			
		||||
    /// <inheritdoc />
 | 
			
		||||
    [JsonIgnore(Condition = JsonIgnoreCondition.Never)]
 | 
			
		||||
    public override UserSiteMsgStatues UserSiteMsgStatus { get; set; }
 | 
			
		||||
    public override UserSiteMsgStatues UserSiteMsgStatus { get; init; }
 | 
			
		||||
}
 | 
			
		||||
@@ -13,5 +13,5 @@ public record GetModulesRsp : DataAbstraction
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    ///     模块版本
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    public string Version { get; set; }
 | 
			
		||||
    public string Version { get; init; }
 | 
			
		||||
}
 | 
			
		||||
@@ -33,5 +33,5 @@ public record RegisterUserReq : Sys_User
 | 
			
		||||
    ///     短信验证请求
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    [Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.短信验证请求不能为空))]
 | 
			
		||||
    public VerifySmsCodeReq VerifySmsCodeReq { get; set; }
 | 
			
		||||
    public VerifySmsCodeReq VerifySmsCodeReq { get; init; }
 | 
			
		||||
}
 | 
			
		||||
@@ -19,7 +19,8 @@ public record CreateUserProfileReq : Sys_UserProfile
 | 
			
		||||
    public override string CertificateNumber { get; init; }
 | 
			
		||||
 | 
			
		||||
    /// <inheritdoc cref="Sys_UserProfile.CertificateType" />
 | 
			
		||||
    [EnumDataType(typeof(CertificateTypes))]
 | 
			
		||||
    [EnumDataType(typeof(CertificateTypes), ErrorMessageResourceType = typeof(Ln)
 | 
			
		||||
                , ErrorMessageResourceName = nameof(Ln.证件类型不正确))]
 | 
			
		||||
    [JsonIgnore(Condition = JsonIgnoreCondition.Never)]
 | 
			
		||||
    public override CertificateTypes? CertificateType { get; init; }
 | 
			
		||||
 | 
			
		||||
@@ -40,7 +41,8 @@ public record CreateUserProfileReq : Sys_UserProfile
 | 
			
		||||
    public override string CompanyTelephone { get; init; }
 | 
			
		||||
 | 
			
		||||
    /// <inheritdoc cref="Sys_UserProfile.Education" />
 | 
			
		||||
    [EnumDataType(typeof(Educations))]
 | 
			
		||||
    [EnumDataType(typeof(Educations), ErrorMessageResourceType = typeof(Ln)
 | 
			
		||||
                , ErrorMessageResourceName = nameof(Ln.学历不正确))]
 | 
			
		||||
    [JsonIgnore(Condition = JsonIgnoreCondition.Never)]
 | 
			
		||||
    public override Educations? Education { get; init; }
 | 
			
		||||
 | 
			
		||||
@@ -82,12 +84,13 @@ public record CreateUserProfileReq : Sys_UserProfile
 | 
			
		||||
    public override string HomeTelephone { get; init; }
 | 
			
		||||
 | 
			
		||||
    /// <inheritdoc cref="Sys_UserProfile.MarriageStatus" />
 | 
			
		||||
    [EnumDataType(typeof(MarriageStatues))]
 | 
			
		||||
    [EnumDataType(typeof(MarriageStatues), ErrorMessageResourceType = typeof(Ln)
 | 
			
		||||
                , ErrorMessageResourceName = nameof(Ln.婚姻状况不正确))]
 | 
			
		||||
    [JsonIgnore(Condition = JsonIgnoreCondition.Never)]
 | 
			
		||||
    public override MarriageStatues? MarriageStatus { get; init; }
 | 
			
		||||
 | 
			
		||||
    /// <inheritdoc cref="Sys_UserProfile.Nation" />
 | 
			
		||||
    [EnumDataType(typeof(Nations))]
 | 
			
		||||
    [EnumDataType(typeof(Nations), ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.民族不正确))]
 | 
			
		||||
    [JsonIgnore(Condition = JsonIgnoreCondition.Never)]
 | 
			
		||||
    public override Nations? Nation { get; init; }
 | 
			
		||||
 | 
			
		||||
@@ -96,7 +99,8 @@ public record CreateUserProfileReq : Sys_UserProfile
 | 
			
		||||
 | 
			
		||||
    /// <inheritdoc cref="Sys_UserProfile.PoliticalStatus" />
 | 
			
		||||
    [JsonIgnore(Condition = JsonIgnoreCondition.Never)]
 | 
			
		||||
    [EnumDataType(typeof(PoliticalStatues))]
 | 
			
		||||
    [EnumDataType(typeof(PoliticalStatues), ErrorMessageResourceType = typeof(Ln)
 | 
			
		||||
                , ErrorMessageResourceName = nameof(Ln.政治面貌不正确))]
 | 
			
		||||
    public override PoliticalStatues? PoliticalStatus { get; init; }
 | 
			
		||||
 | 
			
		||||
    /// <inheritdoc cref="Sys_UserProfile.Profession" />
 | 
			
		||||
@@ -108,7 +112,7 @@ public record CreateUserProfileReq : Sys_UserProfile
 | 
			
		||||
    public override string RealName { get; init; }
 | 
			
		||||
 | 
			
		||||
    /// <inheritdoc cref="Sys_UserProfile.Sex" />
 | 
			
		||||
    [EnumDataType(typeof(Sexes))]
 | 
			
		||||
    [EnumDataType(typeof(Sexes), ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.性别不正确))]
 | 
			
		||||
    [JsonIgnore(Condition = JsonIgnoreCondition.Never)]
 | 
			
		||||
    public override Sexes? Sex { get; init; }
 | 
			
		||||
}
 | 
			
		||||
@@ -18,7 +18,8 @@ public sealed record SendVerifyCodeReq : Sys_VerifyCode, IValidatableObject
 | 
			
		||||
    /// <inheritdoc cref="Sys_VerifyCode.DeviceType" />
 | 
			
		||||
    [Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.设备类型不能为空))]
 | 
			
		||||
    [JsonIgnore(Condition = JsonIgnoreCondition.Never)]
 | 
			
		||||
    [EnumDataType(typeof(VerifyCodeDeviceTypes))]
 | 
			
		||||
    [EnumDataType(typeof(VerifyCodeDeviceTypes), ErrorMessageResourceType = typeof(Ln)
 | 
			
		||||
                , ErrorMessageResourceName = nameof(Ln.验证码目标设备类型不正确))]
 | 
			
		||||
    public override VerifyCodeDeviceTypes DeviceType { get; init; }
 | 
			
		||||
 | 
			
		||||
    /// <inheritdoc cref="Sys_VerifyCode.Status" />
 | 
			
		||||
@@ -27,7 +28,8 @@ public sealed record SendVerifyCodeReq : Sys_VerifyCode, IValidatableObject
 | 
			
		||||
    /// <inheritdoc cref="Sys_VerifyCode.Type" />
 | 
			
		||||
    [Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.验证码类型不能为空))]
 | 
			
		||||
    [JsonIgnore(Condition = JsonIgnoreCondition.Never)]
 | 
			
		||||
    [EnumDataType(typeof(VerifyCodeTypes))]
 | 
			
		||||
    [EnumDataType(typeof(VerifyCodeTypes), ErrorMessageResourceType = typeof(Ln)
 | 
			
		||||
                , ErrorMessageResourceName = nameof(Ln.验证码类型不正确))]
 | 
			
		||||
    public override VerifyCodeTypes Type { get; init; }
 | 
			
		||||
 | 
			
		||||
    /// <summary>
 | 
			
		||||
 
 | 
			
		||||
@@ -54,7 +54,7 @@ public abstract class WorkBase<TLogger>
 | 
			
		||||
    ///     通用工作流
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    /// <exception cref="NetAdminGetLockerException">加锁失败异常</exception>
 | 
			
		||||
    protected virtual async ValueTask WorkflowAsync(bool singleInstance, CancellationToken cancelToken)
 | 
			
		||||
    protected async ValueTask WorkflowAsync(bool singleInstance, CancellationToken cancelToken)
 | 
			
		||||
    {
 | 
			
		||||
        if (singleInstance) {
 | 
			
		||||
            // 加锁
 | 
			
		||||
 
 | 
			
		||||
@@ -13,10 +13,10 @@ public sealed record InstanceNode
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    ///     数据库
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    public int Database { get; set; }
 | 
			
		||||
    public int Database { get; init; }
 | 
			
		||||
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    ///     实例名称
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    public string Name { get; set; }
 | 
			
		||||
    public string Name { get; init; }
 | 
			
		||||
}
 | 
			
		||||
@@ -30,5 +30,5 @@ public abstract class NetAdminException : Exception
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    ///     错误码
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    public ErrorCodes Code { get; set; }
 | 
			
		||||
    public ErrorCodes Code { get; init; }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user