mirror of
https://github.com/nsnail/NetAdmin.git
synced 2025-08-07 08:42:28 +08:00
feat: ✨ 基础模块
注册登录 用户管理 角色管理 部门管理 消息管理 接口管理 菜单管理 字典管理 缓存管理 请求日志 系统设置 版本信息 代码生成
This commit is contained in:
@ -1,5 +1,3 @@
|
||||
using NetAdmin.Domain.Attributes.DataValidation;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Dependency;
|
||||
|
||||
/// <summary>
|
||||
@ -11,7 +9,7 @@ public sealed record BulkReq<T> : DataAbstraction
|
||||
/// <summary>
|
||||
/// 请求对象
|
||||
/// </summary>
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.请求对象))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.请求对象不能为空))]
|
||||
[MinLength(1)]
|
||||
[MaxLength(Numbers.BULK_REQ_LIMIT)]
|
||||
public IEnumerable<T> Items { get; init; }
|
||||
|
@ -0,0 +1,42 @@
|
||||
using NetAdmin.Domain.Enums;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Dependency;
|
||||
|
||||
/// <summary>
|
||||
/// 动态过滤条件
|
||||
/// </summary>
|
||||
public record DynamicFilterInfo : DataAbstraction
|
||||
{
|
||||
/// <summary>
|
||||
/// 字段名
|
||||
/// </summary>
|
||||
public string Field { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 子过滤条件
|
||||
/// </summary>
|
||||
public List<DynamicFilterInfo> Filters { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 子过滤条件逻辑关系
|
||||
/// </summary>
|
||||
public DynamicFilterLogics Logic { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 操作符
|
||||
/// </summary>
|
||||
public DynamicFilterOperators Operator { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 值
|
||||
/// </summary>
|
||||
public object Value { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 隐式转换为 FreeSql 的 DynamicFilterInfo 对象
|
||||
/// </summary>
|
||||
public static implicit operator FreeSql.Internal.Model.DynamicFilterInfo(DynamicFilterInfo d)
|
||||
{
|
||||
return d.Adapt<FreeSql.Internal.Model.DynamicFilterInfo>();
|
||||
}
|
||||
}
|
@ -19,5 +19,5 @@ public record RestfulInfo<T> : DataAbstraction
|
||||
/// <summary>
|
||||
/// 消息
|
||||
/// </summary>
|
||||
public object Msg { get; init; }
|
||||
public virtual object Msg { get; init; }
|
||||
}
|
@ -8,9 +8,7 @@ namespace NetAdmin.Domain.Dto.Sys.Api;
|
||||
/// </summary>
|
||||
public sealed record QueryApiRsp : Sys_Api
|
||||
{
|
||||
/// <summary>
|
||||
/// 子节点
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="Sys_Api.Children" />
|
||||
public new IEnumerable<QueryApiRsp> Children { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
|
@ -1,5 +1,3 @@
|
||||
using NetAdmin.Domain.Attributes.DataValidation;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.Captcha;
|
||||
|
||||
/// <summary>
|
||||
@ -10,7 +8,7 @@ public sealed record VerifyCaptchaReq : DataAbstraction
|
||||
/// <summary>
|
||||
/// 唯一编码
|
||||
/// </summary>
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.唯一编码))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.唯一编码不能为空))]
|
||||
public string Id { get; init; }
|
||||
|
||||
/// <summary>
|
||||
@ -22,6 +20,6 @@ public sealed record VerifyCaptchaReq : DataAbstraction
|
||||
/// <summary>
|
||||
/// 验证数据
|
||||
/// </summary>
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.验证数据))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.验证数据不能为空))]
|
||||
public string VerifyData { get; init; }
|
||||
}
|
@ -8,9 +8,7 @@ namespace NetAdmin.Domain.Dto.Sys.Config;
|
||||
/// </summary>
|
||||
public sealed record QueryConfigReq : Sys_Config
|
||||
{
|
||||
/// <summary>
|
||||
/// 是否启用
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="IFieldEnabled.Enabled" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public new bool? Enabled { get; init; }
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
using NetAdmin.Domain.Attributes.DataValidation;
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
@ -15,7 +14,7 @@ public record CreateDeptReq : Sys_Dept
|
||||
|
||||
/// <inheritdoc cref="Sys_Dept.Name" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.部门名称))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.部门名称不能为空))]
|
||||
public override string Name { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_Dept.ParentId" />
|
||||
|
@ -8,9 +8,7 @@ namespace NetAdmin.Domain.Dto.Sys.Dept;
|
||||
/// </summary>
|
||||
public record QueryDeptRsp : Sys_Dept
|
||||
{
|
||||
/// <summary>
|
||||
/// 子节点
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="Sys_Dept.Children" />
|
||||
public new virtual IEnumerable<QueryDeptRsp> Children { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldCreatedTime.CreatedTime" />
|
||||
|
@ -8,11 +8,13 @@ public sealed record GenerateCsCodeReq : DataAbstraction
|
||||
/// <summary>
|
||||
/// 模块名称
|
||||
/// </summary>
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.模块名称不能为空))]
|
||||
public string ModuleName { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 模块说明
|
||||
/// </summary>
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.模块说明不能为空))]
|
||||
public string ModuleRemark { get; init; }
|
||||
|
||||
/// <summary>
|
||||
|
@ -1,5 +1,3 @@
|
||||
using NetAdmin.Domain.Attributes.DataValidation;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.Dev;
|
||||
|
||||
/// <summary>
|
||||
@ -10,12 +8,12 @@ public sealed record GenerateIconCodeReq : DataAbstraction
|
||||
/// <summary>
|
||||
/// 图标名称
|
||||
/// </summary>
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.图标名称))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.图标名称不能为空))]
|
||||
public string IconName { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 图标代码
|
||||
/// </summary>
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.图标代码))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.图标代码不能为空))]
|
||||
public string SvgCode { get; init; }
|
||||
}
|
@ -1,4 +1,3 @@
|
||||
using NetAdmin.Domain.Attributes.DataValidation;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.Dic.Catalog;
|
||||
@ -10,12 +9,12 @@ public record CreateDicCatalogReq : Sys_DicCatalog
|
||||
{
|
||||
/// <inheritdoc cref="Sys_DicCatalog.Code" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.字典编码))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.字典编码不能为空))]
|
||||
public override string Code { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_DicCatalog.Name" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.字典名称))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.字典名称不能为空))]
|
||||
public override string Name { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_DicCatalog.ParentId" />
|
||||
|
@ -8,9 +8,7 @@ namespace NetAdmin.Domain.Dto.Sys.Dic.Catalog;
|
||||
/// </summary>
|
||||
public sealed record QueryDicCatalogRsp : Sys_DicCatalog
|
||||
{
|
||||
/// <summary>
|
||||
/// 子节点
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="Sys_DicCatalog.Children" />
|
||||
public new IEnumerable<QueryDicCatalogRsp> Children { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_DicCatalog.Code" />
|
||||
|
@ -1,4 +1,3 @@
|
||||
using NetAdmin.Domain.Attributes.DataValidation;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.Dic.Content;
|
||||
@ -10,16 +9,16 @@ public record CreateDicContentReq : Sys_DicContent
|
||||
{
|
||||
/// <inheritdoc cref="Sys_DicContent.CatalogId" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.字典目录编号))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.字典目录编号不能为空))]
|
||||
public override long CatalogId { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_DicContent.Key" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.键名称))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.键名称不能为空))]
|
||||
public override string Key { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_DicContent.Value" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.键值))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.键值不能为空))]
|
||||
public override string Value { get; init; }
|
||||
}
|
@ -1,4 +1,3 @@
|
||||
using NetAdmin.Domain.Attributes.DataValidation;
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
using NetAdmin.Domain.Enums.Sys;
|
||||
@ -40,7 +39,7 @@ public record CreateMenuReq : Sys_Menu
|
||||
|
||||
/// <inheritdoc cref="Sys_Menu.Name" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.菜单名称))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.菜单名称不能为空))]
|
||||
public override string Name { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_Menu.ParentId" />
|
||||
@ -63,7 +62,7 @@ public record CreateMenuReq : Sys_Menu
|
||||
public override string Tag => Meta.Tag;
|
||||
|
||||
/// <inheritdoc cref="Sys_Menu.Title" />
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.菜单标题))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.菜单标题不能为空))]
|
||||
public override string Title => Meta.Title;
|
||||
|
||||
/// <inheritdoc cref="Sys_Menu.Type" />
|
||||
|
@ -17,9 +17,7 @@ public sealed record QueryMenuRsp : Sys_Menu, IRegister
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public override string Active { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 子节点
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="Sys_Menu.Children" />
|
||||
public new IEnumerable<QueryMenuRsp> Children { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_Menu.Component" />
|
||||
|
@ -44,7 +44,7 @@ public record CreateRoleReq : Sys_Role
|
||||
|
||||
/// <inheritdoc cref="Sys_Role.Name" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.角色名称))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.角色名称不能为空))]
|
||||
public override string Name { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldSort.Sort" />
|
||||
|
@ -1,5 +1,3 @@
|
||||
using NetAdmin.Domain.Attributes.DataValidation;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.Role;
|
||||
|
||||
/// <summary>
|
||||
@ -10,12 +8,12 @@ public sealed record MapMenusReq : DataAbstraction
|
||||
/// <summary>
|
||||
/// 菜单编号
|
||||
/// </summary>
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.菜单编号))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.菜单编号不能为空))]
|
||||
public IReadOnlyCollection<long> MenuIds { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 角色编号
|
||||
/// </summary>
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.角色编号))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.角色编号不能为空))]
|
||||
public long RoleId { get; init; }
|
||||
}
|
@ -1,4 +1,3 @@
|
||||
using NetAdmin.Domain.Attributes.DataValidation;
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.Role;
|
||||
@ -10,11 +9,11 @@ public sealed record UpdateRoleReq : CreateRoleReq
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.唯一编码))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.唯一编码不能为空))]
|
||||
public override long Id { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldVersion.Version" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.数据版本))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.数据版本不能为空))]
|
||||
public override long Version { get; init; }
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
using NetAdmin.Domain.Enums.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsg;
|
||||
|
||||
/// <summary>
|
||||
/// 请求:创建站内信
|
||||
/// </summary>
|
||||
public record CreateSiteMsgReq : Sys_SiteMsg
|
||||
{
|
||||
/// <inheritdoc cref="Sys_SiteMsg.Content" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.消息内容不能为空))]
|
||||
public override string Content { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 部门编号列表
|
||||
/// </summary>
|
||||
[MinLength(1)]
|
||||
[MaxLength(Numbers.BULK_REQ_LIMIT)]
|
||||
public IReadOnlyCollection<long> DeptIds { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_SiteMsg.MsgType" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
[EnumDataType(typeof(SiteMsgTypes))]
|
||||
public override SiteMsgTypes MsgType { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 角色编号列表
|
||||
/// </summary>
|
||||
[MinLength(1)]
|
||||
[MaxLength(Numbers.BULK_REQ_LIMIT)]
|
||||
public IReadOnlyCollection<long> RoleIds { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_SiteMsg.Title" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.消息主题不能为空))]
|
||||
public override string Title { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 用户编号列表
|
||||
/// </summary>
|
||||
[MinLength(1)]
|
||||
[MaxLength(Numbers.BULK_REQ_LIMIT)]
|
||||
public IReadOnlyCollection<long> UserIds { get; init; }
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsg;
|
||||
|
||||
/// <summary>
|
||||
/// 请求:查询站内信
|
||||
/// </summary>
|
||||
public sealed record QuerySiteMsgReq : Sys_SiteMsg
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
using NetAdmin.Domain.Dto.Sys.Dept;
|
||||
using NetAdmin.Domain.Dto.Sys.Role;
|
||||
using NetAdmin.Domain.Dto.Sys.SiteMsgFlag;
|
||||
using NetAdmin.Domain.Dto.Sys.User;
|
||||
using NetAdmin.Domain.Enums.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsg;
|
||||
|
||||
/// <summary>
|
||||
/// 响应:查询站内信
|
||||
/// </summary>
|
||||
public sealed record QuerySiteMsgRsp : Sys_SiteMsg
|
||||
{
|
||||
/// <inheritdoc cref="Sys_SiteMsg.Content" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public override string Content { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldCreatedTime.CreatedTime" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override DateTime CreatedTime { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_SiteMsg.Depts" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public new IEnumerable<QueryDeptRsp> Depts { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldModifiedTime.ModifiedTime" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public override DateTime? ModifiedTime { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_SiteMsg.MsgType" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override SiteMsgTypes MsgType { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 我的标记
|
||||
/// </summary>
|
||||
public QuerySiteMsgFlagRsp MyFlags { get; set; }
|
||||
|
||||
/// <inheritdoc cref="Sys_SiteMsg.Roles" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public new IEnumerable<QueryRoleRsp> Roles { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 消息发送者
|
||||
/// </summary>
|
||||
public QueryUserRsp Sender { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_SiteMsg.Summary" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public override string Summary { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_SiteMsg.Title" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public override string Title { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_SiteMsg.Users" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public new IEnumerable<QueryUserRsp> Users { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldVersion.Version" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Version { get; init; }
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsg;
|
||||
|
||||
/// <summary>
|
||||
/// 请求:更新站内信
|
||||
/// </summary>
|
||||
public sealed record UpdateSiteMsgReq : CreateSiteMsgReq
|
||||
{
|
||||
/// <inheritdoc cref="IFieldVersion.Version" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Version { get; init; }
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsgDept;
|
||||
|
||||
/// <summary>
|
||||
/// 请求:创建站内信-部门映射
|
||||
/// </summary>
|
||||
public record CreateSiteMsgDeptReq : Sys_SiteMsgDept;
|
@ -0,0 +1,14 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsgDept;
|
||||
|
||||
/// <summary>
|
||||
/// 请求:查询站内信-部门映射
|
||||
/// </summary>
|
||||
public sealed record QuerySiteMsgDeptReq : Sys_SiteMsgDept
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsgDept;
|
||||
|
||||
/// <summary>
|
||||
/// 响应:查询站内信-部门映射
|
||||
/// </summary>
|
||||
public sealed record QuerySiteMsgDeptRsp : Sys_SiteMsgDept
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsgDept;
|
||||
|
||||
/// <summary>
|
||||
/// 请求:更新站内信-部门映射
|
||||
/// </summary>
|
||||
public sealed record UpdateSiteMsgDeptReq : CreateSiteMsgDeptReq { }
|
@ -0,0 +1,18 @@
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsgFlag;
|
||||
|
||||
/// <summary>
|
||||
/// 请求:创建站内信标记
|
||||
/// </summary>
|
||||
public record CreateSiteMsgFlagReq : Sys_SiteMsgFlag
|
||||
{
|
||||
/// <inheritdoc cref="Sys_SiteMsgFlag.SiteMsgId" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long SiteMsgId { get; set; }
|
||||
|
||||
/// <inheritdoc cref="Sys_SiteMsgFlag.UserSiteMsgStatus" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
[EnumDataType(typeof(UserSiteMsgStatues))]
|
||||
public override UserSiteMsgStatues UserSiteMsgStatus { get; set; }
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsgFlag;
|
||||
|
||||
/// <summary>
|
||||
/// 请求:查询站内信标记
|
||||
/// </summary>
|
||||
public sealed record QuerySiteMsgFlagReq : Sys_SiteMsgFlag
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsgFlag;
|
||||
|
||||
/// <summary>
|
||||
/// 响应:查询站内信标记
|
||||
/// </summary>
|
||||
public sealed record QuerySiteMsgFlagRsp : Sys_SiteMsgFlag
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
|
||||
/// <inheritdoc />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override UserSiteMsgStatues UserSiteMsgStatus { get; set; }
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsgFlag;
|
||||
|
||||
/// <summary>
|
||||
/// 请求:更新站内信标记
|
||||
/// </summary>
|
||||
public sealed record UpdateSiteMsgFlagReq : CreateSiteMsgFlagReq { }
|
@ -0,0 +1,8 @@
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsgRole;
|
||||
|
||||
/// <summary>
|
||||
/// 请求:创建站内信-角色映射
|
||||
/// </summary>
|
||||
public record CreateSiteMsgRoleReq : Sys_SiteMsgRole;
|
@ -0,0 +1,14 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsgRole;
|
||||
|
||||
/// <summary>
|
||||
/// 请求:查询站内信-角色映射
|
||||
/// </summary>
|
||||
public sealed record QuerySiteMsgRoleReq : Sys_SiteMsgRole
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsgRole;
|
||||
|
||||
/// <summary>
|
||||
/// 响应:查询站内信-角色映射
|
||||
/// </summary>
|
||||
public sealed record QuerySiteMsgRoleRsp : Sys_SiteMsgRole
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsgRole;
|
||||
|
||||
/// <summary>
|
||||
/// 请求:更新站内信-角色映射
|
||||
/// </summary>
|
||||
public sealed record UpdateSiteMsgRoleReq : CreateSiteMsgRoleReq { }
|
@ -0,0 +1,8 @@
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsgUser;
|
||||
|
||||
/// <summary>
|
||||
/// 请求:创建站内信-用户映射
|
||||
/// </summary>
|
||||
public record CreateSiteMsgUserReq : Sys_SiteMsgUser;
|
@ -0,0 +1,14 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsgUser;
|
||||
|
||||
/// <summary>
|
||||
/// 请求:查询站内信-用户映射
|
||||
/// </summary>
|
||||
public sealed record QuerySiteMsgUserReq : Sys_SiteMsgUser
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsgUser;
|
||||
|
||||
/// <summary>
|
||||
/// 响应:查询站内信-用户映射
|
||||
/// </summary>
|
||||
public sealed record QuerySiteMsgUserRsp : Sys_SiteMsgUser
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsgUser;
|
||||
|
||||
/// <summary>
|
||||
/// 请求:更新站内信-用户映射
|
||||
/// </summary>
|
||||
public sealed record UpdateSiteMsgUserReq : CreateSiteMsgUserReq { }
|
17
src/backend/NetAdmin.Domain/Dto/Sys/Tool/GetModulesRsp.cs
Normal file
17
src/backend/NetAdmin.Domain/Dto/Sys/Tool/GetModulesRsp.cs
Normal file
@ -0,0 +1,17 @@
|
||||
namespace NetAdmin.Domain.Dto.Sys.Tool;
|
||||
|
||||
/// <summary>
|
||||
/// 响应:获取模块信息
|
||||
/// </summary>
|
||||
public record GetModulesRsp : DataAbstraction
|
||||
{
|
||||
/// <summary>
|
||||
/// 模块名称
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 模块版本
|
||||
/// </summary>
|
||||
public string Version { get; set; }
|
||||
}
|
@ -15,7 +15,7 @@ public sealed record CheckUserNameAvailableReq : Sys_User
|
||||
|
||||
/// <inheritdoc cref="Sys_User.UserName" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.用户名))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.用户名不能为空))]
|
||||
[UserName]
|
||||
public override string UserName { get; init; }
|
||||
}
|
@ -10,7 +10,7 @@ namespace NetAdmin.Domain.Dto.Sys.User;
|
||||
public abstract record CreateUpdateUserReq : Sys_User
|
||||
{
|
||||
/// <inheritdoc cref="Sys_User.Avatar" />
|
||||
[CultureUrl]
|
||||
[Url]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override string Avatar { get; init; }
|
||||
|
||||
@ -41,7 +41,7 @@ public abstract record CreateUpdateUserReq : Sys_User
|
||||
/// <summary>
|
||||
/// 角色编号列表
|
||||
/// </summary>
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.角色编号列表))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.角色编号列表不能为空))]
|
||||
[MinLength(1)]
|
||||
[MaxLength(Numbers.BULK_REQ_LIMIT)]
|
||||
public IReadOnlyCollection<long> RoleIds { get; init; }
|
||||
@ -51,7 +51,7 @@ public abstract record CreateUpdateUserReq : Sys_User
|
||||
public override string Summary { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_User.UserName" />
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.用户名))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.用户名不能为空))]
|
||||
[UserName]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override string UserName { get; init; }
|
||||
|
@ -1,4 +1,3 @@
|
||||
using NetAdmin.Domain.Attributes.DataValidation;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
using NetAdmin.Domain.Dto.Sys.UserProfile;
|
||||
|
||||
@ -10,11 +9,11 @@ namespace NetAdmin.Domain.Dto.Sys.User;
|
||||
public record CreateUserReq : CreateUpdateUserReq, IRegister
|
||||
{
|
||||
/// <inheritdoc cref="CreateUpdateUserReq.PasswordText" />
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.密码))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.密码不能为空))]
|
||||
public override string PasswordText { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_User.Profile" />
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.用户档案))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.用户档案不能为空))]
|
||||
public new CreateUserProfileReq Profile { get; init; }
|
||||
|
||||
/// <inheritdoc />
|
||||
|
@ -1,4 +1,3 @@
|
||||
using NetAdmin.Domain.Attributes.DataValidation;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.User;
|
||||
@ -11,10 +10,10 @@ public record LoginByPwdReq : DataAbstraction
|
||||
/// <summary>
|
||||
/// 用户名、手机号、邮箱
|
||||
/// </summary>
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.账号))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.账号不能为空))]
|
||||
public string Account { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_User.Password" />
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.密码))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.密码不能为空))]
|
||||
public string Password { get; init; }
|
||||
}
|
@ -1,3 +1,4 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.User;
|
||||
@ -7,15 +8,11 @@ namespace NetAdmin.Domain.Dto.Sys.User;
|
||||
/// </summary>
|
||||
public sealed record QueryUserReq : Sys_User
|
||||
{
|
||||
/// <summary>
|
||||
/// 部门编号
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="Sys_User.DeptId" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long DeptId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// id
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
|
||||
|
@ -18,9 +18,7 @@ public record QueryUserRsp : Sys_User
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override DateTime CreatedTime { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 部门
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="Sys_User.Dept" />
|
||||
public new virtual QueryDeptRsp Dept { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_User.Email" />
|
||||
@ -39,9 +37,7 @@ public record QueryUserRsp : Sys_User
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public override string Mobile { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 角色列表
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="Sys_User.Roles" />
|
||||
public new virtual IEnumerable<QueryRoleRsp> Roles { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_User.Summary" />
|
||||
|
@ -12,7 +12,7 @@ public record RegisterUserReq : Sys_User
|
||||
/// <summary>
|
||||
/// 密码
|
||||
/// </summary>
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.密码))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.密码不能为空))]
|
||||
[Password]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public virtual string PasswordText { get; init; }
|
||||
@ -23,10 +23,8 @@ public record RegisterUserReq : Sys_User
|
||||
[JsonIgnore]
|
||||
public IReadOnlyCollection<long> RoleIds { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 用户名
|
||||
/// </summary>
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.用户名))]
|
||||
/// <inheritdoc cref="Sys_User.UserName" />
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.用户名不能为空))]
|
||||
[UserName]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override string UserName { get; init; }
|
||||
@ -34,6 +32,6 @@ public record RegisterUserReq : Sys_User
|
||||
/// <summary>
|
||||
/// 短信验证请求
|
||||
/// </summary>
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.短信验证请求))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.短信验证请求不能为空))]
|
||||
public VerifySmsCodeReq VerifySmsCodeReq { get; set; }
|
||||
}
|
@ -11,13 +11,13 @@ public sealed record ResetPasswordReq : DataAbstraction
|
||||
/// <summary>
|
||||
/// 密码
|
||||
/// </summary>
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.密码))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.密码不能为空))]
|
||||
[Password]
|
||||
public string PasswordText { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 短信验证请求
|
||||
/// </summary>
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.短信验证请求))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.短信验证请求不能为空))]
|
||||
public VerifySmsCodeReq VerifySmsCodeReq { get; init; }
|
||||
}
|
@ -1,4 +1,3 @@
|
||||
using NetAdmin.Domain.Attributes.DataValidation;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.User;
|
||||
@ -9,8 +8,8 @@ namespace NetAdmin.Domain.Dto.Sys.User;
|
||||
public sealed record SetAvatarReq : Sys_User
|
||||
{
|
||||
/// <inheritdoc cref="Sys_User.Avatar" />
|
||||
[CultureUrl]
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.用户头像))]
|
||||
[Url]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.用户头像不能为空))]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override string Avatar { get; init; }
|
||||
}
|
@ -1,4 +1,3 @@
|
||||
using NetAdmin.Domain.Attributes.DataValidation;
|
||||
using NetAdmin.Domain.Dto.Sys.VerifyCode;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.User;
|
||||
@ -11,7 +10,7 @@ public sealed record SetMobileReq : DataAbstraction
|
||||
/// <summary>
|
||||
/// 新手机短信验证请求
|
||||
/// </summary>
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.短信验证请求))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.短信验证请求不能为空))]
|
||||
public VerifySmsCodeReq NewVerifySmsCodeReq { get; init; }
|
||||
|
||||
/// <summary>
|
||||
|
@ -10,14 +10,14 @@ public sealed record SetPasswordReq : DataAbstraction
|
||||
/// <summary>
|
||||
/// 新密码
|
||||
/// </summary>
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.新密码))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.新密码不能为空))]
|
||||
[Password]
|
||||
public string NewPassword { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 旧密码
|
||||
/// </summary>
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.旧密码))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.旧密码不能为空))]
|
||||
[Password]
|
||||
public string OldPassword { get; init; }
|
||||
}
|
@ -1,4 +1,3 @@
|
||||
using NetAdmin.Domain.Attributes.DataValidation;
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
using NetAdmin.Domain.Dto.Sys.UserProfile;
|
||||
@ -15,7 +14,7 @@ public sealed record UpdateUserReq : CreateUpdateUserReq
|
||||
public override long Id { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_User.Profile" />
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.用户档案))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.用户档案不能为空))]
|
||||
public new UpdateUserProfileReq Profile { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldVersion.Version" />
|
||||
|
@ -9,10 +9,10 @@ namespace NetAdmin.Domain.Dto.Sys.User;
|
||||
/// </summary>
|
||||
public record UserInfoRsp : QueryUserRsp, IRegister
|
||||
{
|
||||
/// <inheritdoc />
|
||||
/// <inheritdoc cref="Sys_User.Dept" />
|
||||
public override QueryDeptRsp Dept { get; init; }
|
||||
|
||||
/// <inheritdoc />
|
||||
/// <inheritdoc cref="Sys_User.Roles" />
|
||||
public override IEnumerable<QueryRoleRsp> Roles { get; init; }
|
||||
|
||||
/// <inheritdoc />
|
||||
|
@ -27,9 +27,7 @@ public record CreateUserProfileReq : Sys_UserProfile
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override string CompanyAddress { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 工作地区
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="Sys_UserProfile.CompanyArea" />
|
||||
public new QueryDicContentRsp CompanyArea { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_UserProfile.CompanyName" />
|
||||
@ -50,9 +48,7 @@ public record CreateUserProfileReq : Sys_UserProfile
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override string EmergencyContactAddress { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 紧急联系地区
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="Sys_UserProfile.EmergencyContactArea" />
|
||||
public new QueryDicContentRsp EmergencyContactArea { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_UserProfile.EmergencyContactMobile" />
|
||||
@ -77,9 +73,7 @@ public record CreateUserProfileReq : Sys_UserProfile
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override string HomeAddress { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 住宅地区
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="Sys_UserProfile.HomeArea" />
|
||||
public new QueryDicContentRsp HomeArea { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_UserProfile.HomeTelephone" />
|
||||
@ -97,9 +91,7 @@ public record CreateUserProfileReq : Sys_UserProfile
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override Nations? Nation { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 籍贯
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="Sys_UserProfile.NationArea" />
|
||||
public new CreateDicContentReq NationArea { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_UserProfile.PoliticalStatus" />
|
||||
|
@ -25,9 +25,7 @@ public sealed record QueryUserProfileRsp : Sys_UserProfile
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public override string CompanyAddress { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 工作地区
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="Sys_UserProfile.CompanyArea" />
|
||||
public new QueryDicContentRsp CompanyArea { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_UserProfile.CompanyName" />
|
||||
@ -46,9 +44,7 @@ public sealed record QueryUserProfileRsp : Sys_UserProfile
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public override string EmergencyContactAddress { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 紧急联系地区
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="Sys_UserProfile.EmergencyContactArea" />
|
||||
public new QueryDicContentRsp EmergencyContactArea { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_UserProfile.EmergencyContactMobile" />
|
||||
@ -71,9 +67,7 @@ public sealed record QueryUserProfileRsp : Sys_UserProfile
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public override string HomeAddress { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 住宅地区
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="Sys_UserProfile.HomeArea" />
|
||||
public new QueryDicContentRsp HomeArea { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_UserProfile.HomeTelephone" />
|
||||
@ -92,9 +86,7 @@ public sealed record QueryUserProfileRsp : Sys_UserProfile
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public override Nations? Nation { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 籍贯
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="Sys_UserProfile.NationArea" />
|
||||
public new QueryDicContentRsp NationArea { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_UserProfile.PoliticalStatus" />
|
||||
|
@ -11,12 +11,12 @@ namespace NetAdmin.Domain.Dto.Sys.VerifyCode;
|
||||
public sealed record SendVerifyCodeReq : Sys_VerifyCode, IValidatableObject
|
||||
{
|
||||
/// <inheritdoc cref="Sys_VerifyCode.DestDevice" />
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.目标设备))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.目标设备不能为空))]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public override string DestDevice { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_VerifyCode.DeviceType" />
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.设备类型))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.设备类型不能为空))]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
[EnumDataType(typeof(VerifyCodeDeviceTypes))]
|
||||
public override VerifyCodeDeviceTypes DeviceType { get; init; }
|
||||
@ -25,7 +25,7 @@ public sealed record SendVerifyCodeReq : Sys_VerifyCode, IValidatableObject
|
||||
public override VerifyCodeStatues Status => VerifyCodeStatues.Waiting;
|
||||
|
||||
/// <inheritdoc cref="Sys_VerifyCode.Type" />
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.验证码类型))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.验证码类型不能为空))]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
[EnumDataType(typeof(VerifyCodeTypes))]
|
||||
public override VerifyCodeTypes Type { get; init; }
|
||||
@ -33,7 +33,7 @@ public sealed record SendVerifyCodeReq : Sys_VerifyCode, IValidatableObject
|
||||
/// <summary>
|
||||
/// 人机校验请求
|
||||
/// </summary>
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.人机校验请求))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.人机校验请求不能为空))]
|
||||
public VerifyCaptchaReq VerifyCaptchaReq { get; init; }
|
||||
|
||||
/// <inheritdoc />
|
||||
|
@ -9,13 +9,13 @@ namespace NetAdmin.Domain.Dto.Sys.VerifyCode;
|
||||
public abstract record VerifyCodeReq : Sys_VerifyCode
|
||||
{
|
||||
/// <inheritdoc cref="Sys_VerifyCode.Code" />
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.验证码))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.验证码不能为空))]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
[VerifyCode]
|
||||
public override string Code { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_VerifyCode.DestDevice" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
[CultureRequired(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.目标设备))]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.目标设备不能为空))]
|
||||
public override string DestDevice { get; init; }
|
||||
}
|
@ -1,4 +1,5 @@
|
||||
using NetAdmin.Domain.Attributes.DataValidation;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
using NetAdmin.Domain.Enums.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.VerifyCode;
|
||||
@ -8,11 +9,11 @@ namespace NetAdmin.Domain.Dto.Sys.VerifyCode;
|
||||
/// </summary>
|
||||
public record VerifyEmailCodeReq : VerifyCodeReq
|
||||
{
|
||||
/// <inheritdoc />
|
||||
/// <inheritdoc cref="Sys_VerifyCode.DestDevice" />
|
||||
[Email]
|
||||
public override string DestDevice { get; init; }
|
||||
|
||||
/// <inheritdoc />
|
||||
/// <inheritdoc cref="Sys_VerifyCode.DeviceType" />
|
||||
[JsonIgnore]
|
||||
public override VerifyCodeDeviceTypes DeviceType { get; init; } = VerifyCodeDeviceTypes.Email;
|
||||
}
|
@ -1,4 +1,5 @@
|
||||
using NetAdmin.Domain.Attributes.DataValidation;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
using NetAdmin.Domain.Enums.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.VerifyCode;
|
||||
@ -8,11 +9,11 @@ namespace NetAdmin.Domain.Dto.Sys.VerifyCode;
|
||||
/// </summary>
|
||||
public record VerifySmsCodeReq : VerifyCodeReq
|
||||
{
|
||||
/// <inheritdoc />
|
||||
/// <inheritdoc cref="Sys_VerifyCode.DestDevice" />
|
||||
[Mobile]
|
||||
public override string DestDevice { get; init; }
|
||||
|
||||
/// <inheritdoc />
|
||||
/// <inheritdoc cref="Sys_VerifyCode.DeviceType" />
|
||||
[JsonIgnore]
|
||||
public override VerifyCodeDeviceTypes DeviceType { get; init; } = VerifyCodeDeviceTypes.Mobile;
|
||||
}
|
Reference in New Issue
Block a user