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