mirror of
https://github.com/nsnail/NetAdmin.git
synced 2025-08-07 08:42:28 +08:00
style: 💄 代码格式整理 (#105)
This commit is contained in:
@ -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; }
|
||||
|
||||
|
Reference in New Issue
Block a user