mirror of
				https://github.com/nsnail/NetAdmin.git
				synced 2025-10-31 11:25:27 +08:00 
			
		
		
		
	chore: 🔨 模型约束修改 (#85)
This commit is contained in:
		| @@ -56,6 +56,7 @@ XML注释文件不存在 | ||||
| 短信验证请求不能为空 | ||||
| 站内信不存在 | ||||
| 签名缺失 | ||||
| 网络地址不正确 | ||||
| 菜单名称不能为空 | ||||
| 菜单标题不能为空 | ||||
| 菜单编号不能为空 | ||||
|   | ||||
| @@ -4,20 +4,13 @@ | ||||
|     "NetAdmin.BizServer.Host": { | ||||
|       "commandName": "Project", | ||||
|       "dotnetRunMessages": true, | ||||
|       "commandLineArgs": "-is", | ||||
|       "launchBrowser": true, | ||||
|       "launchUrl": "http://localhost:5010", | ||||
|       "applicationUrl": "http://[::]:5010", | ||||
|       "environmentVariables": { | ||||
|         "ASPNETCORE_ENVIRONMENT": "Development" | ||||
|       } | ||||
|     }, | ||||
|     "InitDB": { | ||||
|       "commandName": "Project", | ||||
|       "dotnetRunMessages": true, | ||||
|       "commandLineArgs": "-is", | ||||
|       "environmentVariables": { | ||||
|         "ASPNETCORE_ENVIRONMENT": "Development" | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| } | ||||
| @@ -26,6 +26,6 @@ public record CreateDeptReq : Sys_Dept | ||||
|     public override long Sort { get; init; } = Numbers.DEF_SORT_VAL; | ||||
|  | ||||
|     /// <inheritdoc cref="IFieldSummary.Summary" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] | ||||
|     public override string Summary { get; init; } | ||||
| } | ||||
| @@ -10,14 +10,14 @@ namespace NetAdmin.Domain.Dto.Sys.Menu; | ||||
| public record CreateMenuReq : Sys_Menu | ||||
| { | ||||
|     /// <inheritdoc cref="Sys_Menu.Active" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] | ||||
|     public override string Active { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="Sys_Menu.Color" /> | ||||
|     public override string Color => Meta.Color; | ||||
|  | ||||
|     /// <inheritdoc cref="Sys_Menu.Component" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] | ||||
|     public override string Component { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="Sys_Menu.FullPageRouting" /> | ||||
| @@ -47,11 +47,11 @@ public record CreateMenuReq : Sys_Menu | ||||
|     public override long ParentId { get; init; } = 0; | ||||
|  | ||||
|     /// <inheritdoc cref="Sys_Menu.Path" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] | ||||
|     public override string Path { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="Sys_Menu.Redirect" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] | ||||
|     public override string Redirect { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="IFieldSort.Sort" /> | ||||
|   | ||||
| @@ -52,6 +52,6 @@ public record CreateRoleReq : Sys_Role | ||||
|     public override long Sort { get; init; } = Numbers.DEF_SORT_VAL; | ||||
|  | ||||
|     /// <inheritdoc cref="IFieldSummary.Summary" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] | ||||
|     public override string Summary { get; init; } | ||||
| } | ||||
| @@ -10,8 +10,8 @@ namespace NetAdmin.Domain.Dto.Sys.User; | ||||
| public abstract record CreateUpdateUserReq : Sys_User | ||||
| { | ||||
|     /// <inheritdoc cref="Sys_User.Avatar" /> | ||||
|     [Url] | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     [Url(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.网络地址不正确))] | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] | ||||
|     public override string Avatar { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="Sys_User.DeptId" /> | ||||
| @@ -20,7 +20,7 @@ public abstract record CreateUpdateUserReq : Sys_User | ||||
|  | ||||
|     /// <inheritdoc cref="Sys_User.Email" /> | ||||
|     [EmailAddress] | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] | ||||
|     public override string Email { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="IFieldEnabled.Enabled" /> | ||||
| @@ -29,7 +29,7 @@ public abstract record CreateUpdateUserReq : Sys_User | ||||
|  | ||||
|     /// <inheritdoc cref="Sys_User.Mobile" /> | ||||
|     [Mobile] | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] | ||||
|     public override string Mobile { get; init; } | ||||
|  | ||||
|     /// <summary> | ||||
| @@ -47,12 +47,12 @@ public abstract record CreateUpdateUserReq : Sys_User | ||||
|     public IReadOnlyCollection<long> RoleIds { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="Sys_User.Summary" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] | ||||
|     public override string Summary { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="Sys_User.UserName" /> | ||||
|     [Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.用户名不能为空))] | ||||
|     [UserName] | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] | ||||
|     public override string UserName { get; init; } | ||||
| } | ||||
| @@ -26,7 +26,7 @@ public record RegisterUserReq : Sys_User | ||||
|     /// <inheritdoc cref="Sys_User.UserName" /> | ||||
|     [Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.用户名不能为空))] | ||||
|     [UserName] | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] | ||||
|     public override string UserName { 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] | ||||
|     [Url(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.网络地址不正确))] | ||||
|     [Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.用户头像不能为空))] | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] | ||||
|     public override string Avatar { get; init; } | ||||
| } | ||||
| @@ -15,7 +15,7 @@ public record CreateUserProfileReq : Sys_UserProfile | ||||
|  | ||||
|     /// <inheritdoc cref="Sys_UserProfile.CertificateNumber" /> | ||||
|     [Certificate] | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] | ||||
|     public override string CertificateNumber { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="Sys_UserProfile.CertificateType" /> | ||||
| @@ -24,19 +24,19 @@ public record CreateUserProfileReq : Sys_UserProfile | ||||
|     public override CertificateTypes? CertificateType { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="Sys_UserProfile.CompanyAddress" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] | ||||
|     public override string CompanyAddress { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="Sys_UserProfile.CompanyArea" /> | ||||
|     public new QueryDicContentRsp CompanyArea { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="Sys_UserProfile.CompanyName" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] | ||||
|     public override string CompanyName { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="Sys_UserProfile.CompanyTelephone" /> | ||||
|     [Telephone] | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] | ||||
|     public override string CompanyTelephone { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="Sys_UserProfile.Education" /> | ||||
| @@ -45,7 +45,7 @@ public record CreateUserProfileReq : Sys_UserProfile | ||||
|     public override Educations? Education { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="Sys_UserProfile.EmergencyContactAddress" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] | ||||
|     public override string EmergencyContactAddress { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="Sys_UserProfile.EmergencyContactArea" /> | ||||
| @@ -53,15 +53,15 @@ public record CreateUserProfileReq : Sys_UserProfile | ||||
|  | ||||
|     /// <inheritdoc cref="Sys_UserProfile.EmergencyContactMobile" /> | ||||
|     [Mobile] | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] | ||||
|     public override string EmergencyContactMobile { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="Sys_UserProfile.EmergencyContactName" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] | ||||
|     public override string EmergencyContactName { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="Sys_UserProfile.GraduateSchool" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] | ||||
|     public override string GraduateSchool { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="Sys_UserProfile.Height" /> | ||||
| @@ -70,7 +70,7 @@ public record CreateUserProfileReq : Sys_UserProfile | ||||
|     public override int? Height { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="Sys_UserProfile.HomeAddress" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] | ||||
|     public override string HomeAddress { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="Sys_UserProfile.HomeArea" /> | ||||
| @@ -78,7 +78,7 @@ public record CreateUserProfileReq : Sys_UserProfile | ||||
|  | ||||
|     /// <inheritdoc cref="Sys_UserProfile.HomeTelephone" /> | ||||
|     [Telephone] | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] | ||||
|     public override string HomeTelephone { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="Sys_UserProfile.MarriageStatus" /> | ||||
| @@ -100,11 +100,11 @@ public record CreateUserProfileReq : Sys_UserProfile | ||||
|     public override PoliticalStatues? PoliticalStatus { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="Sys_UserProfile.Profession" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] | ||||
|     public override string Profession { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="Sys_UserProfile.RealName" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] | ||||
|     public override string RealName { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="Sys_UserProfile.Sex" /> | ||||
|   | ||||
| @@ -9,7 +9,7 @@ public sealed record SendVerifyCodeRsp : Sys_VerifyCode | ||||
| { | ||||
|     #if DEBUG | ||||
|     /// <inheritdoc cref="Sys_VerifyCode.Code" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] | ||||
|     public override string Code { get; init; } | ||||
|     #endif | ||||
| } | ||||
| @@ -1,5 +1,5 @@ | ||||
| <template> | ||||
|     <el-dialog v-model="visible" :width="800" destroy-on-close :title="$t('设置邮箱')" @closed="$emit('closed')"> | ||||
|     <el-dialog v-model="visible" :title="$t('设置邮箱')" :width="800" destroy-on-close @closed="$emit('closed')"> | ||||
|         <el-form ref="form" :model="form" :rules="rules" label-position="top"> | ||||
|             <el-row class="is-justify-space-evenly"> | ||||
|                 <el-col v-if="$GLOBAL.user.mobile" :lg="10"> | ||||
| @@ -16,11 +16,11 @@ | ||||
|                 <el-col :lg="10"> | ||||
|                     <na-form-email | ||||
|                         v-model="form" | ||||
|                         :code-label="$t('邮箱验证码')" | ||||
|                         :email-label="$t('邮箱地址')" | ||||
|                         :vue="this" | ||||
|                         code-field="code" | ||||
|                         code-label="$t('邮箱验证码')" | ||||
|                         email-field="destDevice" | ||||
|                         email-label="$t('邮箱地址')" | ||||
|                         form-name="form" /> | ||||
|                 </el-col> | ||||
|             </el-row> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 GitHub
						GitHub