mirror of
https://github.com/nsnail/NetAdmin.git
synced 2025-06-21 03:08:16 +08:00
wip: 🧠 初步的框架
This commit is contained in:
@ -0,0 +1,20 @@
|
||||
using NetAdmin.Application.Modules;
|
||||
using NetAdmin.Domain.Dto.Dependency;
|
||||
using NetAdmin.Domain.Dto.Sys.Api;
|
||||
|
||||
namespace NetAdmin.SysComponent.Application.Modules.Sys;
|
||||
|
||||
/// <summary>
|
||||
/// 接口模块
|
||||
/// </summary>
|
||||
public interface IApiModule : ICrudModule<CreateApiReq, QueryApiRsp // 创建类型
|
||||
, QueryApiReq, QueryApiRsp // 查询类型
|
||||
, NopReq, NopReq // 修改类型
|
||||
, DelReq // 删除类型
|
||||
>
|
||||
{
|
||||
/// <summary>
|
||||
/// 同步接口
|
||||
/// </summary>
|
||||
Task SyncAsync();
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
using NetAdmin.Domain.Dto.Dependency;
|
||||
using NetAdmin.Domain.Dto.Sys.Cache;
|
||||
|
||||
namespace NetAdmin.SysComponent.Application.Modules.Sys;
|
||||
|
||||
/// <summary>
|
||||
/// 缓存模块
|
||||
/// </summary>
|
||||
public interface ICacheModule
|
||||
{
|
||||
/// <summary>
|
||||
/// 缓存统计
|
||||
/// </summary>
|
||||
Task<CacheStatisticsRsp> CacheStatisticsAsync();
|
||||
|
||||
/// <summary>
|
||||
/// 获取所有缓存项
|
||||
/// </summary>
|
||||
PagedQueryRsp<GetAllEntriesRsp> GetAllEntries(PagedQueryReq<GetAllEntriesReq> req);
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
using NetAdmin.Domain.Dto.Sys.Captcha;
|
||||
|
||||
namespace NetAdmin.SysComponent.Application.Modules.Sys;
|
||||
|
||||
/// <summary>
|
||||
/// 人机验证模块
|
||||
/// </summary>
|
||||
public interface ICaptchaModule
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取人机校验图
|
||||
/// </summary>
|
||||
Task<GetCaptchaRsp> GetCaptchaImageAsync();
|
||||
|
||||
/// <summary>
|
||||
/// 完成人机校验
|
||||
/// </summary>
|
||||
Task<bool> VerifyCaptchaAsync(VerifyCaptchaReq req);
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
using NetAdmin.Application.Modules;
|
||||
using NetAdmin.Domain.Dto.Dependency;
|
||||
using NetAdmin.Domain.Dto.Sys.Config;
|
||||
|
||||
namespace NetAdmin.SysComponent.Application.Modules.Sys;
|
||||
|
||||
/// <summary>
|
||||
/// 配置模块
|
||||
/// </summary>
|
||||
public interface IConfigModule : ICrudModule<CreateConfigReq, QueryConfigRsp // 创建类型
|
||||
, QueryConfigReq, QueryConfigRsp // 查询类型
|
||||
, UpdateConfigReq, QueryConfigRsp // 修改类型
|
||||
, DelReq // 删除类型
|
||||
>
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取最新有效配置
|
||||
/// </summary>
|
||||
Task<QueryConfigRsp> GetLatestConfigAsync();
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
namespace NetAdmin.SysComponent.Application.Modules.Sys;
|
||||
|
||||
/// <summary>
|
||||
/// 常量模块
|
||||
/// </summary>
|
||||
public interface IConstantModule
|
||||
{
|
||||
/// <summary>
|
||||
/// 获得常量字符串
|
||||
/// </summary>
|
||||
IDictionary<string, string> GetCharsDic();
|
||||
|
||||
/// <summary>
|
||||
/// 获得公共枚举值
|
||||
/// </summary>
|
||||
IDictionary<string, Dictionary<string, string[]>> GetEnums();
|
||||
|
||||
/// <summary>
|
||||
/// 获得本地化字符串
|
||||
/// </summary>
|
||||
IDictionary<string, string> GetLocalizedStrings();
|
||||
|
||||
/// <summary>
|
||||
/// 获得数字常量表
|
||||
/// </summary>
|
||||
IDictionary<string, long> GetNumbersDic();
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
using NetAdmin.Application.Modules;
|
||||
using NetAdmin.Domain.Dto.Dependency;
|
||||
using NetAdmin.Domain.Dto.Sys.Dept;
|
||||
|
||||
namespace NetAdmin.SysComponent.Application.Modules.Sys;
|
||||
|
||||
/// <summary>
|
||||
/// 部门模块
|
||||
/// </summary>
|
||||
public interface IDeptModule : ICrudModule<CreateDeptReq, QueryDeptRsp // 创建类型
|
||||
, QueryDeptReq, QueryDeptRsp // 查询类型
|
||||
, UpdateDeptReq, QueryDeptRsp // 修改类型
|
||||
, DelReq // 删除类型
|
||||
> { }
|
@ -0,0 +1,24 @@
|
||||
using NetAdmin.Domain.Dto.Sys.Dev;
|
||||
|
||||
namespace NetAdmin.SysComponent.Application.Modules.Sys;
|
||||
|
||||
/// <summary>
|
||||
/// 开发模块
|
||||
/// </summary>
|
||||
public interface IDevModule
|
||||
{
|
||||
/// <summary>
|
||||
/// 生成后端代码
|
||||
/// </summary>
|
||||
Task GenerateCsCodeAsync(GenerateCsCodeReq req);
|
||||
|
||||
/// <summary>
|
||||
/// 生成图标代码
|
||||
/// </summary>
|
||||
Task GenerateIconCodeAsync(GenerateIconCodeReq req);
|
||||
|
||||
/// <summary>
|
||||
/// 生成接口代码
|
||||
/// </summary>
|
||||
Task GenerateJsCodeAsync();
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
using NetAdmin.Application.Modules;
|
||||
using NetAdmin.Domain.Dto.Dependency;
|
||||
using NetAdmin.Domain.Dto.Sys.Dic.Catalog;
|
||||
|
||||
namespace NetAdmin.SysComponent.Application.Modules.Sys;
|
||||
|
||||
/// <summary>
|
||||
/// 字典目录模块
|
||||
/// </summary>
|
||||
public interface IDicCatalogModule : ICrudModule<CreateDicCatalogReq, QueryDicCatalogRsp // 创建类型
|
||||
, QueryDicCatalogReq, QueryDicCatalogRsp // 查询类型
|
||||
, UpdateDicCatalogReq, QueryDicCatalogRsp // 修改类型
|
||||
, DelReq // 删除类型
|
||||
> { }
|
@ -0,0 +1,14 @@
|
||||
using NetAdmin.Application.Modules;
|
||||
using NetAdmin.Domain.Dto.Dependency;
|
||||
using NetAdmin.Domain.Dto.Sys.Dic.Content;
|
||||
|
||||
namespace NetAdmin.SysComponent.Application.Modules.Sys;
|
||||
|
||||
/// <summary>
|
||||
/// 字典内容模块
|
||||
/// </summary>
|
||||
public interface IDicContentModule : ICrudModule<CreateDicContentReq, QueryDicContentRsp // 创建类型
|
||||
, QueryDicContentReq, QueryDicContentRsp // 查询类型
|
||||
, UpdateDicContentReq, QueryDicContentRsp // 修改类型
|
||||
, DelReq // 删除类型
|
||||
> { }
|
@ -0,0 +1,71 @@
|
||||
using NetAdmin.Domain.Dto.Dependency;
|
||||
using NetAdmin.Domain.Dto.Sys.Dic.Catalog;
|
||||
using NetAdmin.Domain.Dto.Sys.Dic.Content;
|
||||
|
||||
namespace NetAdmin.SysComponent.Application.Modules.Sys;
|
||||
|
||||
/// <summary>
|
||||
/// 字典模块
|
||||
/// </summary>
|
||||
public interface IDicModule
|
||||
{
|
||||
/// <summary>
|
||||
/// 批量删除字典目录
|
||||
/// </summary>
|
||||
Task<int> BulkDeleteCatalogAsync(BulkReq<DelReq> req);
|
||||
|
||||
/// <summary>
|
||||
/// 批量删除字典内容
|
||||
/// </summary>
|
||||
Task<int> BulkDeleteContentAsync(BulkReq<DelReq> req);
|
||||
|
||||
/// <summary>
|
||||
/// 创建字典目录
|
||||
/// </summary>
|
||||
Task<QueryDicCatalogRsp> CreateCatalogAsync(CreateDicCatalogReq req);
|
||||
|
||||
/// <summary>
|
||||
/// 创建字典内容
|
||||
/// </summary>
|
||||
Task<QueryDicContentRsp> CreateContentAsync(CreateDicContentReq req);
|
||||
|
||||
/// <summary>
|
||||
/// 删除字典目录
|
||||
/// </summary>
|
||||
Task<int> DeleteCatalogAsync(DelReq req);
|
||||
|
||||
/// <summary>
|
||||
/// 删除字典内容
|
||||
/// </summary>
|
||||
Task<int> DeleteContentAsync(DelReq req);
|
||||
|
||||
/// <summary>
|
||||
/// 分页查询字典目录
|
||||
/// </summary>
|
||||
Task<PagedQueryRsp<QueryDicCatalogRsp>> PagedQueryCatalogAsync(PagedQueryReq<QueryDicCatalogReq> req);
|
||||
|
||||
/// <summary>
|
||||
/// 分页查询字典内容
|
||||
/// </summary>
|
||||
Task<PagedQueryRsp<QueryDicContentRsp>> PagedQueryContentAsync(PagedQueryReq<QueryDicContentReq> req);
|
||||
|
||||
/// <summary>
|
||||
/// 查询字典目录
|
||||
/// </summary>
|
||||
Task<IEnumerable<QueryDicCatalogRsp>> QueryCatalogAsync(QueryReq<QueryDicCatalogReq> req);
|
||||
|
||||
/// <summary>
|
||||
/// 查询字典内容
|
||||
/// </summary>
|
||||
Task<IEnumerable<QueryDicContentRsp>> QueryContentAsync(QueryReq<QueryDicContentReq> req);
|
||||
|
||||
/// <summary>
|
||||
/// 更新字典目录
|
||||
/// </summary>
|
||||
Task<QueryDicCatalogRsp> UpdateCatalogAsync(UpdateDicCatalogReq req);
|
||||
|
||||
/// <summary>
|
||||
/// 更新字典内容
|
||||
/// </summary>
|
||||
Task<QueryDicContentRsp> UpdateContentAsync(UpdateDicContentReq req);
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
namespace NetAdmin.SysComponent.Application.Modules.Sys;
|
||||
|
||||
/// <summary>
|
||||
/// 文件模块
|
||||
/// </summary>
|
||||
public interface IFileModule
|
||||
{
|
||||
/// <summary>
|
||||
/// 文件上传
|
||||
/// </summary>
|
||||
Task<string> UploadAsync(IFormFile file);
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
using NetAdmin.Application.Modules;
|
||||
using NetAdmin.Domain.Dto.Dependency;
|
||||
using NetAdmin.Domain.Dto.Sys.Menu;
|
||||
|
||||
namespace NetAdmin.SysComponent.Application.Modules.Sys;
|
||||
|
||||
/// <summary>
|
||||
/// 菜单模块
|
||||
/// </summary>
|
||||
public interface IMenuModule : ICrudModule<CreateMenuReq, QueryMenuRsp // 创建类型
|
||||
, QueryMenuReq, QueryMenuRsp // 查询类型
|
||||
, UpdateMenuReq, QueryMenuRsp // 修改类型
|
||||
, DelReq // 删除类型
|
||||
>
|
||||
{
|
||||
/// <summary>
|
||||
/// 当前用户菜单
|
||||
/// </summary>
|
||||
Task<IEnumerable<QueryMenuRsp>> UserMenusAsync();
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
using NetAdmin.Application.Modules;
|
||||
using NetAdmin.Domain.Dto.Dependency;
|
||||
using NetAdmin.Domain.Dto.Sys.RequestLog;
|
||||
|
||||
namespace NetAdmin.SysComponent.Application.Modules.Sys;
|
||||
|
||||
/// <summary>
|
||||
/// 请求日志模块
|
||||
/// </summary>
|
||||
public interface IRequestLogModule : ICrudModule<CreateRequestLogReq, QueryRequestLogRsp // 创建类型
|
||||
, QueryRequestLogReq, QueryRequestLogRsp // 查询类型
|
||||
, NopReq, NopReq // 修改类型
|
||||
, DelReq // 删除类型
|
||||
> { }
|
@ -0,0 +1,14 @@
|
||||
using NetAdmin.Application.Modules;
|
||||
using NetAdmin.Domain.Dto.Dependency;
|
||||
using NetAdmin.Domain.Dto.Sys.Role;
|
||||
|
||||
namespace NetAdmin.SysComponent.Application.Modules.Sys;
|
||||
|
||||
/// <summary>
|
||||
/// 角色模块
|
||||
/// </summary>
|
||||
public interface IRoleModule : ICrudModule<CreateRoleReq, QueryRoleRsp // 创建类型
|
||||
, QueryRoleReq, QueryRoleRsp // 查询类型
|
||||
, UpdateRoleReq, QueryRoleRsp // 修改类型
|
||||
, DelReq // 删除类型
|
||||
> { }
|
@ -0,0 +1,17 @@
|
||||
namespace NetAdmin.SysComponent.Application.Modules.Sys;
|
||||
|
||||
/// <summary>
|
||||
/// 工具模块
|
||||
/// </summary>
|
||||
public interface IToolsModule
|
||||
{
|
||||
/// <summary>
|
||||
/// 服务器时间
|
||||
/// </summary>
|
||||
DateTime GetServerUtcTime();
|
||||
|
||||
/// <summary>
|
||||
/// 版本信息
|
||||
/// </summary>
|
||||
string Version();
|
||||
}
|
@ -0,0 +1,76 @@
|
||||
using NetAdmin.Application.Modules;
|
||||
using NetAdmin.Domain.Dto.Dependency;
|
||||
using NetAdmin.Domain.Dto.Sys.User;
|
||||
using NetAdmin.Domain.Dto.Sys.UserProfile;
|
||||
|
||||
namespace NetAdmin.SysComponent.Application.Modules.Sys;
|
||||
|
||||
/// <summary>
|
||||
/// 用户模块
|
||||
/// </summary>
|
||||
public interface IUserModule : ICrudModule<CreateUserReq, QueryUserRsp // 创建类型
|
||||
, QueryUserReq, QueryUserRsp // 查询类型
|
||||
, UpdateUserReq, QueryUserRsp // 修改类型
|
||||
, DelReq // 删除类型
|
||||
>
|
||||
{
|
||||
/// <summary>
|
||||
/// 检查手机号是否可用
|
||||
/// </summary>
|
||||
Task<bool> CheckMobileAvailableAsync(CheckMobileAvailableReq req);
|
||||
|
||||
/// <summary>
|
||||
/// 检查用户名是否可用
|
||||
/// </summary>
|
||||
Task<bool> CheckUserNameAvailableAsync(CheckUserNameAvailableReq req);
|
||||
|
||||
/// <summary>
|
||||
/// 密码登录
|
||||
/// </summary>
|
||||
Task<LoginRsp> LoginByPwdAsync(LoginByPwdReq req);
|
||||
|
||||
/// <summary>
|
||||
/// 短信登录
|
||||
/// </summary>
|
||||
Task<LoginRsp> LoginBySmsAsync(LoginBySmsReq req);
|
||||
|
||||
/// <summary>
|
||||
/// 查询用户档案
|
||||
/// </summary>
|
||||
Task<IEnumerable<QueryUserProfileRsp>> QueryProfileAsync(QueryReq<QueryUserProfileReq> req);
|
||||
|
||||
/// <summary>
|
||||
/// 注册用户
|
||||
/// </summary>
|
||||
Task<UserInfoRsp> RegisterAsync(RegisterUserReq req);
|
||||
|
||||
/// <summary>
|
||||
/// 重设密码
|
||||
/// </summary>
|
||||
Task<uint> ResetPasswordAsync(ResetPasswordReq req);
|
||||
|
||||
/// <summary>
|
||||
/// 设置用户头像
|
||||
/// </summary>
|
||||
Task<UserInfoRsp> SetAvatarAsync(SetAvatarReq req);
|
||||
|
||||
/// <summary>
|
||||
/// 设置邮箱
|
||||
/// </summary>
|
||||
Task<UserInfoRsp> SetEmailAsync(SetEmailReq req);
|
||||
|
||||
/// <summary>
|
||||
/// 设置手机号
|
||||
/// </summary>
|
||||
Task<UserInfoRsp> SetMobileAsync(SetMobileReq req);
|
||||
|
||||
/// <summary>
|
||||
/// 设置密码
|
||||
/// </summary>
|
||||
Task<uint> SetPasswordAsync(SetPasswordReq req);
|
||||
|
||||
/// <summary>
|
||||
/// 当前用户信息
|
||||
/// </summary>
|
||||
Task<UserInfoRsp> UserInfoAsync();
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
using NetAdmin.Application.Modules;
|
||||
using NetAdmin.Domain.Dto.Dependency;
|
||||
using NetAdmin.Domain.Dto.Sys.UserProfile;
|
||||
|
||||
namespace NetAdmin.SysComponent.Application.Modules.Sys;
|
||||
|
||||
/// <summary>
|
||||
/// 用户档案模块
|
||||
/// </summary>
|
||||
public interface IUserProfileModule : ICrudModule<CreateUserProfileReq, QueryUserProfileRsp // 创建类型
|
||||
, QueryUserProfileReq, QueryUserProfileRsp // 查询类型
|
||||
, UpdateUserProfileReq, QueryUserProfileRsp // 修改类型
|
||||
, DelReq // 删除类型
|
||||
> { }
|
@ -0,0 +1,28 @@
|
||||
using NetAdmin.Application.Modules;
|
||||
using NetAdmin.Domain.Dto.Dependency;
|
||||
using NetAdmin.Domain.Dto.Sys.VerifyCode;
|
||||
|
||||
namespace NetAdmin.SysComponent.Application.Modules.Sys;
|
||||
|
||||
/// <summary>
|
||||
/// 验证码模块
|
||||
/// </summary>
|
||||
public interface IVerifyCodeModule : ICrudModule<CreateVerifyCodeReq, QueryVerifyCodeRsp // 创建类型
|
||||
, QueryVerifyCodeReq, QueryVerifyCodeRsp // 查询类型
|
||||
, UpdateVerifyCodeReq, QueryVerifyCodeRsp // 修改类型
|
||||
, DelReq // 删除类型
|
||||
>
|
||||
{
|
||||
/// <summary>
|
||||
/// 发送验证码
|
||||
/// </summary>
|
||||
Task<SendVerifyCodeRsp> SendVerifyCodeAsync(SendVerifyCodeReq req);
|
||||
|
||||
/// <summary>
|
||||
/// 完成验证
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 对于验证失败的,不主动删除缓存,通过防火墙来应对暴力破解
|
||||
/// </remarks>
|
||||
Task<bool> VerifyAsync(VerifyCodeReq req);
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
using NetAdmin.Application.Modules;
|
||||
using NetAdmin.Domain.Dto.Dependency;
|
||||
using NetAdmin.Domain.Dto.Tpl.Example;
|
||||
|
||||
namespace NetAdmin.SysComponent.Application.Modules.Tpl;
|
||||
|
||||
/// <summary>
|
||||
/// 示例模块
|
||||
/// </summary>
|
||||
public interface IExampleModule : ICrudModule<CreateExampleReq, QueryExampleRsp // 创建类型
|
||||
, QueryExampleReq, QueryExampleRsp // 查询类型
|
||||
, UpdateExampleReq, QueryExampleRsp // 修改类型
|
||||
, DelReq // 删除类型
|
||||
> { }
|
Reference in New Issue
Block a user