mirror of
https://github.com/nsnail/NetAdmin.git
synced 2025-08-03 02:18:00 +08:00
Compare commits
38 Commits
Author | SHA1 | Date | |
---|---|---|---|
8a29640aeb | |||
8bc8aa960c | |||
d00f0d2d9c | |||
1442e0a37c | |||
6100e9e9c8 | |||
ae2d1c4932 | |||
366a26a5cd | |||
8b53f66331 | |||
705d027da4 | |||
a3ab97019d | |||
608a1ded5c | |||
366ca0d237 | |||
56b111b1cf | |||
f5bd69ef60 | |||
ddf891e3bc | |||
7ae473d492 | |||
c20a6c369d | |||
57b71e1354 | |||
127f6e9f6c | |||
d1951dbcb5 | |||
5edcf63e24 | |||
b01b8b24ba | |||
d9c7085472 | |||
a01acddb9c | |||
e5208cd751 | |||
dc326c324c | |||
e0d15f8039 | |||
169ab08b88 | |||
3b8336105a | |||
7214a22ea5 | |||
3152a8d3e8 | |||
40e8eff5f3 | |||
47e67dd503 | |||
903ea1820a | |||
c08ea62064 | |||
4860299959 | |||
72f9d1a3ec | |||
98718a010c |
52
CHANGELOG.md
52
CHANGELOG.md
@ -2,33 +2,47 @@
|
||||
|
||||
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
||||
|
||||
### [1.1.1](https://github.com/nsnail/NetAdmin/compare/v1.0.0...v1.1.1) (2024-04-29)
|
||||
## [1.3.0](https://github.com/nsnail/NetAdmin/compare/v1.2.0...v1.3.0) (2024-06-24)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* ✨ 版本更新日志组件 ([#96](https://github.com/nsnail/NetAdmin/issues/96)) ([a37acc4](https://github.com/nsnail/NetAdmin/commit/a37acc4b55c91d57d51c7fa079da8700530412a5))
|
||||
* ✨ 计划作业 ([#87](https://github.com/nsnail/NetAdmin/issues/87)) ([8293ec0](https://github.com/nsnail/NetAdmin/commit/8293ec0297875ebc9ad75cce9465bd587929c0bf))
|
||||
* ✨ 计划作业执行记录 ([#89](https://github.com/nsnail/NetAdmin/issues/89)) ([6f89015](https://github.com/nsnail/NetAdmin/commit/6f890151989ad733e35653933b7597eec478cc3b))
|
||||
* ✨ 将数据库结构同步和种子数据初始化作为命令行开关 ([#78](https://github.com/nsnail/NetAdmin/issues/78)) ([05ed3d3](https://github.com/nsnail/NetAdmin/commit/05ed3d3746aa274a0f88f7afadfea12a3c8a80ff))
|
||||
* ✨ 快捷启用/禁用用户 ([#91](https://github.com/nsnail/NetAdmin/issues/91)) ([6c2d167](https://github.com/nsnail/NetAdmin/commit/6c2d1676e45b9f1ecf3be3ae5a172db49b62a81d))
|
||||
* ✨ 前端表格高级筛选 ([#100](https://github.com/nsnail/NetAdmin/issues/100)) ([3847d6f](https://github.com/nsnail/NetAdmin/commit/3847d6fdbbd27efb53921bcc8374157f0da47155))
|
||||
* ✨ 日志管理独立出来、增加登录日志界面 ([#65](https://github.com/nsnail/NetAdmin/issues/65)) ([9134c4f](https://github.com/nsnail/NetAdmin/commit/9134c4fe01165a87ebc7e2cbd0a2abff3c9fb3ea))
|
||||
* ✨ 首页仪表面板 ([#103](https://github.com/nsnail/NetAdmin/issues/103)) ([149e1af](https://github.com/nsnail/NetAdmin/commit/149e1afa533b142a3666a325ec84a091d53c1840))
|
||||
* ✨ cron表达式选择器 ([#92](https://github.com/nsnail/NetAdmin/issues/92)) ([bde9fb1](https://github.com/nsnail/NetAdmin/commit/bde9fb1ea264bd0b786ac68d590691892d7ce067))
|
||||
* ✨ 补充多语种文件 ([#146](https://github.com/nsnail/NetAdmin/issues/146)) ([1442e0a](https://github.com/nsnail/NetAdmin/commit/1442e0a37cb2f27d8ba7b77bed91feaa5d7b1fdd))
|
||||
* ✨ 更新实体增加sql过滤参数 ([#140](https://github.com/nsnail/NetAdmin/issues/140)) ([a3ab970](https://github.com/nsnail/NetAdmin/commit/a3ab97019dd1fc2267db987ade80fa6749e24e4d))
|
||||
* ✨ 框架代码同步 ([#139](https://github.com/nsnail/NetAdmin/issues/139)) ([608a1de](https://github.com/nsnail/NetAdmin/commit/608a1ded5c0e9987161444efd48597a687c693e1))
|
||||
* ✨ 框架代码同步 ([#144](https://github.com/nsnail/NetAdmin/issues/144)) ([ae2d1c4](https://github.com/nsnail/NetAdmin/commit/ae2d1c4932bf1229ea36d28d486beaee8de16d53))
|
||||
* ✨ 框架代码同步 ([#148](https://github.com/nsnail/NetAdmin/issues/148)) ([8bc8aa9](https://github.com/nsnail/NetAdmin/commit/8bc8aa960cdd1ed5036927bd508fce4c218618c7))
|
||||
* ✨ 前端版本更新器 ([#145](https://github.com/nsnail/NetAdmin/issues/145)) ([6100e9e](https://github.com/nsnail/NetAdmin/commit/6100e9e9c88005d6a2f3c2706ca750a6ad62d2c7))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 🐛 'Numbers' does not contain a definition for 'CACHE_SECS_DEFAULT' ([#102](https://github.com/nsnail/NetAdmin/issues/102)) ([8f69c29](https://github.com/nsnail/NetAdmin/commit/8f69c2907be282b1b39f4a179badb11502aa2403))
|
||||
* 🐛 低版本jetbrains.resharper.globaltools搞乱了代码 ([#97](https://github.com/nsnail/NetAdmin/issues/97)) ([c117ddf](https://github.com/nsnail/NetAdmin/commit/c117ddfe7a433215b3449cdd6b19318a1f3cbf37))
|
||||
* 🐛 前端样式问题 ([#84](https://github.com/nsnail/NetAdmin/issues/84)) ([6615df3](https://github.com/nsnail/NetAdmin/commit/6615df339934f6d19880c9822b44d5305c2f2a75))
|
||||
* 🐛 请求日志客户端IP显示不正确 ([#60](https://github.com/nsnail/NetAdmin/issues/60)) ([ec698ce](https://github.com/nsnail/NetAdmin/commit/ec698ce4db49861eaaeb8bf5080764939e6d7231))
|
||||
* 🐛 时区问题 ([#107](https://github.com/nsnail/NetAdmin/issues/107)) ([59c85ce](https://github.com/nsnail/NetAdmin/commit/59c85cef217c121b36d52993b6b5a774fe22df9e))
|
||||
* 🐛 小问题 ([#76](https://github.com/nsnail/NetAdmin/issues/76)) ([52ddf27](https://github.com/nsnail/NetAdmin/commit/52ddf273c856d8f7e363ce23e5886b9eedf4604f))
|
||||
* 🐛 在弹窗界面中引用的列表组件,点击重置搜索条件按钮时,会关闭弹窗的bug ([#95](https://github.com/nsnail/NetAdmin/issues/95)) ([8fee14c](https://github.com/nsnail/NetAdmin/commit/8fee14cd6ebd86456956fc59bbb61c545faa1fdd))
|
||||
* 🐛 tinymce editor css 加载路径错误 ([#93](https://github.com/nsnail/NetAdmin/issues/93)) ([5fe7387](https://github.com/nsnail/NetAdmin/commit/5fe73878a2a53dc5e7e2dcbcbf22f91ffb4376dd))
|
||||
* 🐛 tinymce editor css 加载路径错误 ([#94](https://github.com/nsnail/NetAdmin/issues/94)) ([802251e](https://github.com/nsnail/NetAdmin/commit/802251e42347bfe4fa0bcb4867b615d7c03abf19))
|
||||
* 🐛 补充多语种文件 ([#147](https://github.com/nsnail/NetAdmin/issues/147)) ([d00f0d2](https://github.com/nsnail/NetAdmin/commit/d00f0d2d9cc2243908a8b6979b9c4a5811b2a57e))
|
||||
* 🐛 操作日志不显示userName ([#141](https://github.com/nsnail/NetAdmin/issues/141)) ([705d027](https://github.com/nsnail/NetAdmin/commit/705d027da44af159d29db9c93e47b549317c793e))
|
||||
|
||||
## [1.2.0](https://github.com/nsnail/NetAdmin/compare/v1.1.1...v1.2.0) (2024-06-06)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* ✨ 计划作业-上次执行耗时 ([#133](https://github.com/nsnail/NetAdmin/issues/133)) ([57b71e1](https://github.com/nsnail/NetAdmin/commit/57b71e1354ab8b0be995b5f563dd8c3fb7965d5f))
|
||||
* ✨ 框架代码同步 ([#129](https://github.com/nsnail/NetAdmin/issues/129)) ([b01b8b2](https://github.com/nsnail/NetAdmin/commit/b01b8b24ba574c08ba5605e103ff2ccf15e5830a))
|
||||
* ✨ 框架代码同步 ([#130](https://github.com/nsnail/NetAdmin/issues/130)) ([5edcf63](https://github.com/nsnail/NetAdmin/commit/5edcf63e24f6b13f5515e01ee8cf120b1a814d40))
|
||||
* ✨ 默认头像根据用户名绘制svg ([#132](https://github.com/nsnail/NetAdmin/issues/132)) ([127f6e9](https://github.com/nsnail/NetAdmin/commit/127f6e9f6c8c12974e5340e9697281250737bed3))
|
||||
* ✨ 手动执行计划作业 ([#122](https://github.com/nsnail/NetAdmin/issues/122)) ([3b83361](https://github.com/nsnail/NetAdmin/commit/3b8336105a908ba6bc300bec6ac4f49747ea66e9))
|
||||
* ✨ 增强作业执行记录页面 ([#135](https://github.com/nsnail/NetAdmin/issues/135)) ([7ae473d](https://github.com/nsnail/NetAdmin/commit/7ae473d492b9ba60cbb1c355894917d14f5ffa8f))
|
||||
* ✨ naColId组件 ([#118](https://github.com/nsnail/NetAdmin/issues/118)) ([47e67dd](https://github.com/nsnail/NetAdmin/commit/47e67dd503dd0ba6818e8b798e41c62420363f58))
|
||||
* **frontend:** ✨ 手机端分页控件显示总条数 ([#124](https://github.com/nsnail/NetAdmin/issues/124)) ([e0d15f8](https://github.com/nsnail/NetAdmin/commit/e0d15f8039a74a9826a0395983960ab620308899))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 🐛 字段顺序 ([#131](https://github.com/nsnail/NetAdmin/issues/131)) ([d1951db](https://github.com/nsnail/NetAdmin/commit/d1951dbcb5fa50a7ff308f6b6d554da5f791bcf2))
|
||||
* 🐛 字段长度 ([#134](https://github.com/nsnail/NetAdmin/issues/134)) ([c20a6c3](https://github.com/nsnail/NetAdmin/commit/c20a6c369d7b6d6dcfd07b3f3eaeab0fa309e766))
|
||||
* 🐛 take count ([c08ea62](https://github.com/nsnail/NetAdmin/commit/c08ea62064cc522d7cca9c90a5f15f23d833b6e3))
|
||||
* **backend:** 🐛 更新计划作业在sqlite数据库环境报错 ([#120](https://github.com/nsnail/NetAdmin/issues/120)) ([3152a8d](https://github.com/nsnail/NetAdmin/commit/3152a8d3e8054524470883c336fb6e93903a8426))
|
||||
|
||||
### [1.1.1](https://github.com/nsnail/NetAdmin/compare/v1.1.0...v1.1.1) (2024-04-29)
|
||||
|
||||
## [1.1.0](https://github.com/nsnail/NetAdmin/compare/v1.0.0...v1.1.0) (2024-04-29)
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:9.0.0-preview.3 AS base
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:9.0.0-preview.5 AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 8080
|
||||
RUN apt update
|
||||
|
78
README.md
78
README.md
@ -2,7 +2,7 @@
|
||||
|
||||
通用后台权限管理系统、快速开发框架(基于C#12/.NET9、Vue3/Vite、Element Plus等现代技术构建,具有十分整洁、优雅的编码规范)
|
||||
|
||||
[](https://github.com/nsnail/NetAdmin/actions/workflows/ci.yml)
|
||||
[](https://github.com/nsnail/NetAdmin/actions/workflows/nightly-build.yml)
|
||||
[](https://github.com/nsnail/NetAdmin/blob/main/LICENSE)
|
||||
[](https://github.com/nsnail/NetAdmin/blob/main/LICENSE)
|
||||
[](https://github.com/nsnail/NetAdmin/blob/main/LICENSE)
|
||||
@ -19,64 +19,46 @@ docker run -p 8080:8080 nsnail/netadmin
|
||||
|
||||
## 构建步骤
|
||||
|
||||
- 后端
|
||||
1. 检查dotnet-sdk版本>=9.0.0
|
||||
``` shell
|
||||
dotnet --list-sdks
|
||||
```shell
|
||||
# 1. 检查 dotnet sdk 版本 >=9.0.0
|
||||
dotnet --list-sdks
|
||||
# 下载 dotnet:https://dotnet.microsoft.com/zh-cn/download/dotnet
|
||||
|
||||
# 下载 dotnet https://dotnet.microsoft.com/zh-cn/download/dotnet
|
||||
```
|
||||
2. 克隆代码仓库
|
||||
``` shell
|
||||
git clone https://github.com/nsnail/NetAdmin.git
|
||||
cd ./NetAdmin
|
||||
# 2. 克隆代码仓库
|
||||
git clone https://github.com/nsnail/NetAdmin.git && cd ./NetAdmin
|
||||
|
||||
# 下载 git https://git-scm.com/downloads
|
||||
```
|
||||
3. 确保本机redis处于运行状态
|
||||
``` shell
|
||||
redis-cli
|
||||
# 3. 检查本机 redis 运行状态
|
||||
redis-cli dbsize
|
||||
# 下载 redis for windows:https://github.com/redis-windows/redis-windows/releases
|
||||
# 下载 redis for linux/mac:https://redis.io/download
|
||||
|
||||
# 下载 redis for windows https://github.com/redis-windows/redis-windows/releases
|
||||
# 下载 redis for linux/mac https://redis.io/download
|
||||
```
|
||||
4. 运行后端WebApi
|
||||
``` shell
|
||||
dotnet run --project ./src/backend/NetAdmin.AdmServer.Host/NetAdmin.AdmServer.Host.csproj --urls http://[::]:5010 -is
|
||||
```
|
||||
5. 体验WebApi程序
|
||||
- 浏览器打开 http://localhost:5010 ,将看到Swagger(Knife4jUI)界面
|
||||
# 4. 运行后端 WebApi
|
||||
dotnet run --project ./src/backend/NetAdmin.AdmServer.Host/NetAdmin.AdmServer.Host.csproj --urls http://[::]:5010 -is
|
||||
# 浏览器打开 http://localhost:5010 ,将看到Swagger(Knife4jUI)界面
|
||||
|
||||
---
|
||||
# 5. 检查 nodejs 版本 >=20
|
||||
node -v
|
||||
# 下载 nodejs:https://nodejs.org/en/download
|
||||
|
||||
- 前端
|
||||
1. 检查nodejs版本>=20
|
||||
``` shell
|
||||
node -v
|
||||
# 6. 安装 npm 依赖包
|
||||
cd ./src/frontend/admin && npm install
|
||||
|
||||
# 下载 nodejs https://nodejs.org/en/download
|
||||
```
|
||||
2. 安装npm依赖包
|
||||
``` shell
|
||||
cd ./src/frontend/admin
|
||||
npm install
|
||||
```
|
||||
3. 运行前端项目
|
||||
``` shell
|
||||
npm run dev
|
||||
```
|
||||
4. 体验前端程序
|
||||
- 浏览器打开 http://localhost:5020 ,将看到管理界面(默认用户名:root,密码:1234qwer)
|
||||
# 7. 运行前端项目
|
||||
npm run dev
|
||||
# 浏览器打开 http://localhost:5020 ,将看到管理界面(默认用户名:root,密码:1234qwer)
|
||||
```
|
||||
|
||||
## 文件目录树
|
||||
|
||||
```
|
||||
+---.template.config # dotnet 项目模板配置目录
|
||||
+---assets # 程序运行需要的资源文件目录
|
||||
+---dist # 程序编译与分发的二进制文件目录
|
||||
+---docs # 项目文档目录
|
||||
+---refs # 引用的第三方项目仓库目录
|
||||
+---src # 项目源文件目录
|
||||
+---assets # 项目资源文件目录
|
||||
+---build # 构建相关的工程文件目录
|
||||
+---dist # 编译生成的二进制文件目录
|
||||
+---docs # 项目开发文档目录
|
||||
+---refs # 引用的第三方包的仓库目录
|
||||
+---scripts # 各种工具脚本文件目录
|
||||
+---src # 项目源码文件目录
|
||||
```
|
||||
|
||||
## 后端项目架构
|
||||
|
@ -4,7 +4,6 @@
|
||||
不包含
|
||||
不排序
|
||||
不等于
|
||||
管理模块
|
||||
丧偶
|
||||
中专
|
||||
中共党员
|
||||
@ -26,6 +25,7 @@
|
||||
发送失败
|
||||
同步数据库结构
|
||||
外国人居留证
|
||||
外部错误
|
||||
大专
|
||||
大于
|
||||
大于等于
|
||||
@ -39,7 +39,6 @@
|
||||
已校验
|
||||
已读
|
||||
并且
|
||||
意外错误
|
||||
成功
|
||||
或者
|
||||
手机
|
||||
@ -50,6 +49,7 @@
|
||||
无效操作
|
||||
无效输入
|
||||
日期范围
|
||||
未处理异常
|
||||
未婚
|
||||
未读
|
||||
本人数据
|
||||
@ -65,18 +65,18 @@
|
||||
登录
|
||||
硕士
|
||||
离异
|
||||
私信
|
||||
空闲
|
||||
等于
|
||||
等待发送
|
||||
管理模块
|
||||
系统模块
|
||||
绑定手机号
|
||||
绑定手机号码
|
||||
结果非预期
|
||||
群众
|
||||
自定义
|
||||
范围
|
||||
菜单
|
||||
解绑手机号
|
||||
解绑手机号码
|
||||
警告
|
||||
调试
|
||||
跟踪
|
@ -23,6 +23,7 @@ XML注释文件不存在
|
||||
学历不正确
|
||||
密码不能为空
|
||||
已处理完毕
|
||||
并发冲突_请稍后重试
|
||||
开始事务
|
||||
性别不正确
|
||||
手机号码不正确
|
||||
@ -33,18 +34,15 @@ XML注释文件不存在
|
||||
数据库同步开始
|
||||
数据库服务器时钟偏移
|
||||
数据库结构同步完成
|
||||
数据版本不能为空
|
||||
文件不能为空
|
||||
新密码不能为空
|
||||
新手机号码验证码不正确
|
||||
无效端口号
|
||||
无效证件号码
|
||||
日志长度超过限制
|
||||
旧密码不正确
|
||||
旧密码不能为空
|
||||
旧手机号码不正确
|
||||
旧手机号码验证码不正确
|
||||
时间戳缺失或误差过大
|
||||
时间表达式
|
||||
时间计划不能为空
|
||||
未指定部门
|
||||
@ -57,19 +55,16 @@ XML注释文件不存在
|
||||
父节点不存在
|
||||
用户不存在
|
||||
用户名不能为空
|
||||
用户名不能是手机号
|
||||
用户名不能是手机号码
|
||||
用户名或密码错误
|
||||
用户名长度4位以上
|
||||
用户头像不能为空
|
||||
用户档案不能为空
|
||||
用户编号不存在
|
||||
用户编号不能为空
|
||||
目标设备不能为空
|
||||
短信验证请求不能为空
|
||||
站内信不存在
|
||||
站内信状态不正确
|
||||
站内信类型不正确
|
||||
签名缺失
|
||||
网络地址不正确
|
||||
菜单名称不能为空
|
||||
菜单标题不能为空
|
||||
|
@ -6,7 +6,7 @@
|
||||
"Id": 373837717815301,
|
||||
"Name": "home",
|
||||
"Path": "/home",
|
||||
"Sort": 100,
|
||||
"Sort": 999,
|
||||
"Title": "主控面板",
|
||||
"Type": 1
|
||||
},
|
||||
@ -24,7 +24,7 @@
|
||||
"Component": "sys/user",
|
||||
"Icon": "el-icon-user",
|
||||
"Id": 373837957840901,
|
||||
"Name": "sys-user",
|
||||
"Name": "sys/user",
|
||||
"ParentId": 373837917724677,
|
||||
"Path": "/sys/user",
|
||||
"Sort": 100,
|
||||
@ -35,7 +35,7 @@
|
||||
"Component": "sys/role",
|
||||
"Icon": "sc-icon-role",
|
||||
"Id": 373838018527237,
|
||||
"Name": "sys-role",
|
||||
"Name": "sys/role",
|
||||
"ParentId": 373837917724677,
|
||||
"Path": "/sys/role",
|
||||
"Sort": 99,
|
||||
@ -46,7 +46,7 @@
|
||||
"Component": "sys/dept",
|
||||
"Icon": "sc-icon-dept",
|
||||
"Id": 373838045605893,
|
||||
"Name": "sys-dept",
|
||||
"Name": "sys/dept",
|
||||
"ParentId": 373837917724677,
|
||||
"Path": "/sys/dept",
|
||||
"Sort": 98,
|
||||
@ -57,7 +57,7 @@
|
||||
"Component": "sys/menu",
|
||||
"Icon": "el-icon-fold",
|
||||
"Id": 373838070898693,
|
||||
"Name": "sys-menu",
|
||||
"Name": "sys/menu",
|
||||
"ParentId": 373837917724677,
|
||||
"Path": "/sys/menu",
|
||||
"Sort": 97,
|
||||
@ -78,7 +78,7 @@
|
||||
"Component": "sys/config",
|
||||
"Icon": "el-icon-set-up",
|
||||
"Id": 380415005847557,
|
||||
"Name": "sys-config",
|
||||
"Name": "sys/config",
|
||||
"ParentId": 485278637670422,
|
||||
"Path": "/sys/config",
|
||||
"Sort": 100,
|
||||
@ -89,7 +89,7 @@
|
||||
"Component": "sys/job",
|
||||
"Icon": "sc-icon-ScheduledJob",
|
||||
"Id": 510067557638158,
|
||||
"Name": "sys-job",
|
||||
"Name": "sys/job",
|
||||
"ParentId": 485278637670422,
|
||||
"Path": "/sys/job",
|
||||
"Sort": 99,
|
||||
@ -100,7 +100,7 @@
|
||||
"Component": "sys/dic",
|
||||
"Icon": "sc-icon-dic",
|
||||
"Id": 375315654221829,
|
||||
"Name": "sys-dic",
|
||||
"Name": "sys/dic",
|
||||
"ParentId": 485278637670422,
|
||||
"Path": "/sys/dic",
|
||||
"Sort": 98,
|
||||
@ -111,7 +111,7 @@
|
||||
"Component": "sys/msg",
|
||||
"Icon": "el-icon-message",
|
||||
"Id": 482779610341392,
|
||||
"Name": "sys-msg",
|
||||
"Name": "sys/msg",
|
||||
"ParentId": 485278637670422,
|
||||
"Path": "/sys/msg",
|
||||
"Sort": 97,
|
||||
@ -122,7 +122,7 @@
|
||||
"Component": "sys/api",
|
||||
"Icon": "sc-icon-api",
|
||||
"Id": 397880678895621,
|
||||
"Name": "sys-api",
|
||||
"Name": "sys/api",
|
||||
"ParentId": 485278637670422,
|
||||
"Path": "/sys/api",
|
||||
"Sort": 96,
|
||||
@ -133,7 +133,7 @@
|
||||
"Component": "sys/cache",
|
||||
"Icon": "sc-icon-memory",
|
||||
"Id": 374911555702789,
|
||||
"Name": "sys-cache",
|
||||
"Name": "sys/cache",
|
||||
"ParentId": 485278637670422,
|
||||
"Path": "/sys/cache",
|
||||
"Sort": 95,
|
||||
@ -154,7 +154,7 @@
|
||||
"Component": "sys/log/operation",
|
||||
"Icon": "el-icon-pointer",
|
||||
"Id": 485285246504976,
|
||||
"Name": "sys-log-operation",
|
||||
"Name": "sys/log/operation",
|
||||
"ParentId": 374792687640581,
|
||||
"Path": "/sys/log/operation",
|
||||
"Sort": 100,
|
||||
@ -165,7 +165,7 @@
|
||||
"Component": "sys/log/login",
|
||||
"Icon": "sc-icon-OpenDoor",
|
||||
"Id": 485285246504970,
|
||||
"Name": "sys-log-login",
|
||||
"Name": "sys/log/login",
|
||||
"ParentId": 374792687640581,
|
||||
"Path": "/sys/log/login",
|
||||
"Sort": 99,
|
||||
@ -186,7 +186,7 @@
|
||||
"Component": "dev/code",
|
||||
"Icon": "sc-icon-code2",
|
||||
"Id": 373838147022853,
|
||||
"Name": "dev-code",
|
||||
"Name": "dev/code",
|
||||
"ParentId": 373838105399301,
|
||||
"Path": "/dev/code",
|
||||
"Sort": 100,
|
||||
@ -197,10 +197,20 @@
|
||||
"Id": 482777529417739,
|
||||
"ParentId": 373838105399301,
|
||||
"Icon": "el-icon-eleme-filled",
|
||||
"Name": "dev-element",
|
||||
"Path": "https://element-plus.gitee.io/zh-CN/component/button.html",
|
||||
"Name": "dev/element",
|
||||
"Path": "http://element-plus.org/zh-CN/component/overview.html",
|
||||
"Sort": 99,
|
||||
"Title": "Element",
|
||||
"Type": 3,
|
||||
},
|
||||
{
|
||||
"Id": 560217289232398,
|
||||
"ParentId": 373838105399301,
|
||||
"Icon": "sc-icon-FreeSql",
|
||||
"Name": "dev/freesql",
|
||||
"Path": "https://freesql.net/guide",
|
||||
"Sort": 99,
|
||||
"Title": "FreeSql",
|
||||
"Type": 3,
|
||||
}
|
||||
]
|
@ -14,5 +14,33 @@
|
||||
{
|
||||
"ApiId": "api/sys/user",
|
||||
"RoleId": 371729946431493
|
||||
},
|
||||
{
|
||||
"ApiId": "api/sys/site.msg/unread.count",
|
||||
"RoleId": 371729946431493,
|
||||
},
|
||||
{
|
||||
"ApiId": "api/sys/site.msg",
|
||||
"RoleId": 371729946431493,
|
||||
},
|
||||
{
|
||||
"ApiId": "api/sys/site.msg/get.mine",
|
||||
"RoleId": 371729946431493,
|
||||
},
|
||||
{
|
||||
"ApiId": "api/sys/site.msg/paged.query.mine",
|
||||
"RoleId": 371729946431493,
|
||||
},
|
||||
{
|
||||
"ApiId": "api/sys/site.msg/set.site.msg.status",
|
||||
"RoleId": 371729946431493,
|
||||
},
|
||||
{
|
||||
"ApiId": "api/sys/user/get.session.user.app.config",
|
||||
"RoleId": 371729946431493,
|
||||
},
|
||||
{
|
||||
"ApiId": "api/sys/user/set.session.user.app.config",
|
||||
"RoleId": 371729946431493,
|
||||
}
|
||||
]
|
@ -6,5 +6,13 @@
|
||||
"Password": "A8E87D23-49BC-25A1-1C7C-59186BEF5D15",
|
||||
"Token": "A9AFD92E-A33D-4152-9A6C-A9C141D24887",
|
||||
"UserName": "root"
|
||||
},
|
||||
{
|
||||
"DeptId": 372119301627909,
|
||||
"Enabled": true,
|
||||
"Id": 560217289236492,
|
||||
"Password": "A8E87D23-49BC-25A1-1C7C-59186BEF5D15",
|
||||
"Token": "4208EA97-B32F-4E39-A290-4C0D27B61EBF",
|
||||
"UserName": "user"
|
||||
}
|
||||
]
|
@ -1,5 +1,8 @@
|
||||
[
|
||||
{
|
||||
"Id": 370942943322181
|
||||
},
|
||||
{
|
||||
"Id": 560217289236492
|
||||
}
|
||||
]
|
@ -2,5 +2,9 @@
|
||||
{
|
||||
"RoleId": 370943613149253,
|
||||
"UserId": 370942943322181
|
||||
},
|
||||
{
|
||||
"RoleId": 371729946431493,
|
||||
"UserId": 560217289236492
|
||||
}
|
||||
]
|
@ -15,15 +15,15 @@
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.10.12-preview">
|
||||
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.10.48">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Roslynator.Analyzers" Version="4.12.2">
|
||||
<PackageReference Include="Roslynator.Analyzers" Version="4.12.4">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="SonarAnalyzer.CSharp" Version="9.24.0.89429">
|
||||
<PackageReference Include="SonarAnalyzer.CSharp" Version="9.27.0.93347">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
|
@ -16,8 +16,8 @@
|
||||
<None Include="$(SolutionDir)/assets/res/Nations.ln">
|
||||
<Link>Languages/Nations.ln</Link>
|
||||
</None>
|
||||
<None Include="$(SolutionDir)/assets/res/Enums.ln">
|
||||
<Link>Languages/Enums.ln</Link>
|
||||
<None Include="$(SolutionDir)/assets/res/Fields.ln">
|
||||
<Link>Languages/Fields.ln</Link>
|
||||
</None>
|
||||
<EmbeddedResource Include="$(SolutionDir)/assets/res/Ln.resx">
|
||||
<Link>Languages/Ln.resx</Link>
|
||||
|
@ -1,9 +1,9 @@
|
||||
{
|
||||
"version": "1.1.1",
|
||||
"version": "1.3.0",
|
||||
"devDependencies": {
|
||||
"cz-git": "^1.9.1",
|
||||
"cz-git": "^1.9.2",
|
||||
"commitizen": "^4.3.0",
|
||||
"prettier": "^3.2.5",
|
||||
"prettier": "^3.3.0",
|
||||
"standard-version": "^9.5.0"
|
||||
},
|
||||
"config": {
|
||||
|
@ -9,7 +9,7 @@
|
||||
"packages": [
|
||||
{
|
||||
"packageName": "Furion.Pure.NS",
|
||||
"version": "4.9.2.31-ns3"
|
||||
"version": "4.9.4-ns1"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -1,4 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<DefineConstants>DBTYPE_SQLITE</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(SolutionDir)/build/code.quality.props"/>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="../NetAdmin.SysComponent.Application/NetAdmin.SysComponent.Application.csproj"/>
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -4,6 +4,6 @@
|
||||
<ProjectReference Include="../NetAdmin.AdmServer.Host/NetAdmin.AdmServer.Host.csproj"/>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0-release-24177-07"/>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0"/>
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -10,16 +10,12 @@ namespace NetAdmin.Application.Modules;
|
||||
/// <typeparam name="TCreateRsp">创建响应类型</typeparam>
|
||||
/// <typeparam name="TQueryReq">查询请求类型</typeparam>
|
||||
/// <typeparam name="TQueryRsp">查询响应类型</typeparam>
|
||||
/// <typeparam name="TUpdateReq">修改请求类型</typeparam>
|
||||
/// <typeparam name="TUpdateRsp">修改响应类型</typeparam>
|
||||
/// <typeparam name="TDelReq">删除请求类型</typeparam>
|
||||
public interface ICrudModule<in TCreateReq, TCreateRsp, TQueryReq, TQueryRsp, in TUpdateReq, TUpdateRsp, TDelReq>
|
||||
public interface ICrudModule<in TCreateReq, TCreateRsp, TQueryReq, TQueryRsp, TDelReq>
|
||||
where TCreateReq : DataAbstraction, new()
|
||||
where TCreateRsp : DataAbstraction
|
||||
where TQueryReq : DataAbstraction, new()
|
||||
where TQueryRsp : DataAbstraction
|
||||
where TUpdateReq : DataAbstraction, new()
|
||||
where TUpdateRsp : DataAbstraction
|
||||
where TDelReq : DataAbstraction, new()
|
||||
{
|
||||
/// <summary>
|
||||
@ -61,9 +57,4 @@ public interface ICrudModule<in TCreateReq, TCreateRsp, TQueryReq, TQueryRsp, in
|
||||
/// 查询实体
|
||||
/// </summary>
|
||||
Task<IEnumerable<TQueryRsp>> QueryAsync(QueryReq<TQueryReq> req);
|
||||
|
||||
/// <summary>
|
||||
/// 更新实体
|
||||
/// </summary>
|
||||
Task<TUpdateRsp> UpdateAsync(TUpdateReq req);
|
||||
}
|
@ -1,4 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<DefineConstants>DBTYPE_SQLITE</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(SolutionDir)/build/code.quality.props"/>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="../NetAdmin.Domain/NetAdmin.Domain.csproj"/>
|
||||
|
@ -0,0 +1,20 @@
|
||||
using NetAdmin.Domain.Contexts;
|
||||
using NetAdmin.Domain.DbMaps.Dependency;
|
||||
|
||||
namespace NetAdmin.Application.Repositories;
|
||||
|
||||
/// <summary>
|
||||
/// 基础仓储
|
||||
/// </summary>
|
||||
public sealed class BasicRepository<TEntity, TPrimary>(
|
||||
IFreeSql fSql
|
||||
, UnitOfWorkManager uowManger
|
||||
, ContextUserToken userToken) : DefaultRepository<TEntity, TPrimary>(fSql, uowManger)
|
||||
where TEntity : EntityBase<TPrimary> //
|
||||
where TPrimary : IEquatable<TPrimary>
|
||||
{
|
||||
/// <summary>
|
||||
/// 当前上下文关联的用户令牌
|
||||
/// </summary>
|
||||
public ContextUserToken UserToken => userToken;
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
using NetAdmin.Domain.Contexts;
|
||||
using NetAdmin.Domain.DbMaps.Dependency;
|
||||
|
||||
namespace NetAdmin.Application.Repositories;
|
||||
|
||||
/// <summary>
|
||||
/// 默认仓储
|
||||
/// </summary>
|
||||
public sealed class DefaultRepository<TEntity>(IFreeSql fSql, UnitOfWorkManager uowManger, ContextUserToken userToken)
|
||||
: DefaultRepository<TEntity, long>(fSql, uowManger)
|
||||
where TEntity : EntityBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 当前上下文关联的用户令牌
|
||||
/// </summary>
|
||||
public ContextUserToken UserToken => userToken;
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
using NetAdmin.Application.Repositories;
|
||||
using NetAdmin.Domain.DbMaps.Dependency;
|
||||
using RedLockNet;
|
||||
|
||||
namespace NetAdmin.Application.Services;
|
||||
|
||||
/// <summary>
|
||||
/// RedLocker Service Base
|
||||
/// </summary>
|
||||
public abstract class RedLockerService<TEntity, TPrimary, TLogger>(
|
||||
BasicRepository<TEntity, TPrimary> rpo
|
||||
, RedLocker redLocker) : RepositoryService<TEntity, TPrimary, TLogger>(rpo)
|
||||
where TEntity : EntityBase<TPrimary> //
|
||||
where TPrimary : IEquatable<TPrimary>
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取锁
|
||||
/// </summary>
|
||||
/// <exception cref="NetAdminGetLockerException">NetAdminGetLockerException</exception>
|
||||
protected async Task<IRedLock> GetLockerAsync(string lockName)
|
||||
{
|
||||
// 加锁
|
||||
var redLock = await redLocker.RedLockFactory.CreateLockAsync( //
|
||||
lockName, TimeSpan.FromSeconds(Numbers.SECS_RED_LOCK_EXPIRY)
|
||||
, TimeSpan.FromSeconds(Numbers.SECS_RED_LOCK_WAIT)
|
||||
, TimeSpan.FromSeconds(Numbers.SECS_RED_LOCK_RETRY))
|
||||
.ConfigureAwait(false);
|
||||
|
||||
return redLock.IsAcquired ? redLock : throw new NetAdminGetLockerException();
|
||||
}
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
using NetAdmin.Application.Repositories;
|
||||
using NetAdmin.Domain.DbMaps.Dependency;
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
|
||||
namespace NetAdmin.Application.Services;
|
||||
|
||||
@ -7,14 +8,17 @@ namespace NetAdmin.Application.Services;
|
||||
/// 仓储服务基类
|
||||
/// </summary>
|
||||
/// <typeparam name="TEntity">实体类型</typeparam>
|
||||
/// <typeparam name="TPrimary">主键类型</typeparam>
|
||||
/// <typeparam name="TLogger">日志类型</typeparam>
|
||||
public abstract class RepositoryService<TEntity, TLogger>(DefaultRepository<TEntity> rpo) : ServiceBase<TLogger>
|
||||
where TEntity : EntityBase
|
||||
public abstract class RepositoryService<TEntity, TPrimary, TLogger>(BasicRepository<TEntity, TPrimary> rpo)
|
||||
: ServiceBase<TLogger>
|
||||
where TEntity : EntityBase<TPrimary> //
|
||||
where TPrimary : IEquatable<TPrimary>
|
||||
{
|
||||
/// <summary>
|
||||
/// 默认仓储
|
||||
/// </summary>
|
||||
protected DefaultRepository<TEntity> Rpo => rpo;
|
||||
protected BasicRepository<TEntity, TPrimary> Rpo => rpo;
|
||||
|
||||
/// <summary>
|
||||
/// 启用级联保存
|
||||
@ -25,10 +29,72 @@ public abstract class RepositoryService<TEntity, TLogger>(DefaultRepository<TEnt
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 针对 Sqlite 数据的更新操作
|
||||
/// 更新实体
|
||||
/// </summary>
|
||||
/// <returns>
|
||||
/// 非 Sqlite 数据库请删除
|
||||
/// </returns>
|
||||
protected abstract Task<TEntity> UpdateForSqliteAsync(TEntity req);
|
||||
/// <param name="newValue">新的值</param>
|
||||
/// <param name="includeFields">包含的属性</param>
|
||||
/// <param name="excludeFields">排除的属性</param>
|
||||
/// <param name="whereExp">查询表达式</param>
|
||||
/// <param name="whereSql">查询sql</param>
|
||||
/// <param name="ignoreVersion">是否忽略版本锁</param>
|
||||
/// <returns>更新行数</returns>
|
||||
protected Task<int> UpdateAsync( //
|
||||
TEntity newValue //
|
||||
, IEnumerable<string> includeFields //
|
||||
, string[] excludeFields = null //
|
||||
, Expression<Func<TEntity, bool>> whereExp = null //
|
||||
, string whereSql = null //
|
||||
, bool ignoreVersion = false)
|
||||
{
|
||||
// 默认匹配主键
|
||||
whereExp ??= a => a.Id.Equals(newValue.Id);
|
||||
var update = BuildUpdate(newValue, includeFields, excludeFields, ignoreVersion).Where(whereExp).Where(whereSql);
|
||||
return update.ExecuteAffrowsAsync();
|
||||
}
|
||||
|
||||
#if DBTYPE_SQLSERVER
|
||||
/// <summary>
|
||||
/// 更新实体
|
||||
/// </summary>
|
||||
/// <param name="newValue">新的值</param>
|
||||
/// <param name="includeFields">包含的属性</param>
|
||||
/// <param name="excludeFields">排除的属性</param>
|
||||
/// <param name="whereExp">查询表达式</param>
|
||||
/// <param name="ignoreVersion">是否忽略版本锁</param>
|
||||
/// <returns>更新后的实体列表</returns>
|
||||
protected Task<List<TEntity>> UpdateReturnListAsync( //
|
||||
TEntity newValue //
|
||||
, IEnumerable<string> includeFields //
|
||||
, string[] excludeFields = null //
|
||||
, Expression<Func<TEntity, bool>> whereExp = null //
|
||||
, bool ignoreVersion = false)
|
||||
{
|
||||
// 默认匹配主键
|
||||
whereExp ??= a => a.Id.Equals(newValue.Id);
|
||||
return BuildUpdate(newValue, includeFields, excludeFields, ignoreVersion).Where(whereExp).ExecuteUpdatedAsync();
|
||||
}
|
||||
#endif
|
||||
|
||||
private IUpdate<TEntity> BuildUpdate( //
|
||||
TEntity entity //
|
||||
, IEnumerable<string> includeFields //
|
||||
, string[] excludeFields = null //
|
||||
, bool ignoreVersion = false)
|
||||
{
|
||||
var updateExp = includeFields == null
|
||||
? Rpo.UpdateDiy.SetSource(entity)
|
||||
: Rpo.UpdateDiy.SetDto(includeFields!.ToDictionary(
|
||||
x => x
|
||||
, x => typeof(TEntity).GetProperty(x, BindingFlags.Public | BindingFlags.Instance)!
|
||||
.GetValue(entity)));
|
||||
if (excludeFields != null) {
|
||||
updateExp = updateExp.IgnoreColumns(excludeFields);
|
||||
}
|
||||
|
||||
if (!ignoreVersion && entity is IFieldVersion ver) {
|
||||
updateExp = updateExp.Where($"{nameof(IFieldVersion.Version)} = @version", new { version = ver.Version });
|
||||
}
|
||||
|
||||
return updateExp;
|
||||
}
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
namespace NetAdmin.Domain.Attributes.DataValidation;
|
||||
|
||||
/// <summary>
|
||||
/// 手机号验证器
|
||||
/// 手机号码验证器
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Parameter)]
|
||||
public sealed class MobileAttribute : RegexAttribute
|
||||
|
@ -10,7 +10,7 @@ public sealed class PortAttribute : RangeAttribute
|
||||
/// Initializes a new instance of the <see cref="PortAttribute" /> class.
|
||||
/// </summary>
|
||||
public PortAttribute() //
|
||||
: base(1, 65535)
|
||||
: base(1, ushort.MaxValue)
|
||||
{
|
||||
ErrorMessageResourceName = nameof(Ln.无效端口号);
|
||||
ErrorMessageResourceType = typeof(Ln);
|
||||
|
@ -27,8 +27,8 @@ public sealed class UserNameAttribute : RegexAttribute
|
||||
return true;
|
||||
}
|
||||
|
||||
// 不能是手机号
|
||||
ErrorMessageResourceName = nameof(Ln.用户名不能是手机号);
|
||||
// 不能是手机号码
|
||||
ErrorMessageResourceName = nameof(Ln.用户名不能是手机号码);
|
||||
return false;
|
||||
}
|
||||
}
|
14
src/backend/NetAdmin.Domain/Attributes/IndicatorAttribute.cs
Normal file
14
src/backend/NetAdmin.Domain/Attributes/IndicatorAttribute.cs
Normal file
@ -0,0 +1,14 @@
|
||||
namespace NetAdmin.Domain.Attributes;
|
||||
|
||||
/// <summary>
|
||||
/// 标记一个枚举的状态指示
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Enum)]
|
||||
public sealed class IndicatorAttribute(string indicate) : Attribute
|
||||
{
|
||||
/// <summary>
|
||||
/// 状态指示
|
||||
/// </summary>
|
||||
public string Indicate { get; init; } = indicate;
|
||||
}
|
@ -3,4 +3,11 @@ namespace NetAdmin.Domain.DbMaps.Dependency;
|
||||
/// <summary>
|
||||
/// 数据库实体基类
|
||||
/// </summary>
|
||||
public abstract record EntityBase : DataAbstraction;
|
||||
public abstract record EntityBase<T> : DataAbstraction
|
||||
where T : IEquatable<T>
|
||||
{
|
||||
/// <summary>
|
||||
/// 唯一编码
|
||||
/// </summary>
|
||||
public virtual T Id { get; init; }
|
||||
}
|
@ -10,11 +10,6 @@ public interface IFieldCreatedClient
|
||||
/// </summary>
|
||||
int? CreatedClientIp { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建者来源地址
|
||||
/// </summary>
|
||||
string CreatedReferer { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建者客户端用户代理
|
||||
/// </summary>
|
||||
|
@ -1,12 +0,0 @@
|
||||
namespace NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
|
||||
/// <summary>
|
||||
/// 主键字段接口
|
||||
/// </summary>
|
||||
public interface IFieldPrimary<T>
|
||||
{
|
||||
/// <summary>
|
||||
/// 唯一编码
|
||||
/// </summary>
|
||||
T Id { get; init; }
|
||||
}
|
@ -6,7 +6,7 @@ namespace NetAdmin.Domain.DbMaps.Dependency;
|
||||
/// <inheritdoc />
|
||||
public abstract record ImmutableEntity : ImmutableEntity<long>
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
|
||||
[Snowflake]
|
||||
public override long Id { get; init; }
|
||||
@ -17,6 +17,7 @@ public abstract record ImmutableEntity : ImmutableEntity<long>
|
||||
/// </summary>
|
||||
/// <typeparam name="T">主键类型</typeparam>
|
||||
public abstract record ImmutableEntity<T> : LiteImmutableEntity<T>, IFieldCreatedUser
|
||||
where T : IEquatable<T>
|
||||
{
|
||||
/// <inheritdoc cref="IFieldCreatedUser.CreatedUserId" />
|
||||
[Column(CanUpdate = false, Position = -1)]
|
||||
@ -28,7 +29,7 @@ public abstract record ImmutableEntity<T> : LiteImmutableEntity<T>, IFieldCreate
|
||||
[JsonIgnore]
|
||||
public virtual string CreatedUserName { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
|
||||
public override T Id { get; init; }
|
||||
}
|
@ -6,7 +6,7 @@ namespace NetAdmin.Domain.DbMaps.Dependency;
|
||||
/// <inheritdoc />
|
||||
public abstract record LiteImmutableEntity : LiteImmutableEntity<long>
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
|
||||
[Snowflake]
|
||||
public override long Id { get; init; }
|
||||
@ -16,15 +16,16 @@ public abstract record LiteImmutableEntity : LiteImmutableEntity<long>
|
||||
/// 轻型不可变实体
|
||||
/// </summary>
|
||||
/// <typeparam name="T">主键类型</typeparam>
|
||||
public abstract record LiteImmutableEntity<T> : EntityBase, IFieldPrimary<T>, IFieldCreatedTime
|
||||
public abstract record LiteImmutableEntity<T> : EntityBase<T>, IFieldCreatedTime
|
||||
where T : IEquatable<T>
|
||||
{
|
||||
/// <inheritdoc cref="IFieldCreatedTime.CreatedTime" />
|
||||
[Column(ServerTime = DateTimeKind.Local, CanUpdate = false, Position = -1)]
|
||||
[JsonIgnore]
|
||||
public virtual DateTime CreatedTime { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
|
||||
[JsonIgnore]
|
||||
public virtual T Id { get; init; }
|
||||
public override T Id { get; init; }
|
||||
}
|
@ -6,7 +6,7 @@ namespace NetAdmin.Domain.DbMaps.Dependency;
|
||||
/// <inheritdoc />
|
||||
public abstract record LiteMutableEntity : LiteMutableEntity<long>
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
|
||||
[Snowflake]
|
||||
public override long Id { get; init; }
|
||||
@ -16,8 +16,9 @@ public abstract record LiteMutableEntity : LiteMutableEntity<long>
|
||||
/// 轻型可变实体
|
||||
/// </summary>
|
||||
public abstract record LiteMutableEntity<T> : LiteImmutableEntity<T>, IFieldModifiedTime
|
||||
where T : IEquatable<T>
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
|
||||
public override T Id { get; init; }
|
||||
|
||||
|
@ -6,7 +6,7 @@ namespace NetAdmin.Domain.DbMaps.Dependency;
|
||||
/// <inheritdoc />
|
||||
public abstract record LiteVersionEntity : LiteVersionEntity<long>
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
|
||||
[Snowflake]
|
||||
public override long Id { get; init; }
|
||||
@ -16,8 +16,9 @@ public abstract record LiteVersionEntity : LiteVersionEntity<long>
|
||||
/// 乐观锁轻型可变实体
|
||||
/// </summary>
|
||||
public abstract record LiteVersionEntity<T> : LiteMutableEntity<T>, IFieldVersion
|
||||
where T : IEquatable<T>
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
|
||||
public override T Id { get; init; }
|
||||
|
||||
|
@ -6,7 +6,7 @@ namespace NetAdmin.Domain.DbMaps.Dependency;
|
||||
/// <inheritdoc />
|
||||
public abstract record MutableEntity : MutableEntity<long>
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
|
||||
[Snowflake]
|
||||
public override long Id { get; init; }
|
||||
@ -16,8 +16,9 @@ public abstract record MutableEntity : MutableEntity<long>
|
||||
/// 可变实体
|
||||
/// </summary>
|
||||
public abstract record MutableEntity<T> : LiteMutableEntity<T>, IFieldModifiedUser
|
||||
where T : IEquatable<T>
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
|
||||
public override T Id { get; init; }
|
||||
|
||||
|
@ -1,6 +1,18 @@
|
||||
using NetAdmin.Domain.Attributes;
|
||||
|
||||
namespace NetAdmin.Domain.DbMaps.Dependency;
|
||||
|
||||
/// <inheritdoc />
|
||||
public abstract record SimpleEntity : SimpleEntity<long>
|
||||
{
|
||||
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
|
||||
[Snowflake]
|
||||
public override long Id { get; init; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 简单实体
|
||||
/// </summary>
|
||||
public abstract record SimpleEntity : EntityBase;
|
||||
public abstract record SimpleEntity<T> : EntityBase<T>
|
||||
where T : IEquatable<T>;
|
@ -6,7 +6,7 @@ namespace NetAdmin.Domain.DbMaps.Dependency;
|
||||
/// <inheritdoc />
|
||||
public abstract record VersionEntity : VersionEntity<long>
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
|
||||
[Snowflake]
|
||||
public override long Id { get; init; }
|
||||
@ -16,6 +16,7 @@ public abstract record VersionEntity : VersionEntity<long>
|
||||
/// 乐观锁可变实体
|
||||
/// </summary>
|
||||
public abstract record VersionEntity<T> : LiteVersionEntity<T>, IFieldModifiedUser, IFieldCreatedUser
|
||||
where T : IEquatable<T>
|
||||
{
|
||||
/// <inheritdoc />
|
||||
[Column(CanUpdate = false, Position = -1)]
|
||||
@ -27,7 +28,7 @@ public abstract record VersionEntity<T> : LiteVersionEntity<T>, IFieldModifiedUs
|
||||
[JsonIgnore]
|
||||
public virtual string CreatedUserName { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
|
||||
public override T Id { get; init; }
|
||||
|
||||
|
@ -16,7 +16,7 @@ public record Sys_Api : ImmutableEntity<string>, IFieldSummary
|
||||
[Navigate(nameof(ParentId))]
|
||||
public IEnumerable<Sys_Api> Children { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_127, IsIdentity = false, IsPrimary = true, Position = 1)]
|
||||
[JsonIgnore]
|
||||
public override string Id { get; init; }
|
||||
|
@ -37,6 +37,13 @@ public record Sys_Job : VersionEntity, IFieldEnabled, IFieldSummary
|
||||
[JsonIgnore]
|
||||
public virtual string JobName { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 上次执行耗时
|
||||
/// </summary>
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public virtual long? LastDuration { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 上次执行时间
|
||||
/// </summary>
|
||||
@ -68,21 +75,33 @@ public record Sys_Job : VersionEntity, IFieldEnabled, IFieldSummary
|
||||
/// <summary>
|
||||
/// 请求体
|
||||
/// </summary>
|
||||
#if DBTYPE_SQLSERVER
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)]
|
||||
#else
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||
#endif
|
||||
[JsonIgnore]
|
||||
public virtual string RequestBody { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 请求头
|
||||
/// </summary>
|
||||
#if DBTYPE_SQLSERVER
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)]
|
||||
#else
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||
#endif
|
||||
[JsonIgnore]
|
||||
public virtual string RequestHeader { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 请求的网络地址
|
||||
/// </summary>
|
||||
#if DBTYPE_SQLSERVER
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)]
|
||||
#else
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||
#endif
|
||||
[JsonIgnore]
|
||||
public virtual string RequestUrl { get; init; }
|
||||
|
||||
@ -94,7 +113,11 @@ public record Sys_Job : VersionEntity, IFieldEnabled, IFieldSummary
|
||||
public virtual JobStatues Status { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldSummary.Summary" />
|
||||
#if DBTYPE_SQLSERVER
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)]
|
||||
#else
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||
#endif
|
||||
[JsonIgnore]
|
||||
public virtual string Summary { get; init; }
|
||||
|
||||
|
@ -7,6 +7,9 @@ namespace NetAdmin.Domain.DbMaps.Sys;
|
||||
/// 计划作业执行记录表
|
||||
/// </summary>
|
||||
[Index($"{Chars.FLG_DB_INDEX_PREFIX}{nameof(JobId)}_{nameof(TimeId)}", $"{nameof(JobId)},{nameof(TimeId)}", true)]
|
||||
[Index(Chars.FLG_DB_INDEX_PREFIX + nameof(CreatedTime), nameof(CreatedTime), false)]
|
||||
[Index(Chars.FLG_DB_INDEX_PREFIX + nameof(JobId), nameof(JobId), false)]
|
||||
[Index(Chars.FLG_DB_INDEX_PREFIX + nameof(HttpStatusCode), nameof(HttpStatusCode), false)]
|
||||
[Table(Name = Chars.FLG_DB_TABLE_NAME_PREFIX + nameof(Sys_JobRecord))]
|
||||
public record Sys_JobRecord : LiteImmutableEntity
|
||||
{
|
||||
@ -29,7 +32,7 @@ public record Sys_JobRecord : LiteImmutableEntity
|
||||
/// </summary>
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public virtual int HttpStatusCode { get; init; }
|
||||
public int HttpStatusCode { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 拥有者信息
|
||||
@ -48,14 +51,22 @@ public record Sys_JobRecord : LiteImmutableEntity
|
||||
/// <summary>
|
||||
/// 请求体
|
||||
/// </summary>
|
||||
#if DBTYPE_SQLSERVER
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)]
|
||||
#else
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||
#endif
|
||||
[JsonIgnore]
|
||||
public virtual string RequestBody { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 请求头
|
||||
/// </summary>
|
||||
#if DBTYPE_SQLSERVER
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)]
|
||||
#else
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||
#endif
|
||||
[JsonIgnore]
|
||||
public virtual string RequestHeader { get; init; }
|
||||
|
||||
@ -69,14 +80,22 @@ public record Sys_JobRecord : LiteImmutableEntity
|
||||
/// <summary>
|
||||
/// 响应体
|
||||
/// </summary>
|
||||
#if DBTYPE_SQLSERVER
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)]
|
||||
#else
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||
#endif
|
||||
[JsonIgnore]
|
||||
public virtual string ResponseBody { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 响应头
|
||||
/// </summary>
|
||||
#if DBTYPE_SQLSERVER
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)]
|
||||
#else
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||
#endif
|
||||
[JsonIgnore]
|
||||
public virtual string ResponseHeader { get; init; }
|
||||
|
||||
|
@ -8,8 +8,10 @@ namespace NetAdmin.Domain.DbMaps.Sys;
|
||||
/// </summary>
|
||||
[Index(Chars.FLG_DB_INDEX_PREFIX + nameof(ApiId), nameof(ApiId), false)]
|
||||
[Index(Chars.FLG_DB_INDEX_PREFIX + nameof(CreatedTime), nameof(CreatedTime), false)]
|
||||
[Index(Chars.FLG_DB_INDEX_PREFIX + nameof(UserId), nameof(UserId), false)]
|
||||
[Index(Chars.FLG_DB_INDEX_PREFIX + nameof(HttpStatusCode), nameof(HttpStatusCode), false)]
|
||||
[Table(Name = Chars.FLG_DB_TABLE_NAME_PREFIX + nameof(Sys_RequestLog))]
|
||||
public record Sys_RequestLog : ImmutableEntity, IFieldCreatedClient
|
||||
public record Sys_RequestLog : SimpleEntity, IFieldCreatedTime, IFieldCreatedClient
|
||||
{
|
||||
/// <summary>
|
||||
/// 接口
|
||||
@ -25,24 +27,22 @@ public record Sys_RequestLog : ImmutableEntity, IFieldCreatedClient
|
||||
[JsonIgnore]
|
||||
public virtual string ApiId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建者客户端IP
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
[Column(Position = -1)]
|
||||
[JsonIgnore]
|
||||
public int? CreatedClientIp { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建者来源地址
|
||||
/// </summary>
|
||||
[Column(Position = -1, DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||
/// <inheritdoc />
|
||||
[Column(ServerTime = DateTimeKind.Local, CanUpdate = false, Position = -1)]
|
||||
[JsonIgnore]
|
||||
public string CreatedReferer { get; init; }
|
||||
public virtual DateTime CreatedTime { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建者客户端用户代理
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
#if DBTYPE_SQLSERVER
|
||||
[Column(Position = -1, DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_1022)]
|
||||
#else
|
||||
[Column(Position = -1, DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||
#endif
|
||||
[JsonIgnore]
|
||||
public virtual string CreatedUserAgent { get; init; }
|
||||
|
||||
@ -63,17 +63,14 @@ public record Sys_RequestLog : ImmutableEntity, IFieldCreatedClient
|
||||
/// <summary>
|
||||
/// 异常信息
|
||||
/// </summary>
|
||||
#if DBTYPE_SQLSERVER
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)]
|
||||
#else
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||
#endif
|
||||
[JsonIgnore]
|
||||
public virtual string Exception { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 附加数据
|
||||
/// </summary>
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||
[JsonIgnore]
|
||||
public virtual string ExtraData { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// HTTP状态码
|
||||
/// </summary>
|
||||
@ -88,17 +85,14 @@ public record Sys_RequestLog : ImmutableEntity, IFieldCreatedClient
|
||||
[JsonIgnore]
|
||||
public virtual string Method { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 来源地址
|
||||
/// </summary>
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||
[JsonIgnore]
|
||||
public virtual string ReferUrl { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 请求内容
|
||||
/// </summary>
|
||||
#if DBTYPE_SQLSERVER
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)]
|
||||
#else
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||
#endif
|
||||
[JsonIgnore]
|
||||
public virtual string RequestBody { get; init; }
|
||||
|
||||
@ -112,7 +106,11 @@ public record Sys_RequestLog : ImmutableEntity, IFieldCreatedClient
|
||||
/// <summary>
|
||||
/// 请求头信息
|
||||
/// </summary>
|
||||
#if DBTYPE_SQLSERVER
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)]
|
||||
#else
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||
#endif
|
||||
[JsonIgnore]
|
||||
public virtual string RequestHeaders { get; init; }
|
||||
|
||||
@ -126,7 +124,11 @@ public record Sys_RequestLog : ImmutableEntity, IFieldCreatedClient
|
||||
/// <summary>
|
||||
/// 响应内容
|
||||
/// </summary>
|
||||
#if DBTYPE_SQLSERVER
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)]
|
||||
#else
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||
#endif
|
||||
[JsonIgnore]
|
||||
public virtual string ResponseBody { get; init; }
|
||||
|
||||
@ -140,7 +142,11 @@ public record Sys_RequestLog : ImmutableEntity, IFieldCreatedClient
|
||||
/// <summary>
|
||||
/// 响应头
|
||||
/// </summary>
|
||||
#if DBTYPE_SQLSERVER
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)]
|
||||
#else
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||
#endif
|
||||
[JsonIgnore]
|
||||
public virtual string ResponseHeaders { get; init; }
|
||||
|
||||
@ -150,4 +156,18 @@ public record Sys_RequestLog : ImmutableEntity, IFieldCreatedClient
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public virtual int? ServerIp { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 用户
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Navigate(nameof(UserId))]
|
||||
public Sys_User User { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 用户编号
|
||||
/// </summary>
|
||||
[Column]
|
||||
[JsonIgnore]
|
||||
public virtual long? UserId { get; init; }
|
||||
}
|
@ -14,7 +14,11 @@ public record Sys_SiteMsg : VersionEntity, IRegister, IFieldSummary
|
||||
/// <summary>
|
||||
/// 消息内容
|
||||
/// </summary>
|
||||
#if DBTYPE_SQLSERVER
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)]
|
||||
#else
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||
#endif
|
||||
[JsonIgnore]
|
||||
public virtual string Content { get; init; }
|
||||
|
||||
|
@ -49,7 +49,7 @@ public record Sys_User : VersionEntity, IFieldSummary, IFieldEnabled, IRegister
|
||||
public virtual bool Enabled { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 手机号
|
||||
/// 手机号码
|
||||
/// </summary>
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_15)]
|
||||
[JsonIgnore]
|
||||
@ -115,7 +115,7 @@ public record Sys_User : VersionEntity, IFieldSummary, IFieldEnabled, IRegister
|
||||
? Array.Empty<Sys_Role>()
|
||||
: s.RoleIds.Select(x => new Sys_Role { Id = x }));
|
||||
|
||||
_ = config.ForType<UpdateUserReq, Sys_User>()
|
||||
_ = config.ForType<EditUserReq, Sys_User>()
|
||||
.Map( //
|
||||
d => d.Password, s => s.PasswordText.NullOrEmpty() ? Guid.Empty : s.PasswordText.Pwd().Guid())
|
||||
.Map( //
|
||||
|
@ -9,6 +9,17 @@ namespace NetAdmin.Domain.DbMaps.Sys;
|
||||
[Table(Name = Chars.FLG_DB_TABLE_NAME_PREFIX + nameof(Sys_UserProfile))]
|
||||
public record Sys_UserProfile : VersionEntity, IRegister
|
||||
{
|
||||
/// <summary>
|
||||
/// 应用配置
|
||||
/// </summary>
|
||||
#if DBTYPE_SQLSERVER
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)]
|
||||
#else
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||
#endif
|
||||
[JsonIgnore]
|
||||
public virtual string AppConfig { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 出生日期
|
||||
/// </summary>
|
||||
@ -80,7 +91,7 @@ public record Sys_UserProfile : VersionEntity, IRegister
|
||||
public int? EmergencyContactArea { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 紧急联系人手机号
|
||||
/// 紧急联系人手机号码
|
||||
/// </summary>
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_15)]
|
||||
[JsonIgnore]
|
||||
|
@ -1,4 +1,4 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Dependency;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Dependency;
|
||||
|
||||
@ -8,8 +8,9 @@ public sealed record DelReq : DelReq<long>;
|
||||
/// <summary>
|
||||
/// 请求:通过编号删除
|
||||
/// </summary>
|
||||
public record DelReq<T> : DataAbstraction, IFieldPrimary<T>
|
||||
public record DelReq<T> : EntityBase<T>
|
||||
where T : IEquatable<T>
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
public T Id { get; init; }
|
||||
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||
public override T Id { get; init; }
|
||||
}
|
@ -1,3 +1,4 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency;
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
@ -11,7 +12,7 @@ public sealed record QueryApiRsp : Sys_Api
|
||||
/// <inheritdoc cref="Sys_Api.Children" />
|
||||
public new IEnumerable<QueryApiRsp> Children { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||
public override string Id { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_Api.Method" />
|
||||
|
@ -8,5 +8,5 @@ public sealed record GetAllEntriesReq : DataAbstraction
|
||||
/// <summary>
|
||||
/// 数据库索引号
|
||||
/// </summary>
|
||||
public uint DbIndex { get; init; }
|
||||
public int DbIndex { get; init; }
|
||||
}
|
@ -3,9 +3,9 @@ using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
namespace NetAdmin.Domain.Dto.Sys.Config;
|
||||
|
||||
/// <summary>
|
||||
/// 请求:更新配置
|
||||
/// 请求:编辑配置
|
||||
/// </summary>
|
||||
public sealed record UpdateConfigReq : CreateConfigReq
|
||||
public sealed record EditConfigReq : CreateConfigReq
|
||||
{
|
||||
/// <inheritdoc cref="IFieldVersion.Version" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
@ -1,3 +1,4 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency;
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
@ -12,7 +13,7 @@ public sealed record QueryConfigReq : Sys_Config
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public new bool? Enabled { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
}
|
@ -1,3 +1,4 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency;
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
using NetAdmin.Domain.Dto.Sys.Dept;
|
||||
@ -18,7 +19,7 @@ public sealed record QueryConfigRsp : Sys_Config
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override bool Enabled { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
|
||||
|
@ -0,0 +1,23 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency;
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.Config;
|
||||
|
||||
/// <summary>
|
||||
/// 请求:启用/禁用配置
|
||||
/// </summary>
|
||||
public sealed record SetConfigEnabledReq : Sys_Config
|
||||
{
|
||||
/// <inheritdoc cref="IFieldEnabled.Enabled" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override bool Enabled { get; init; }
|
||||
|
||||
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldVersion.Version" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Version { get; init; }
|
||||
}
|
@ -1,13 +1,14 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency;
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.Dept;
|
||||
|
||||
/// <summary>
|
||||
/// 请求:更新部门
|
||||
/// 请求:编辑部门
|
||||
/// </summary>
|
||||
public sealed record UpdateDeptReq : CreateDeptReq
|
||||
public sealed record EditDeptReq : CreateDeptReq
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
|
@ -1,4 +1,4 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Dependency;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.Dept;
|
||||
@ -8,7 +8,7 @@ namespace NetAdmin.Domain.Dto.Sys.Dept;
|
||||
/// </summary>
|
||||
public sealed record QueryDeptReq : Sys_Dept
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
}
|
@ -1,3 +1,4 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency;
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
@ -19,7 +20,7 @@ public sealed record QueryDeptRsp : Sys_Dept
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override bool Enabled { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
|
||||
|
@ -0,0 +1,23 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency;
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.Dept;
|
||||
|
||||
/// <summary>
|
||||
/// 请求:启用/禁用部门
|
||||
/// </summary>
|
||||
public sealed record SetDeptEnabledReq : Sys_Dept
|
||||
{
|
||||
/// <inheritdoc cref="IFieldEnabled.Enabled" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override bool Enabled { get; init; }
|
||||
|
||||
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldVersion.Version" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Version { get; init; }
|
||||
}
|
@ -3,9 +3,9 @@ using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
namespace NetAdmin.Domain.Dto.Sys.Dic.Catalog;
|
||||
|
||||
/// <summary>
|
||||
/// 请求:更新字典目录
|
||||
/// 请求:编辑字典目录
|
||||
/// </summary>
|
||||
public sealed record UpdateDicCatalogReq : CreateDicCatalogReq
|
||||
public sealed record EditDicCatalogReq : CreateDicCatalogReq
|
||||
{
|
||||
/// <inheritdoc cref="IFieldVersion.Version" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
@ -1,3 +1,4 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency;
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
@ -15,7 +16,7 @@ public sealed record QueryDicCatalogRsp : Sys_DicCatalog
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public override string Code { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
|
||||
|
@ -3,9 +3,9 @@ using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
namespace NetAdmin.Domain.Dto.Sys.Dic.Content;
|
||||
|
||||
/// <summary>
|
||||
/// 请求:更新字典内容
|
||||
/// 请求:编辑字典内容
|
||||
/// </summary>
|
||||
public sealed record UpdateDicContentReq : CreateDicContentReq
|
||||
public sealed record EditDicContentReq : CreateDicContentReq
|
||||
{
|
||||
/// <inheritdoc cref="IFieldVersion.Version" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
11
src/backend/NetAdmin.Domain/Dto/Sys/Job/EditJobReq.cs
Normal file
11
src/backend/NetAdmin.Domain/Dto/Sys/Job/EditJobReq.cs
Normal file
@ -0,0 +1,11 @@
|
||||
namespace NetAdmin.Domain.Dto.Sys.Job;
|
||||
|
||||
/// <summary>
|
||||
/// 请求:编辑计划作业
|
||||
/// </summary>
|
||||
public sealed record EditJobReq : CreateJobReq
|
||||
{
|
||||
/// <inheritdoc cref="System.Version" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Version { get; init; }
|
||||
}
|
15
src/backend/NetAdmin.Domain/Dto/Sys/Job/FinishJobReq.cs
Normal file
15
src/backend/NetAdmin.Domain/Dto/Sys/Job/FinishJobReq.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.Job;
|
||||
|
||||
/// <summary>
|
||||
/// 请求:完成计划作业
|
||||
/// </summary>
|
||||
public sealed record FinishJobReq : Sys_Job, IRegister
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public void Register(TypeAdapterConfig config)
|
||||
{
|
||||
_ = config.ForType<QueryJobRsp, FinishJobReq>().Map(d => d.LastStatusCode, s => ((Sys_Job)s).LastStatusCode);
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Dependency;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.Job;
|
||||
@ -8,7 +8,7 @@ namespace NetAdmin.Domain.Dto.Sys.Job;
|
||||
/// </summary>
|
||||
public sealed record QueryJobReq : Sys_Job
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
}
|
@ -1,3 +1,4 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency;
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
using NetAdmin.Domain.Dto.Sys.User;
|
||||
@ -11,6 +12,17 @@ namespace NetAdmin.Domain.Dto.Sys.Job;
|
||||
/// </summary>
|
||||
public sealed record QueryJobRsp : Sys_Job
|
||||
{
|
||||
/// <inheritdoc cref="Sys_Job.LastStatusCode" />
|
||||
public new string LastStatusCode =>
|
||||
#pragma warning disable IDE0072
|
||||
base.LastStatusCode switch {
|
||||
#pragma warning restore IDE0072
|
||||
null => null
|
||||
, _ => (int)base.LastStatusCode.Value == Numbers.HTTP_STATUS_BIZ_FAIL
|
||||
? nameof(ErrorCodes.Unhandled).ToLowerCamelCase()
|
||||
: base.LastStatusCode.Value.ToString().ToLowerCamelCase()
|
||||
};
|
||||
|
||||
/// <inheritdoc cref="IFieldCreatedTime.CreatedTime" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override DateTime CreatedTime { get; init; }
|
||||
@ -35,7 +47,7 @@ public sealed record QueryJobRsp : Sys_Job
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override HttpMethods HttpMethod { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
|
||||
@ -43,14 +55,14 @@ public sealed record QueryJobRsp : Sys_Job
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public override string JobName { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_Job.LastDuration" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public override long? LastDuration { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_Job.LastExecTime" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public override DateTime? LastExecTime { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_Job.LastStatusCode" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public override HttpStatusCode? LastStatusCode { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldModifiedTime.ModifiedTime" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public override DateTime? ModifiedTime { get; init; }
|
||||
|
18
src/backend/NetAdmin.Domain/Dto/Sys/Job/SetJobEnabledReq.cs
Normal file
18
src/backend/NetAdmin.Domain/Dto/Sys/Job/SetJobEnabledReq.cs
Normal file
@ -0,0 +1,18 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.Job;
|
||||
|
||||
/// <summary>
|
||||
/// 请求:设置计划作业启用状态
|
||||
/// </summary>
|
||||
public sealed record SetJobEnabledReq : Sys_Job
|
||||
{
|
||||
/// <inheritdoc cref="IFieldEnabled.Enabled" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override bool Enabled { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldVersion.Version" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Version { get; init; }
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Dependency;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.JobRecord;
|
||||
@ -8,7 +8,7 @@ namespace NetAdmin.Domain.Dto.Sys.JobRecord;
|
||||
/// </summary>
|
||||
public sealed record QueryJobRecordReq : Sys_JobRecord
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
}
|
@ -1,5 +1,7 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency;
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
using NetAdmin.Domain.Dto.Sys.Job;
|
||||
using HttpMethods = NetAdmin.Domain.Enums.HttpMethods;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.JobRecord;
|
||||
@ -9,6 +11,12 @@ namespace NetAdmin.Domain.Dto.Sys.JobRecord;
|
||||
/// </summary>
|
||||
public sealed record QueryJobRecordRsp : Sys_JobRecord
|
||||
{
|
||||
/// <inheritdoc cref="Sys_JobRecord.HttpStatusCode" />
|
||||
public new string HttpStatusCode =>
|
||||
base.HttpStatusCode == Numbers.HTTP_STATUS_BIZ_FAIL
|
||||
? nameof(ErrorCodes.Unhandled).ToLowerCamelCase()
|
||||
: ((HttpStatusCode)base.HttpStatusCode).ToString().ToLowerCamelCase();
|
||||
|
||||
/// <inheritdoc cref="IFieldCreatedTime.CreatedTime" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override DateTime CreatedTime { get; init; }
|
||||
@ -21,14 +29,15 @@ public sealed record QueryJobRecordRsp : Sys_JobRecord
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override HttpMethods HttpMethod { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_JobRecord.HttpStatusCode" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override int HttpStatusCode { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 作业信息
|
||||
/// </summary>
|
||||
public new QueryJobRsp Job { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_JobRecord.JobId" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long JobId { get; init; }
|
||||
|
@ -1,6 +0,0 @@
|
||||
namespace NetAdmin.Domain.Dto.Sys.JobRecord;
|
||||
|
||||
/// <summary>
|
||||
/// 请求:更新计划作业执行记录
|
||||
/// </summary>
|
||||
public sealed record UpdateJobRecordReq : CreateJobRecordReq;
|
@ -1,3 +1,4 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency;
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.Menu;
|
||||
@ -5,9 +6,9 @@ namespace NetAdmin.Domain.Dto.Sys.Menu;
|
||||
/// <summary>
|
||||
/// 请求:更新菜单
|
||||
/// </summary>
|
||||
public sealed record UpdateMenuReq : CreateMenuReq
|
||||
public sealed record EditMenuReq : CreateMenuReq
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
|
@ -1,4 +1,4 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Dependency;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.Menu;
|
||||
@ -8,7 +8,7 @@ namespace NetAdmin.Domain.Dto.Sys.Menu;
|
||||
/// </summary>
|
||||
public sealed record QueryMenuReq : Sys_Menu
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
}
|
@ -1,3 +1,4 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency;
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
@ -36,7 +37,7 @@ public sealed record QueryMenuRsp : Sys_Menu, IRegister
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override bool HiddenBreadCrumb { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
using NetAdmin.Domain.Dto.Sys.User;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.RequestLog;
|
||||
|
||||
@ -13,6 +14,11 @@ public sealed record QueryRequestLogRsp : Sys_RequestLog, IRegister
|
||||
/// </summary>
|
||||
public new string CreatedClientIp => base.CreatedClientIp?.ToIpV4();
|
||||
|
||||
/// <summary>
|
||||
/// 登录名
|
||||
/// </summary>
|
||||
public string LoginName => RequestBody?.ToObject<LoginByPwdReq>()?.Account;
|
||||
|
||||
/// <summary>
|
||||
/// 操作系统
|
||||
/// </summary>
|
||||
@ -35,10 +41,6 @@ public sealed record QueryRequestLogRsp : Sys_RequestLog, IRegister
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public override string CreatedUserAgent { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldCreatedUser.CreatedUserName" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public override string CreatedUserName { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_RequestLog.Duration" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Duration { get; init; }
|
||||
@ -51,10 +53,6 @@ public sealed record QueryRequestLogRsp : Sys_RequestLog, IRegister
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public override string Exception { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_RequestLog.ExtraData" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public override string ExtraData { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_RequestLog.HttpStatusCode" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override int HttpStatusCode { get; init; }
|
||||
@ -63,10 +61,6 @@ public sealed record QueryRequestLogRsp : Sys_RequestLog, IRegister
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public override string Method { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_RequestLog.ReferUrl" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public override string ReferUrl { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_RequestLog.RequestBody" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public override string RequestBody { get; init; }
|
||||
@ -99,6 +93,13 @@ public sealed record QueryRequestLogRsp : Sys_RequestLog, IRegister
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public override int? ServerIp { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_RequestLog.User" />
|
||||
public new QueryUserRsp User { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_RequestLog.UserId" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public override long? UserId { get; init; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public void Register(TypeAdapterConfig config)
|
||||
{
|
||||
|
@ -1,19 +1,18 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency;
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.Role;
|
||||
|
||||
/// <summary>
|
||||
/// 请求:修改角色
|
||||
/// 请求:编辑角色
|
||||
/// </summary>
|
||||
public sealed record UpdateRoleReq : CreateRoleReq
|
||||
public sealed record EditRoleReq : CreateRoleReq
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.唯一编码不能为空))]
|
||||
public override long Id { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldVersion.Version" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.数据版本不能为空))]
|
||||
public override long Version { get; init; }
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Dependency;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.Role;
|
||||
@ -8,7 +8,7 @@ namespace NetAdmin.Domain.Dto.Sys.Role;
|
||||
/// </summary>
|
||||
public sealed record QueryRoleReq : Sys_Role
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
}
|
@ -1,3 +1,4 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency;
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
using NetAdmin.Domain.Enums.Sys;
|
||||
@ -37,7 +38,7 @@ public sealed record QueryRoleRsp : Sys_Role, IRegister
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override bool Enabled { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
|
||||
|
@ -0,0 +1,23 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency;
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.Role;
|
||||
|
||||
/// <summary>
|
||||
/// 请求:设置是否显示仪表板
|
||||
/// </summary>
|
||||
public sealed record SetDisplayDashboardReq : Sys_Role
|
||||
{
|
||||
/// <inheritdoc cref="Sys_Role.DisplayDashboard" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override bool DisplayDashboard { get; init; }
|
||||
|
||||
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldVersion.Version" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Version { get; init; }
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency;
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.Role;
|
||||
|
||||
/// <summary>
|
||||
/// 请求:设置是否忽略权限控制
|
||||
/// </summary>
|
||||
public sealed record SetIgnorePermissionControlReq : Sys_Role
|
||||
{
|
||||
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_Role.IgnorePermissionControl" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override bool IgnorePermissionControl { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldVersion.Version" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Version { get; init; }
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency;
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.Role;
|
||||
|
||||
/// <summary>
|
||||
/// 请求:启用/禁用角色
|
||||
/// </summary>
|
||||
public sealed record SetRoleEnabledReq : Sys_Role
|
||||
{
|
||||
/// <inheritdoc cref="IFieldEnabled.Enabled" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override bool Enabled { get; init; }
|
||||
|
||||
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldVersion.Version" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Version { get; init; }
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Dependency;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsg;
|
||||
@ -8,7 +8,7 @@ namespace NetAdmin.Domain.Dto.Sys.SiteMsg;
|
||||
/// </summary>
|
||||
public sealed record QuerySiteMsgReq : Sys_SiteMsg
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
}
|
@ -1,3 +1,4 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency;
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
using NetAdmin.Domain.Dto.Sys.Dept;
|
||||
@ -29,7 +30,7 @@ public sealed record QuerySiteMsgRsp : Sys_SiteMsg
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public new IEnumerable<QueryDeptRsp> Depts { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
|
||||
|
@ -1,13 +0,0 @@
|
||||
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; }
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Dependency;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsgDept;
|
||||
@ -8,7 +8,7 @@ namespace NetAdmin.Domain.Dto.Sys.SiteMsgDept;
|
||||
/// </summary>
|
||||
public sealed record QuerySiteMsgDeptReq : Sys_SiteMsgDept
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Dependency;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsgDept;
|
||||
@ -8,7 +8,7 @@ namespace NetAdmin.Domain.Dto.Sys.SiteMsgDept;
|
||||
/// </summary>
|
||||
public sealed record QuerySiteMsgDeptRsp : Sys_SiteMsgDept
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsgDept;
|
||||
|
||||
/// <summary>
|
||||
/// 请求:更新站内信-部门映射
|
||||
/// </summary>
|
||||
public sealed record UpdateSiteMsgDeptReq : CreateSiteMsgDeptReq;
|
@ -1,11 +1,12 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.Dto.Sys.SiteMsg;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.Job;
|
||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsgFlag;
|
||||
|
||||
/// <summary>
|
||||
/// 请求:更新计划作业
|
||||
/// 请求:编辑站内信
|
||||
/// </summary>
|
||||
public sealed record UpdateJobReq : CreateJobReq
|
||||
public sealed record EditSiteMsgReq : CreateSiteMsgReq
|
||||
{
|
||||
/// <inheritdoc cref="IFieldVersion.Version" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
@ -1,4 +1,4 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Dependency;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsgFlag;
|
||||
@ -8,7 +8,7 @@ namespace NetAdmin.Domain.Dto.Sys.SiteMsgFlag;
|
||||
/// </summary>
|
||||
public sealed record QuerySiteMsgFlagReq : Sys_SiteMsgFlag
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Dependency;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
using NetAdmin.Domain.Enums.Sys;
|
||||
|
||||
@ -9,7 +9,7 @@ namespace NetAdmin.Domain.Dto.Sys.SiteMsgFlag;
|
||||
/// </summary>
|
||||
public sealed record QuerySiteMsgFlagRsp : Sys_SiteMsgFlag
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
|
||||
|
@ -0,0 +1,6 @@
|
||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsgFlag;
|
||||
|
||||
/// <summary>
|
||||
/// 请求:设置用户站内信状态
|
||||
/// </summary>
|
||||
public sealed record SetUserSiteMsgStatusReq : CreateSiteMsgFlagReq;
|
@ -1,6 +0,0 @@
|
||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsgFlag;
|
||||
|
||||
/// <summary>
|
||||
/// 请求:更新站内信标记
|
||||
/// </summary>
|
||||
public sealed record UpdateSiteMsgFlagReq : CreateSiteMsgFlagReq;
|
@ -1,4 +1,4 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Dependency;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsgRole;
|
||||
@ -8,7 +8,7 @@ namespace NetAdmin.Domain.Dto.Sys.SiteMsgRole;
|
||||
/// </summary>
|
||||
public sealed record QuerySiteMsgRoleReq : Sys_SiteMsgRole
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Dependency;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsgRole;
|
||||
@ -8,7 +8,7 @@ namespace NetAdmin.Domain.Dto.Sys.SiteMsgRole;
|
||||
/// </summary>
|
||||
public sealed record QuerySiteMsgRoleRsp : Sys_SiteMsgRole
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsgRole;
|
||||
|
||||
/// <summary>
|
||||
/// 请求:更新站内信-角色映射
|
||||
/// </summary>
|
||||
public sealed record UpdateSiteMsgRoleReq : CreateSiteMsgRoleReq;
|
@ -1,4 +1,4 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Dependency;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsgUser;
|
||||
@ -8,7 +8,7 @@ namespace NetAdmin.Domain.Dto.Sys.SiteMsgUser;
|
||||
/// </summary>
|
||||
public sealed record QuerySiteMsgUserReq : Sys_SiteMsgUser
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Dependency;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsgUser;
|
||||
@ -8,7 +8,7 @@ namespace NetAdmin.Domain.Dto.Sys.SiteMsgUser;
|
||||
/// </summary>
|
||||
public sealed record QuerySiteMsgUserRsp : Sys_SiteMsgUser
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsgUser;
|
||||
|
||||
/// <summary>
|
||||
/// 请求:更新站内信-用户映射
|
||||
/// </summary>
|
||||
public sealed record UpdateSiteMsgUserReq : CreateSiteMsgUserReq;
|
@ -4,7 +4,7 @@ using NetAdmin.Domain.DbMaps.Sys;
|
||||
namespace NetAdmin.Domain.Dto.Sys.User;
|
||||
|
||||
/// <summary>
|
||||
/// 请求:检查手机号是否可用
|
||||
/// 请求:检查手机号码是否可用
|
||||
/// </summary>
|
||||
public sealed record CheckMobileAvailableReq : Sys_User
|
||||
{
|
||||
|
@ -5,9 +5,9 @@ using NetAdmin.Domain.DbMaps.Sys;
|
||||
namespace NetAdmin.Domain.Dto.Sys.User;
|
||||
|
||||
/// <summary>
|
||||
/// 请求:创建更新用户
|
||||
/// 请求:创建编辑用户
|
||||
/// </summary>
|
||||
public abstract record CreateUpdateUserReq : Sys_User
|
||||
public abstract record CreateEditUserReq : Sys_User
|
||||
{
|
||||
/// <inheritdoc cref="Sys_User.Avatar" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
@ -6,9 +6,9 @@ namespace NetAdmin.Domain.Dto.Sys.User;
|
||||
/// <summary>
|
||||
/// 请求:创建用户
|
||||
/// </summary>
|
||||
public sealed record CreateUserReq : CreateUpdateUserReq, IRegister
|
||||
public sealed record CreateUserReq : CreateEditUserReq, IRegister
|
||||
{
|
||||
/// <inheritdoc cref="CreateUpdateUserReq.PasswordText" />
|
||||
/// <inheritdoc cref="CreateEditUserReq.PasswordText" />
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.密码不能为空))]
|
||||
public override string PasswordText { get; init; }
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency;
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
using NetAdmin.Domain.Dto.Sys.UserProfile;
|
||||
@ -5,16 +6,16 @@ using NetAdmin.Domain.Dto.Sys.UserProfile;
|
||||
namespace NetAdmin.Domain.Dto.Sys.User;
|
||||
|
||||
/// <summary>
|
||||
/// 请求:更新用户
|
||||
/// 请求:编辑用户
|
||||
/// </summary>
|
||||
public sealed record UpdateUserReq : CreateUpdateUserReq
|
||||
public sealed record EditUserReq : CreateEditUserReq
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_User.Profile" />
|
||||
public new UpdateUserProfileReq Profile { get; init; }
|
||||
public new EditUserProfileReq Profile { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldVersion.Version" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
@ -8,7 +8,7 @@ namespace NetAdmin.Domain.Dto.Sys.User;
|
||||
public sealed record LoginByPwdReq : DataAbstraction
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户名、手机号、邮箱
|
||||
/// 用户名、手机号码、邮箱
|
||||
/// </summary>
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.账号不能为空))]
|
||||
public string Account { get; init; }
|
||||
|
@ -21,7 +21,7 @@ public sealed record LoginRsp : DataAbstraction
|
||||
public void SetToRspHeader()
|
||||
{
|
||||
// 设置响应报文头
|
||||
App.HttpContext.Response.Headers[Chars.FLG_HTTP_HEADER_VALUE_ACCESS_TOKEN] = AccessToken;
|
||||
App.HttpContext.Response.Headers[Chars.FLG_HTTP_HEADER_KEY_ACCESS_TOKEN] = AccessToken;
|
||||
App.HttpContext.Response.Headers[Chars.FLG_HTTP_HEADER_KEY_X_ACCESS_TOKEN] = RefreshToken;
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Dependency;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.User;
|
||||
@ -12,7 +12,7 @@ public sealed record QueryUserReq : Sys_User
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long DeptId { get; init; }
|
||||
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user