mirror of
https://github.com/nsnail/NetAdmin.git
synced 2025-08-03 10:27:59 +08:00
Compare commits
14 Commits
Author | SHA1 | Date | |
---|---|---|---|
8a29640aeb | |||
8bc8aa960c | |||
d00f0d2d9c | |||
1442e0a37c | |||
6100e9e9c8 | |||
ae2d1c4932 | |||
366a26a5cd | |||
8b53f66331 | |||
705d027da4 | |||
a3ab97019d | |||
608a1ded5c | |||
366ca0d237 | |||
56b111b1cf | |||
f5bd69ef60 |
18
CHANGELOG.md
18
CHANGELOG.md
@ -2,6 +2,24 @@
|
|||||||
|
|
||||||
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.
|
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.3.0](https://github.com/nsnail/NetAdmin/compare/v1.2.0...v1.3.0) (2024-06-24)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* ✨ 补充多语种文件 ([#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
|
||||||
|
|
||||||
|
* 🐛 补充多语种文件 ([#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)
|
## [1.2.0](https://github.com/nsnail/NetAdmin/compare/v1.1.1...v1.2.0) (2024-06-06)
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
FROM mcr.microsoft.com/dotnet/aspnet:9.0.0-preview.4 AS base
|
FROM mcr.microsoft.com/dotnet/aspnet:9.0.0-preview.5 AS base
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
RUN apt update
|
RUN apt update
|
||||||
|
31
README.md
31
README.md
@ -20,33 +20,32 @@ docker run -p 8080:8080 nsnail/netadmin
|
|||||||
## 构建步骤
|
## 构建步骤
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
# 1. 克隆代码仓库
|
# 1. 检查 dotnet sdk 版本 >=9.0.0
|
||||||
# 下载 git https://git-scm.com/downloads
|
dotnet --list-sdks
|
||||||
|
# 下载 dotnet:https://dotnet.microsoft.com/zh-cn/download/dotnet
|
||||||
|
|
||||||
|
# 2. 克隆代码仓库
|
||||||
git clone https://github.com/nsnail/NetAdmin.git && cd ./NetAdmin
|
git clone https://github.com/nsnail/NetAdmin.git && cd ./NetAdmin
|
||||||
|
|
||||||
# 2. 检查dotnet-sdk版本>=9.0.0
|
# 3. 检查本机 redis 运行状态
|
||||||
# 下载 dotnet https://dotnet.microsoft.com/zh-cn/download/dotnet
|
redis-cli dbsize
|
||||||
dotnet --list-sdks
|
# 下载 redis for windows:https://github.com/redis-windows/redis-windows/releases
|
||||||
|
# 下载 redis for linux/mac:https://redis.io/download
|
||||||
|
|
||||||
# 3. 确保本机redis处于运行状态
|
# 4. 运行后端 WebApi
|
||||||
# 下载 redis for windows https://github.com/redis-windows/redis-windows/releases
|
|
||||||
# 下载 redis for linux/mac https://redis.io/download
|
|
||||||
redis-cli
|
|
||||||
|
|
||||||
# 4. 运行后端WebApi
|
|
||||||
# 浏览器打开 http://localhost:5010 ,将看到Swagger(Knife4jUI)界面
|
|
||||||
dotnet run --project ./src/backend/NetAdmin.AdmServer.Host/NetAdmin.AdmServer.Host.csproj --urls http://[::]:5010 -is
|
dotnet run --project ./src/backend/NetAdmin.AdmServer.Host/NetAdmin.AdmServer.Host.csproj --urls http://[::]:5010 -is
|
||||||
|
# 浏览器打开 http://localhost:5010 ,将看到Swagger(Knife4jUI)界面
|
||||||
|
|
||||||
# 5. 检查nodejs版本>=20
|
# 5. 检查 nodejs 版本 >=20
|
||||||
# 下载 nodejs https://nodejs.org/en/download
|
|
||||||
node -v
|
node -v
|
||||||
|
# 下载 nodejs:https://nodejs.org/en/download
|
||||||
|
|
||||||
# 6. 安装npm依赖包
|
# 6. 安装 npm 依赖包
|
||||||
cd ./src/frontend/admin && npm install
|
cd ./src/frontend/admin && npm install
|
||||||
|
|
||||||
# 7. 运行前端项目
|
# 7. 运行前端项目
|
||||||
# 浏览器打开 http://localhost:5020 ,将看到管理界面(默认用户名:root,密码:1234qwer)
|
|
||||||
npm run dev
|
npm run dev
|
||||||
|
# 浏览器打开 http://localhost:5020 ,将看到管理界面(默认用户名:root,密码:1234qwer)
|
||||||
```
|
```
|
||||||
|
|
||||||
## 文件目录树
|
## 文件目录树
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
不包含
|
不包含
|
||||||
不排序
|
不排序
|
||||||
不等于
|
不等于
|
||||||
管理模块
|
|
||||||
丧偶
|
丧偶
|
||||||
中专
|
中专
|
||||||
中共党员
|
中共党员
|
||||||
@ -26,6 +25,7 @@
|
|||||||
发送失败
|
发送失败
|
||||||
同步数据库结构
|
同步数据库结构
|
||||||
外国人居留证
|
外国人居留证
|
||||||
|
外部错误
|
||||||
大专
|
大专
|
||||||
大于
|
大于
|
||||||
大于等于
|
大于等于
|
||||||
@ -39,7 +39,6 @@
|
|||||||
已校验
|
已校验
|
||||||
已读
|
已读
|
||||||
并且
|
并且
|
||||||
意外错误
|
|
||||||
成功
|
成功
|
||||||
或者
|
或者
|
||||||
手机
|
手机
|
||||||
@ -50,6 +49,7 @@
|
|||||||
无效操作
|
无效操作
|
||||||
无效输入
|
无效输入
|
||||||
日期范围
|
日期范围
|
||||||
|
未处理异常
|
||||||
未婚
|
未婚
|
||||||
未读
|
未读
|
||||||
本人数据
|
本人数据
|
||||||
@ -65,10 +65,10 @@
|
|||||||
登录
|
登录
|
||||||
硕士
|
硕士
|
||||||
离异
|
离异
|
||||||
私信
|
|
||||||
空闲
|
空闲
|
||||||
等于
|
等于
|
||||||
等待发送
|
等待发送
|
||||||
|
管理模块
|
||||||
系统模块
|
系统模块
|
||||||
绑定手机号码
|
绑定手机号码
|
||||||
结果非预期
|
结果非预期
|
@ -23,7 +23,7 @@ XML注释文件不存在
|
|||||||
学历不正确
|
学历不正确
|
||||||
密码不能为空
|
密码不能为空
|
||||||
已处理完毕
|
已处理完毕
|
||||||
并发冲突请稍后重试
|
并发冲突_请稍后重试
|
||||||
开始事务
|
开始事务
|
||||||
性别不正确
|
性别不正确
|
||||||
手机号码不正确
|
手机号码不正确
|
||||||
@ -34,18 +34,15 @@ XML注释文件不存在
|
|||||||
数据库同步开始
|
数据库同步开始
|
||||||
数据库服务器时钟偏移
|
数据库服务器时钟偏移
|
||||||
数据库结构同步完成
|
数据库结构同步完成
|
||||||
数据版本不能为空
|
|
||||||
文件不能为空
|
文件不能为空
|
||||||
新密码不能为空
|
新密码不能为空
|
||||||
新手机号码验证码不正确
|
新手机号码验证码不正确
|
||||||
无效端口号
|
无效端口号
|
||||||
无效证件号码
|
无效证件号码
|
||||||
日志长度超过限制
|
|
||||||
旧密码不正确
|
旧密码不正确
|
||||||
旧密码不能为空
|
旧密码不能为空
|
||||||
旧手机号码不正确
|
旧手机号码不正确
|
||||||
旧手机号码验证码不正确
|
旧手机号码验证码不正确
|
||||||
时间戳缺失或误差过大
|
|
||||||
时间表达式
|
时间表达式
|
||||||
时间计划不能为空
|
时间计划不能为空
|
||||||
未指定部门
|
未指定部门
|
||||||
@ -62,15 +59,12 @@ XML注释文件不存在
|
|||||||
用户名或密码错误
|
用户名或密码错误
|
||||||
用户名长度4位以上
|
用户名长度4位以上
|
||||||
用户头像不能为空
|
用户头像不能为空
|
||||||
用户档案不能为空
|
|
||||||
用户编号不存在
|
用户编号不存在
|
||||||
用户编号不能为空
|
|
||||||
目标设备不能为空
|
目标设备不能为空
|
||||||
短信验证请求不能为空
|
短信验证请求不能为空
|
||||||
站内信不存在
|
站内信不存在
|
||||||
站内信状态不正确
|
站内信状态不正确
|
||||||
站内信类型不正确
|
站内信类型不正确
|
||||||
签名缺失
|
|
||||||
网络地址不正确
|
网络地址不正确
|
||||||
菜单名称不能为空
|
菜单名称不能为空
|
||||||
菜单标题不能为空
|
菜单标题不能为空
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
"Component": "sys/user",
|
"Component": "sys/user",
|
||||||
"Icon": "el-icon-user",
|
"Icon": "el-icon-user",
|
||||||
"Id": 373837957840901,
|
"Id": 373837957840901,
|
||||||
"Name": "sys-user",
|
"Name": "sys/user",
|
||||||
"ParentId": 373837917724677,
|
"ParentId": 373837917724677,
|
||||||
"Path": "/sys/user",
|
"Path": "/sys/user",
|
||||||
"Sort": 100,
|
"Sort": 100,
|
||||||
@ -35,7 +35,7 @@
|
|||||||
"Component": "sys/role",
|
"Component": "sys/role",
|
||||||
"Icon": "sc-icon-role",
|
"Icon": "sc-icon-role",
|
||||||
"Id": 373838018527237,
|
"Id": 373838018527237,
|
||||||
"Name": "sys-role",
|
"Name": "sys/role",
|
||||||
"ParentId": 373837917724677,
|
"ParentId": 373837917724677,
|
||||||
"Path": "/sys/role",
|
"Path": "/sys/role",
|
||||||
"Sort": 99,
|
"Sort": 99,
|
||||||
@ -46,7 +46,7 @@
|
|||||||
"Component": "sys/dept",
|
"Component": "sys/dept",
|
||||||
"Icon": "sc-icon-dept",
|
"Icon": "sc-icon-dept",
|
||||||
"Id": 373838045605893,
|
"Id": 373838045605893,
|
||||||
"Name": "sys-dept",
|
"Name": "sys/dept",
|
||||||
"ParentId": 373837917724677,
|
"ParentId": 373837917724677,
|
||||||
"Path": "/sys/dept",
|
"Path": "/sys/dept",
|
||||||
"Sort": 98,
|
"Sort": 98,
|
||||||
@ -57,7 +57,7 @@
|
|||||||
"Component": "sys/menu",
|
"Component": "sys/menu",
|
||||||
"Icon": "el-icon-fold",
|
"Icon": "el-icon-fold",
|
||||||
"Id": 373838070898693,
|
"Id": 373838070898693,
|
||||||
"Name": "sys-menu",
|
"Name": "sys/menu",
|
||||||
"ParentId": 373837917724677,
|
"ParentId": 373837917724677,
|
||||||
"Path": "/sys/menu",
|
"Path": "/sys/menu",
|
||||||
"Sort": 97,
|
"Sort": 97,
|
||||||
@ -78,7 +78,7 @@
|
|||||||
"Component": "sys/config",
|
"Component": "sys/config",
|
||||||
"Icon": "el-icon-set-up",
|
"Icon": "el-icon-set-up",
|
||||||
"Id": 380415005847557,
|
"Id": 380415005847557,
|
||||||
"Name": "sys-config",
|
"Name": "sys/config",
|
||||||
"ParentId": 485278637670422,
|
"ParentId": 485278637670422,
|
||||||
"Path": "/sys/config",
|
"Path": "/sys/config",
|
||||||
"Sort": 100,
|
"Sort": 100,
|
||||||
@ -89,7 +89,7 @@
|
|||||||
"Component": "sys/job",
|
"Component": "sys/job",
|
||||||
"Icon": "sc-icon-ScheduledJob",
|
"Icon": "sc-icon-ScheduledJob",
|
||||||
"Id": 510067557638158,
|
"Id": 510067557638158,
|
||||||
"Name": "sys-job",
|
"Name": "sys/job",
|
||||||
"ParentId": 485278637670422,
|
"ParentId": 485278637670422,
|
||||||
"Path": "/sys/job",
|
"Path": "/sys/job",
|
||||||
"Sort": 99,
|
"Sort": 99,
|
||||||
@ -100,7 +100,7 @@
|
|||||||
"Component": "sys/dic",
|
"Component": "sys/dic",
|
||||||
"Icon": "sc-icon-dic",
|
"Icon": "sc-icon-dic",
|
||||||
"Id": 375315654221829,
|
"Id": 375315654221829,
|
||||||
"Name": "sys-dic",
|
"Name": "sys/dic",
|
||||||
"ParentId": 485278637670422,
|
"ParentId": 485278637670422,
|
||||||
"Path": "/sys/dic",
|
"Path": "/sys/dic",
|
||||||
"Sort": 98,
|
"Sort": 98,
|
||||||
@ -111,7 +111,7 @@
|
|||||||
"Component": "sys/msg",
|
"Component": "sys/msg",
|
||||||
"Icon": "el-icon-message",
|
"Icon": "el-icon-message",
|
||||||
"Id": 482779610341392,
|
"Id": 482779610341392,
|
||||||
"Name": "sys-msg",
|
"Name": "sys/msg",
|
||||||
"ParentId": 485278637670422,
|
"ParentId": 485278637670422,
|
||||||
"Path": "/sys/msg",
|
"Path": "/sys/msg",
|
||||||
"Sort": 97,
|
"Sort": 97,
|
||||||
@ -122,7 +122,7 @@
|
|||||||
"Component": "sys/api",
|
"Component": "sys/api",
|
||||||
"Icon": "sc-icon-api",
|
"Icon": "sc-icon-api",
|
||||||
"Id": 397880678895621,
|
"Id": 397880678895621,
|
||||||
"Name": "sys-api",
|
"Name": "sys/api",
|
||||||
"ParentId": 485278637670422,
|
"ParentId": 485278637670422,
|
||||||
"Path": "/sys/api",
|
"Path": "/sys/api",
|
||||||
"Sort": 96,
|
"Sort": 96,
|
||||||
@ -133,7 +133,7 @@
|
|||||||
"Component": "sys/cache",
|
"Component": "sys/cache",
|
||||||
"Icon": "sc-icon-memory",
|
"Icon": "sc-icon-memory",
|
||||||
"Id": 374911555702789,
|
"Id": 374911555702789,
|
||||||
"Name": "sys-cache",
|
"Name": "sys/cache",
|
||||||
"ParentId": 485278637670422,
|
"ParentId": 485278637670422,
|
||||||
"Path": "/sys/cache",
|
"Path": "/sys/cache",
|
||||||
"Sort": 95,
|
"Sort": 95,
|
||||||
@ -154,7 +154,7 @@
|
|||||||
"Component": "sys/log/operation",
|
"Component": "sys/log/operation",
|
||||||
"Icon": "el-icon-pointer",
|
"Icon": "el-icon-pointer",
|
||||||
"Id": 485285246504976,
|
"Id": 485285246504976,
|
||||||
"Name": "sys-log-operation",
|
"Name": "sys/log/operation",
|
||||||
"ParentId": 374792687640581,
|
"ParentId": 374792687640581,
|
||||||
"Path": "/sys/log/operation",
|
"Path": "/sys/log/operation",
|
||||||
"Sort": 100,
|
"Sort": 100,
|
||||||
@ -165,7 +165,7 @@
|
|||||||
"Component": "sys/log/login",
|
"Component": "sys/log/login",
|
||||||
"Icon": "sc-icon-OpenDoor",
|
"Icon": "sc-icon-OpenDoor",
|
||||||
"Id": 485285246504970,
|
"Id": 485285246504970,
|
||||||
"Name": "sys-log-login",
|
"Name": "sys/log/login",
|
||||||
"ParentId": 374792687640581,
|
"ParentId": 374792687640581,
|
||||||
"Path": "/sys/log/login",
|
"Path": "/sys/log/login",
|
||||||
"Sort": 99,
|
"Sort": 99,
|
||||||
@ -186,7 +186,7 @@
|
|||||||
"Component": "dev/code",
|
"Component": "dev/code",
|
||||||
"Icon": "sc-icon-code2",
|
"Icon": "sc-icon-code2",
|
||||||
"Id": 373838147022853,
|
"Id": 373838147022853,
|
||||||
"Name": "dev-code",
|
"Name": "dev/code",
|
||||||
"ParentId": 373838105399301,
|
"ParentId": 373838105399301,
|
||||||
"Path": "/dev/code",
|
"Path": "/dev/code",
|
||||||
"Sort": 100,
|
"Sort": 100,
|
||||||
@ -197,10 +197,20 @@
|
|||||||
"Id": 482777529417739,
|
"Id": 482777529417739,
|
||||||
"ParentId": 373838105399301,
|
"ParentId": 373838105399301,
|
||||||
"Icon": "el-icon-eleme-filled",
|
"Icon": "el-icon-eleme-filled",
|
||||||
"Name": "dev-element",
|
"Name": "dev/element",
|
||||||
"Path": "https://element-plus.gitee.io/zh-CN/component/button.html",
|
"Path": "http://element-plus.org/zh-CN/component/overview.html",
|
||||||
"Sort": 99,
|
"Sort": 99,
|
||||||
"Title": "Element",
|
"Title": "Element",
|
||||||
"Type": 3,
|
"Type": 3,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Id": 560217289232398,
|
||||||
|
"ParentId": 373838105399301,
|
||||||
|
"Icon": "sc-icon-FreeSql",
|
||||||
|
"Name": "dev/freesql",
|
||||||
|
"Path": "https://freesql.net/guide",
|
||||||
|
"Sort": 99,
|
||||||
|
"Title": "FreeSql",
|
||||||
|
"Type": 3,
|
||||||
}
|
}
|
||||||
]
|
]
|
@ -34,5 +34,13 @@
|
|||||||
{
|
{
|
||||||
"ApiId": "api/sys/site.msg/set.site.msg.status",
|
"ApiId": "api/sys/site.msg/set.site.msg.status",
|
||||||
"RoleId": 371729946431493,
|
"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",
|
"Password": "A8E87D23-49BC-25A1-1C7C-59186BEF5D15",
|
||||||
"Token": "A9AFD92E-A33D-4152-9A6C-A9C141D24887",
|
"Token": "A9AFD92E-A33D-4152-9A6C-A9C141D24887",
|
||||||
"UserName": "root"
|
"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": 370942943322181
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Id": 560217289236492
|
||||||
}
|
}
|
||||||
]
|
]
|
@ -2,5 +2,9 @@
|
|||||||
{
|
{
|
||||||
"RoleId": 370943613149253,
|
"RoleId": 370943613149253,
|
||||||
"UserId": 370942943322181
|
"UserId": 370942943322181
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"RoleId": 371729946431493,
|
||||||
|
"UserId": 560217289236492
|
||||||
}
|
}
|
||||||
]
|
]
|
@ -23,7 +23,7 @@
|
|||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="SonarAnalyzer.CSharp" Version="9.26.0.92422">
|
<PackageReference Include="SonarAnalyzer.CSharp" Version="9.27.0.93347">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
@ -16,8 +16,8 @@
|
|||||||
<None Include="$(SolutionDir)/assets/res/Nations.ln">
|
<None Include="$(SolutionDir)/assets/res/Nations.ln">
|
||||||
<Link>Languages/Nations.ln</Link>
|
<Link>Languages/Nations.ln</Link>
|
||||||
</None>
|
</None>
|
||||||
<None Include="$(SolutionDir)/assets/res/Enums.ln">
|
<None Include="$(SolutionDir)/assets/res/Fields.ln">
|
||||||
<Link>Languages/Enums.ln</Link>
|
<Link>Languages/Fields.ln</Link>
|
||||||
</None>
|
</None>
|
||||||
<EmbeddedResource Include="$(SolutionDir)/assets/res/Ln.resx">
|
<EmbeddedResource Include="$(SolutionDir)/assets/res/Ln.resx">
|
||||||
<Link>Languages/Ln.resx</Link>
|
<Link>Languages/Ln.resx</Link>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"version": "1.2.0",
|
"version": "1.3.0",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"cz-git": "^1.9.2",
|
"cz-git": "^1.9.2",
|
||||||
"commitizen": "^4.3.0",
|
"commitizen": "^4.3.0",
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"packageName": "Furion.Pure.NS",
|
"packageName": "Furion.Pure.NS",
|
||||||
"version": "4.9.3-ns1"
|
"version": "4.9.4-ns1"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
<PropertyGroup>
|
||||||
|
<DefineConstants>DBTYPE_SQLITE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
<Import Project="$(SolutionDir)/build/code.quality.props"/>
|
<Import Project="$(SolutionDir)/build/code.quality.props"/>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="../NetAdmin.SysComponent.Application/NetAdmin.SysComponent.Application.csproj"/>
|
<ProjectReference Include="../NetAdmin.SysComponent.Application/NetAdmin.SysComponent.Application.csproj"/>
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -10,16 +10,12 @@ namespace NetAdmin.Application.Modules;
|
|||||||
/// <typeparam name="TCreateRsp">创建响应类型</typeparam>
|
/// <typeparam name="TCreateRsp">创建响应类型</typeparam>
|
||||||
/// <typeparam name="TQueryReq">查询请求类型</typeparam>
|
/// <typeparam name="TQueryReq">查询请求类型</typeparam>
|
||||||
/// <typeparam name="TQueryRsp">查询响应类型</typeparam>
|
/// <typeparam name="TQueryRsp">查询响应类型</typeparam>
|
||||||
/// <typeparam name="TUpdateReq">修改请求类型</typeparam>
|
|
||||||
/// <typeparam name="TUpdateRsp">修改响应类型</typeparam>
|
|
||||||
/// <typeparam name="TDelReq">删除请求类型</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 TCreateReq : DataAbstraction, new()
|
||||||
where TCreateRsp : DataAbstraction
|
where TCreateRsp : DataAbstraction
|
||||||
where TQueryReq : DataAbstraction, new()
|
where TQueryReq : DataAbstraction, new()
|
||||||
where TQueryRsp : DataAbstraction
|
where TQueryRsp : DataAbstraction
|
||||||
where TUpdateReq : DataAbstraction, new()
|
|
||||||
where TUpdateRsp : DataAbstraction
|
|
||||||
where TDelReq : DataAbstraction, new()
|
where TDelReq : DataAbstraction, new()
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -61,9 +57,4 @@ public interface ICrudModule<in TCreateReq, TCreateRsp, TQueryReq, TQueryRsp, in
|
|||||||
/// 查询实体
|
/// 查询实体
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Task<IEnumerable<TQueryRsp>> QueryAsync(QueryReq<TQueryReq> req);
|
Task<IEnumerable<TQueryRsp>> QueryAsync(QueryReq<TQueryReq> req);
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 更新实体
|
|
||||||
/// </summary>
|
|
||||||
Task<TUpdateRsp> UpdateAsync(TUpdateReq req);
|
|
||||||
}
|
}
|
@ -1,4 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
<PropertyGroup>
|
||||||
|
<DefineConstants>DBTYPE_SQLITE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
<Import Project="$(SolutionDir)/build/code.quality.props"/>
|
<Import Project="$(SolutionDir)/build/code.quality.props"/>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="../NetAdmin.Domain/NetAdmin.Domain.csproj"/>
|
<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;
|
|
||||||
}
|
|
@ -7,9 +7,11 @@ namespace NetAdmin.Application.Services;
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// RedLocker Service Base
|
/// RedLocker Service Base
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public abstract class RedLockerService<T1, T2>(DefaultRepository<T1> rpo, RedLocker redLocker)
|
public abstract class RedLockerService<TEntity, TPrimary, TLogger>(
|
||||||
: RepositoryService<T1, T2>(rpo)
|
BasicRepository<TEntity, TPrimary> rpo
|
||||||
where T1 : EntityBase
|
, RedLocker redLocker) : RepositoryService<TEntity, TPrimary, TLogger>(rpo)
|
||||||
|
where TEntity : EntityBase<TPrimary> //
|
||||||
|
where TPrimary : IEquatable<TPrimary>
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取锁
|
/// 获取锁
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
using NetAdmin.Application.Repositories;
|
using NetAdmin.Application.Repositories;
|
||||||
using NetAdmin.Domain.DbMaps.Dependency;
|
using NetAdmin.Domain.DbMaps.Dependency;
|
||||||
|
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||||
|
|
||||||
namespace NetAdmin.Application.Services;
|
namespace NetAdmin.Application.Services;
|
||||||
|
|
||||||
@ -7,14 +8,17 @@ namespace NetAdmin.Application.Services;
|
|||||||
/// 仓储服务基类
|
/// 仓储服务基类
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <typeparam name="TEntity">实体类型</typeparam>
|
/// <typeparam name="TEntity">实体类型</typeparam>
|
||||||
|
/// <typeparam name="TPrimary">主键类型</typeparam>
|
||||||
/// <typeparam name="TLogger">日志类型</typeparam>
|
/// <typeparam name="TLogger">日志类型</typeparam>
|
||||||
public abstract class RepositoryService<TEntity, TLogger>(DefaultRepository<TEntity> rpo) : ServiceBase<TLogger>
|
public abstract class RepositoryService<TEntity, TPrimary, TLogger>(BasicRepository<TEntity, TPrimary> rpo)
|
||||||
where TEntity : EntityBase
|
: ServiceBase<TLogger>
|
||||||
|
where TEntity : EntityBase<TPrimary> //
|
||||||
|
where TPrimary : IEquatable<TPrimary>
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 默认仓储
|
/// 默认仓储
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected DefaultRepository<TEntity> Rpo => rpo;
|
protected BasicRepository<TEntity, TPrimary> Rpo => rpo;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 启用级联保存
|
/// 启用级联保存
|
||||||
@ -25,10 +29,72 @@ public abstract class RepositoryService<TEntity, TLogger>(DefaultRepository<TEnt
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 针对 Sqlite 数据的更新操作
|
/// 更新实体
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>
|
/// <param name="newValue">新的值</param>
|
||||||
/// 非 Sqlite 数据库请删除
|
/// <param name="includeFields">包含的属性</param>
|
||||||
/// </returns>
|
/// <param name="excludeFields">排除的属性</param>
|
||||||
protected abstract Task<TEntity> UpdateForSqliteAsync(TEntity req);
|
/// <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;
|
||||||
|
}
|
||||||
}
|
}
|
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>
|
||||||
/// 数据库实体基类
|
/// 数据库实体基类
|
||||||
/// </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>
|
/// </summary>
|
||||||
int? CreatedClientIp { get; init; }
|
int? CreatedClientIp { get; init; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 创建者来源地址
|
|
||||||
/// </summary>
|
|
||||||
string CreatedReferer { get; init; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 创建者客户端用户代理
|
/// 创建者客户端用户代理
|
||||||
/// </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 />
|
/// <inheritdoc />
|
||||||
public abstract record ImmutableEntity : ImmutableEntity<long>
|
public abstract record ImmutableEntity : ImmutableEntity<long>
|
||||||
{
|
{
|
||||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||||
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
|
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
|
||||||
[Snowflake]
|
[Snowflake]
|
||||||
public override long Id { get; init; }
|
public override long Id { get; init; }
|
||||||
@ -17,6 +17,7 @@ public abstract record ImmutableEntity : ImmutableEntity<long>
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <typeparam name="T">主键类型</typeparam>
|
/// <typeparam name="T">主键类型</typeparam>
|
||||||
public abstract record ImmutableEntity<T> : LiteImmutableEntity<T>, IFieldCreatedUser
|
public abstract record ImmutableEntity<T> : LiteImmutableEntity<T>, IFieldCreatedUser
|
||||||
|
where T : IEquatable<T>
|
||||||
{
|
{
|
||||||
/// <inheritdoc cref="IFieldCreatedUser.CreatedUserId" />
|
/// <inheritdoc cref="IFieldCreatedUser.CreatedUserId" />
|
||||||
[Column(CanUpdate = false, Position = -1)]
|
[Column(CanUpdate = false, Position = -1)]
|
||||||
@ -28,7 +29,7 @@ public abstract record ImmutableEntity<T> : LiteImmutableEntity<T>, IFieldCreate
|
|||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public virtual string CreatedUserName { get; init; }
|
public virtual string CreatedUserName { get; init; }
|
||||||
|
|
||||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||||
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
|
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
|
||||||
public override T Id { get; init; }
|
public override T Id { get; init; }
|
||||||
}
|
}
|
@ -6,7 +6,7 @@ namespace NetAdmin.Domain.DbMaps.Dependency;
|
|||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public abstract record LiteImmutableEntity : LiteImmutableEntity<long>
|
public abstract record LiteImmutableEntity : LiteImmutableEntity<long>
|
||||||
{
|
{
|
||||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||||
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
|
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
|
||||||
[Snowflake]
|
[Snowflake]
|
||||||
public override long Id { get; init; }
|
public override long Id { get; init; }
|
||||||
@ -16,15 +16,16 @@ public abstract record LiteImmutableEntity : LiteImmutableEntity<long>
|
|||||||
/// 轻型不可变实体
|
/// 轻型不可变实体
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <typeparam name="T">主键类型</typeparam>
|
/// <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" />
|
/// <inheritdoc cref="IFieldCreatedTime.CreatedTime" />
|
||||||
[Column(ServerTime = DateTimeKind.Local, CanUpdate = false, Position = -1)]
|
[Column(ServerTime = DateTimeKind.Local, CanUpdate = false, Position = -1)]
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public virtual DateTime CreatedTime { get; init; }
|
public virtual DateTime CreatedTime { get; init; }
|
||||||
|
|
||||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||||
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
|
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public virtual T Id { get; init; }
|
public override T Id { get; init; }
|
||||||
}
|
}
|
@ -6,7 +6,7 @@ namespace NetAdmin.Domain.DbMaps.Dependency;
|
|||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public abstract record LiteMutableEntity : LiteMutableEntity<long>
|
public abstract record LiteMutableEntity : LiteMutableEntity<long>
|
||||||
{
|
{
|
||||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||||
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
|
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
|
||||||
[Snowflake]
|
[Snowflake]
|
||||||
public override long Id { get; init; }
|
public override long Id { get; init; }
|
||||||
@ -16,8 +16,9 @@ public abstract record LiteMutableEntity : LiteMutableEntity<long>
|
|||||||
/// 轻型可变实体
|
/// 轻型可变实体
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public abstract record LiteMutableEntity<T> : LiteImmutableEntity<T>, IFieldModifiedTime
|
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)]
|
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
|
||||||
public override T Id { get; init; }
|
public override T Id { get; init; }
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ namespace NetAdmin.Domain.DbMaps.Dependency;
|
|||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public abstract record LiteVersionEntity : LiteVersionEntity<long>
|
public abstract record LiteVersionEntity : LiteVersionEntity<long>
|
||||||
{
|
{
|
||||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||||
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
|
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
|
||||||
[Snowflake]
|
[Snowflake]
|
||||||
public override long Id { get; init; }
|
public override long Id { get; init; }
|
||||||
@ -16,8 +16,9 @@ public abstract record LiteVersionEntity : LiteVersionEntity<long>
|
|||||||
/// 乐观锁轻型可变实体
|
/// 乐观锁轻型可变实体
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public abstract record LiteVersionEntity<T> : LiteMutableEntity<T>, IFieldVersion
|
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)]
|
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
|
||||||
public override T Id { get; init; }
|
public override T Id { get; init; }
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ namespace NetAdmin.Domain.DbMaps.Dependency;
|
|||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public abstract record MutableEntity : MutableEntity<long>
|
public abstract record MutableEntity : MutableEntity<long>
|
||||||
{
|
{
|
||||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||||
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
|
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
|
||||||
[Snowflake]
|
[Snowflake]
|
||||||
public override long Id { get; init; }
|
public override long Id { get; init; }
|
||||||
@ -16,8 +16,9 @@ public abstract record MutableEntity : MutableEntity<long>
|
|||||||
/// 可变实体
|
/// 可变实体
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public abstract record MutableEntity<T> : LiteMutableEntity<T>, IFieldModifiedUser
|
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)]
|
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
|
||||||
public override T Id { get; init; }
|
public override T Id { get; init; }
|
||||||
|
|
||||||
|
@ -1,6 +1,18 @@
|
|||||||
|
using NetAdmin.Domain.Attributes;
|
||||||
|
|
||||||
namespace NetAdmin.Domain.DbMaps.Dependency;
|
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>
|
||||||
/// 简单实体
|
/// 简单实体
|
||||||
/// </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 />
|
/// <inheritdoc />
|
||||||
public abstract record VersionEntity : VersionEntity<long>
|
public abstract record VersionEntity : VersionEntity<long>
|
||||||
{
|
{
|
||||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||||
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
|
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
|
||||||
[Snowflake]
|
[Snowflake]
|
||||||
public override long Id { get; init; }
|
public override long Id { get; init; }
|
||||||
@ -16,6 +16,7 @@ public abstract record VersionEntity : VersionEntity<long>
|
|||||||
/// 乐观锁可变实体
|
/// 乐观锁可变实体
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public abstract record VersionEntity<T> : LiteVersionEntity<T>, IFieldModifiedUser, IFieldCreatedUser
|
public abstract record VersionEntity<T> : LiteVersionEntity<T>, IFieldModifiedUser, IFieldCreatedUser
|
||||||
|
where T : IEquatable<T>
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
[Column(CanUpdate = false, Position = -1)]
|
[Column(CanUpdate = false, Position = -1)]
|
||||||
@ -27,7 +28,7 @@ public abstract record VersionEntity<T> : LiteVersionEntity<T>, IFieldModifiedUs
|
|||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public virtual string CreatedUserName { get; init; }
|
public virtual string CreatedUserName { get; init; }
|
||||||
|
|
||||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||||
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
|
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
|
||||||
public override T Id { get; init; }
|
public override T Id { get; init; }
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ public record Sys_Api : ImmutableEntity<string>, IFieldSummary
|
|||||||
[Navigate(nameof(ParentId))]
|
[Navigate(nameof(ParentId))]
|
||||||
public IEnumerable<Sys_Api> Children { get; init; }
|
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)]
|
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_127, IsIdentity = false, IsPrimary = true, Position = 1)]
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public override string Id { get; init; }
|
public override string Id { get; init; }
|
||||||
|
@ -61,11 +61,7 @@ public record Sys_Dept : VersionEntity, IFieldEnabled, IFieldSummary, IFieldSort
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 部门描述
|
/// 部门描述
|
||||||
/// </summary>
|
/// </summary>
|
||||||
#if DBTYPE_SQLITE
|
|
||||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||||
#else
|
|
||||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)]
|
|
||||||
#endif
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public virtual string Summary { get; init; }
|
public virtual string Summary { get; init; }
|
||||||
}
|
}
|
@ -75,10 +75,10 @@ public record Sys_Job : VersionEntity, IFieldEnabled, IFieldSummary
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 请求体
|
/// 请求体
|
||||||
/// </summary>
|
/// </summary>
|
||||||
#if DBTYPE_SQLITE
|
#if DBTYPE_SQLSERVER
|
||||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
|
||||||
#else
|
|
||||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)]
|
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)]
|
||||||
|
#else
|
||||||
|
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||||
#endif
|
#endif
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public virtual string RequestBody { get; init; }
|
public virtual string RequestBody { get; init; }
|
||||||
@ -86,10 +86,10 @@ public record Sys_Job : VersionEntity, IFieldEnabled, IFieldSummary
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 请求头
|
/// 请求头
|
||||||
/// </summary>
|
/// </summary>
|
||||||
#if DBTYPE_SQLITE
|
#if DBTYPE_SQLSERVER
|
||||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
|
||||||
#else
|
|
||||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)]
|
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)]
|
||||||
|
#else
|
||||||
|
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||||
#endif
|
#endif
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public virtual string RequestHeader { get; init; }
|
public virtual string RequestHeader { get; init; }
|
||||||
@ -97,10 +97,10 @@ public record Sys_Job : VersionEntity, IFieldEnabled, IFieldSummary
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 请求的网络地址
|
/// 请求的网络地址
|
||||||
/// </summary>
|
/// </summary>
|
||||||
#if DBTYPE_SQLITE
|
#if DBTYPE_SQLSERVER
|
||||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
|
||||||
#else
|
|
||||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)]
|
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)]
|
||||||
|
#else
|
||||||
|
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||||
#endif
|
#endif
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public virtual string RequestUrl { get; init; }
|
public virtual string RequestUrl { get; init; }
|
||||||
@ -113,10 +113,10 @@ public record Sys_Job : VersionEntity, IFieldEnabled, IFieldSummary
|
|||||||
public virtual JobStatues Status { get; init; }
|
public virtual JobStatues Status { get; init; }
|
||||||
|
|
||||||
/// <inheritdoc cref="IFieldSummary.Summary" />
|
/// <inheritdoc cref="IFieldSummary.Summary" />
|
||||||
#if DBTYPE_SQLITE
|
#if DBTYPE_SQLSERVER
|
||||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
|
||||||
#else
|
|
||||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)]
|
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)]
|
||||||
|
#else
|
||||||
|
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||||
#endif
|
#endif
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public virtual string Summary { get; init; }
|
public virtual string Summary { get; init; }
|
||||||
|
@ -7,6 +7,9 @@ namespace NetAdmin.Domain.DbMaps.Sys;
|
|||||||
/// 计划作业执行记录表
|
/// 计划作业执行记录表
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Index($"{Chars.FLG_DB_INDEX_PREFIX}{nameof(JobId)}_{nameof(TimeId)}", $"{nameof(JobId)},{nameof(TimeId)}", true)]
|
[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))]
|
[Table(Name = Chars.FLG_DB_TABLE_NAME_PREFIX + nameof(Sys_JobRecord))]
|
||||||
public record Sys_JobRecord : LiteImmutableEntity
|
public record Sys_JobRecord : LiteImmutableEntity
|
||||||
{
|
{
|
||||||
@ -29,7 +32,7 @@ public record Sys_JobRecord : LiteImmutableEntity
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[Column]
|
[Column]
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public virtual int HttpStatusCode { get; init; }
|
public int HttpStatusCode { get; init; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 拥有者信息
|
/// 拥有者信息
|
||||||
@ -48,10 +51,10 @@ public record Sys_JobRecord : LiteImmutableEntity
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 请求体
|
/// 请求体
|
||||||
/// </summary>
|
/// </summary>
|
||||||
#if DBTYPE_SQLITE
|
#if DBTYPE_SQLSERVER
|
||||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
|
||||||
#else
|
|
||||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)]
|
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)]
|
||||||
|
#else
|
||||||
|
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||||
#endif
|
#endif
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public virtual string RequestBody { get; init; }
|
public virtual string RequestBody { get; init; }
|
||||||
@ -59,10 +62,10 @@ public record Sys_JobRecord : LiteImmutableEntity
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 请求头
|
/// 请求头
|
||||||
/// </summary>
|
/// </summary>
|
||||||
#if DBTYPE_SQLITE
|
#if DBTYPE_SQLSERVER
|
||||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
|
||||||
#else
|
|
||||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)]
|
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)]
|
||||||
|
#else
|
||||||
|
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||||
#endif
|
#endif
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public virtual string RequestHeader { get; init; }
|
public virtual string RequestHeader { get; init; }
|
||||||
@ -77,10 +80,10 @@ public record Sys_JobRecord : LiteImmutableEntity
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 响应体
|
/// 响应体
|
||||||
/// </summary>
|
/// </summary>
|
||||||
#if DBTYPE_SQLITE
|
#if DBTYPE_SQLSERVER
|
||||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
|
||||||
#else
|
|
||||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)]
|
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)]
|
||||||
|
#else
|
||||||
|
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||||
#endif
|
#endif
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public virtual string ResponseBody { get; init; }
|
public virtual string ResponseBody { get; init; }
|
||||||
@ -88,10 +91,10 @@ public record Sys_JobRecord : LiteImmutableEntity
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 响应头
|
/// 响应头
|
||||||
/// </summary>
|
/// </summary>
|
||||||
#if DBTYPE_SQLITE
|
#if DBTYPE_SQLSERVER
|
||||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
|
||||||
#else
|
|
||||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)]
|
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)]
|
||||||
|
#else
|
||||||
|
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||||
#endif
|
#endif
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public virtual string ResponseHeader { get; init; }
|
public virtual string ResponseHeader { get; init; }
|
||||||
|
@ -8,8 +8,10 @@ namespace NetAdmin.Domain.DbMaps.Sys;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[Index(Chars.FLG_DB_INDEX_PREFIX + nameof(ApiId), nameof(ApiId), false)]
|
[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(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))]
|
[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>
|
/// <summary>
|
||||||
/// 接口
|
/// 接口
|
||||||
@ -25,31 +27,21 @@ public record Sys_RequestLog : ImmutableEntity, IFieldCreatedClient
|
|||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public virtual string ApiId { get; init; }
|
public virtual string ApiId { get; init; }
|
||||||
|
|
||||||
/// <summary>
|
/// <inheritdoc />
|
||||||
/// 创建者客户端IP
|
|
||||||
/// </summary>
|
|
||||||
[Column(Position = -1)]
|
[Column(Position = -1)]
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public int? CreatedClientIp { get; init; }
|
public int? CreatedClientIp { get; init; }
|
||||||
|
|
||||||
/// <summary>
|
/// <inheritdoc />
|
||||||
/// 创建者来源地址
|
[Column(ServerTime = DateTimeKind.Local, CanUpdate = false, Position = -1)]
|
||||||
/// </summary>
|
|
||||||
#if DBTYPE_SQLITE
|
|
||||||
[Column(Position = -1, DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
|
||||||
#else
|
|
||||||
[Column(Position = -1, DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
|
||||||
#endif
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public string CreatedReferer { get; init; }
|
public virtual DateTime CreatedTime { get; init; }
|
||||||
|
|
||||||
/// <summary>
|
/// <inheritdoc />
|
||||||
/// 创建者客户端用户代理
|
#if DBTYPE_SQLSERVER
|
||||||
/// </summary>
|
|
||||||
#if DBTYPE_SQLITE
|
|
||||||
[Column(Position = -1, DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
|
||||||
#else
|
|
||||||
[Column(Position = -1, DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_1022)]
|
[Column(Position = -1, DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_1022)]
|
||||||
|
#else
|
||||||
|
[Column(Position = -1, DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||||
#endif
|
#endif
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public virtual string CreatedUserAgent { get; init; }
|
public virtual string CreatedUserAgent { get; init; }
|
||||||
@ -71,25 +63,14 @@ public record Sys_RequestLog : ImmutableEntity, IFieldCreatedClient
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 异常信息
|
/// 异常信息
|
||||||
/// </summary>
|
/// </summary>
|
||||||
#if DBTYPE_SQLITE
|
#if DBTYPE_SQLSERVER
|
||||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
|
||||||
#else
|
|
||||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)]
|
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)]
|
||||||
|
#else
|
||||||
|
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||||
#endif
|
#endif
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public virtual string Exception { get; init; }
|
public virtual string Exception { get; init; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 附加数据
|
|
||||||
/// </summary>
|
|
||||||
#if DBTYPE_SQLITE
|
|
||||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
|
||||||
#else
|
|
||||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)]
|
|
||||||
#endif
|
|
||||||
[JsonIgnore]
|
|
||||||
public virtual string ExtraData { get; init; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// HTTP状态码
|
/// HTTP状态码
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -104,24 +85,13 @@ public record Sys_RequestLog : ImmutableEntity, IFieldCreatedClient
|
|||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public virtual string Method { get; init; }
|
public virtual string Method { get; init; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 来源地址
|
|
||||||
/// </summary>
|
|
||||||
#if DBTYPE_SQLITE
|
|
||||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
|
||||||
#else
|
|
||||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
|
||||||
#endif
|
|
||||||
[JsonIgnore]
|
|
||||||
public virtual string ReferUrl { get; init; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 请求内容
|
/// 请求内容
|
||||||
/// </summary>
|
/// </summary>
|
||||||
#if DBTYPE_SQLITE
|
#if DBTYPE_SQLSERVER
|
||||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
|
||||||
#else
|
|
||||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)]
|
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)]
|
||||||
|
#else
|
||||||
|
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||||
#endif
|
#endif
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public virtual string RequestBody { get; init; }
|
public virtual string RequestBody { get; init; }
|
||||||
@ -136,10 +106,10 @@ public record Sys_RequestLog : ImmutableEntity, IFieldCreatedClient
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 请求头信息
|
/// 请求头信息
|
||||||
/// </summary>
|
/// </summary>
|
||||||
#if DBTYPE_SQLITE
|
#if DBTYPE_SQLSERVER
|
||||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
|
||||||
#else
|
|
||||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)]
|
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)]
|
||||||
|
#else
|
||||||
|
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||||
#endif
|
#endif
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public virtual string RequestHeaders { get; init; }
|
public virtual string RequestHeaders { get; init; }
|
||||||
@ -154,10 +124,10 @@ public record Sys_RequestLog : ImmutableEntity, IFieldCreatedClient
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 响应内容
|
/// 响应内容
|
||||||
/// </summary>
|
/// </summary>
|
||||||
#if DBTYPE_SQLITE
|
#if DBTYPE_SQLSERVER
|
||||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
|
||||||
#else
|
|
||||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)]
|
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)]
|
||||||
|
#else
|
||||||
|
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||||
#endif
|
#endif
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public virtual string ResponseBody { get; init; }
|
public virtual string ResponseBody { get; init; }
|
||||||
@ -172,10 +142,10 @@ public record Sys_RequestLog : ImmutableEntity, IFieldCreatedClient
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 响应头
|
/// 响应头
|
||||||
/// </summary>
|
/// </summary>
|
||||||
#if DBTYPE_SQLITE
|
#if DBTYPE_SQLSERVER
|
||||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
|
||||||
#else
|
|
||||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)]
|
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)]
|
||||||
|
#else
|
||||||
|
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||||
#endif
|
#endif
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public virtual string ResponseHeaders { get; init; }
|
public virtual string ResponseHeaders { get; init; }
|
||||||
@ -186,4 +156,18 @@ public record Sys_RequestLog : ImmutableEntity, IFieldCreatedClient
|
|||||||
[Column]
|
[Column]
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public virtual int? ServerIp { get; init; }
|
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; }
|
||||||
}
|
}
|
@ -85,11 +85,7 @@ public record Sys_Role : VersionEntity, IFieldSort, IFieldEnabled, IFieldSummary
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 备注
|
/// 备注
|
||||||
/// </summary>
|
/// </summary>
|
||||||
#if DBTYPE_SQLITE
|
|
||||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||||
#else
|
|
||||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)]
|
|
||||||
#endif
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public virtual string Summary { get; init; }
|
public virtual string Summary { get; init; }
|
||||||
|
|
||||||
|
@ -14,10 +14,10 @@ public record Sys_SiteMsg : VersionEntity, IRegister, IFieldSummary
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 消息内容
|
/// 消息内容
|
||||||
/// </summary>
|
/// </summary>
|
||||||
#if DBTYPE_SQLITE
|
#if DBTYPE_SQLSERVER
|
||||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
|
||||||
#else
|
|
||||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)]
|
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)]
|
||||||
|
#else
|
||||||
|
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||||
#endif
|
#endif
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public virtual string Content { get; init; }
|
public virtual string Content { get; init; }
|
||||||
@ -59,22 +59,14 @@ public record Sys_SiteMsg : VersionEntity, IRegister, IFieldSummary
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 消息摘要
|
/// 消息摘要
|
||||||
/// </summary>
|
/// </summary>
|
||||||
#if DBTYPE_SQLITE
|
|
||||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||||
#else
|
|
||||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)]
|
|
||||||
#endif
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public virtual string Summary { get; init; }
|
public virtual string Summary { get; init; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 消息主题
|
/// 消息主题
|
||||||
/// </summary>
|
/// </summary>
|
||||||
#if DBTYPE_SQLITE
|
|
||||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||||
#else
|
|
||||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)]
|
|
||||||
#endif
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public virtual string Title { get; init; }
|
public virtual string Title { get; init; }
|
||||||
|
|
||||||
|
@ -85,11 +85,7 @@ public record Sys_User : VersionEntity, IFieldSummary, IFieldEnabled, IRegister
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 描述
|
/// 描述
|
||||||
/// </summary>
|
/// </summary>
|
||||||
#if DBTYPE_SQLITE
|
|
||||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||||
#else
|
|
||||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
|
||||||
#endif
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public virtual string Summary { get; init; }
|
public virtual string Summary { get; init; }
|
||||||
|
|
||||||
@ -119,7 +115,7 @@ public record Sys_User : VersionEntity, IFieldSummary, IFieldEnabled, IRegister
|
|||||||
? Array.Empty<Sys_Role>()
|
? Array.Empty<Sys_Role>()
|
||||||
: s.RoleIds.Select(x => new Sys_Role { Id = x }));
|
: s.RoleIds.Select(x => new Sys_Role { Id = x }));
|
||||||
|
|
||||||
_ = config.ForType<UpdateUserReq, Sys_User>()
|
_ = config.ForType<EditUserReq, Sys_User>()
|
||||||
.Map( //
|
.Map( //
|
||||||
d => d.Password, s => s.PasswordText.NullOrEmpty() ? Guid.Empty : s.PasswordText.Pwd().Guid())
|
d => d.Password, s => s.PasswordText.NullOrEmpty() ? Guid.Empty : s.PasswordText.Pwd().Guid())
|
||||||
.Map( //
|
.Map( //
|
||||||
|
@ -9,6 +9,17 @@ namespace NetAdmin.Domain.DbMaps.Sys;
|
|||||||
[Table(Name = Chars.FLG_DB_TABLE_NAME_PREFIX + nameof(Sys_UserProfile))]
|
[Table(Name = Chars.FLG_DB_TABLE_NAME_PREFIX + nameof(Sys_UserProfile))]
|
||||||
public record Sys_UserProfile : VersionEntity, IRegister
|
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>
|
||||||
/// 出生日期
|
/// 出生日期
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -33,11 +33,7 @@ public record Sys_VerifyCode : VersionEntity
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 发送报告
|
/// 发送报告
|
||||||
/// </summary>
|
/// </summary>
|
||||||
#if DBTYPE_SQLITE
|
|
||||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||||
#else
|
|
||||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)]
|
|
||||||
#endif
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public string Report { get; init; }
|
public string Report { get; init; }
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
using NetAdmin.Domain.DbMaps.Dependency;
|
||||||
|
|
||||||
namespace NetAdmin.Domain.Dto.Dependency;
|
namespace NetAdmin.Domain.Dto.Dependency;
|
||||||
|
|
||||||
@ -8,8 +8,9 @@ public sealed record DelReq : DelReq<long>;
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 请求:通过编号删除
|
/// 请求:通过编号删除
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public record DelReq<T> : DataAbstraction, IFieldPrimary<T>
|
public record DelReq<T> : EntityBase<T>
|
||||||
|
where T : IEquatable<T>
|
||||||
{
|
{
|
||||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||||
public T Id { get; init; }
|
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.Dependency.Fields;
|
||||||
using NetAdmin.Domain.DbMaps.Sys;
|
using NetAdmin.Domain.DbMaps.Sys;
|
||||||
|
|
||||||
@ -11,7 +12,7 @@ public sealed record QueryApiRsp : Sys_Api
|
|||||||
/// <inheritdoc cref="Sys_Api.Children" />
|
/// <inheritdoc cref="Sys_Api.Children" />
|
||||||
public new IEnumerable<QueryApiRsp> Children { get; init; }
|
public new IEnumerable<QueryApiRsp> Children { get; init; }
|
||||||
|
|
||||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||||
public override string Id { get; init; }
|
public override string Id { get; init; }
|
||||||
|
|
||||||
/// <inheritdoc cref="Sys_Api.Method" />
|
/// <inheritdoc cref="Sys_Api.Method" />
|
||||||
|
@ -8,5 +8,5 @@ public sealed record GetAllEntriesReq : DataAbstraction
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 数据库索引号
|
/// 数据库索引号
|
||||||
/// </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;
|
namespace NetAdmin.Domain.Dto.Sys.Config;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 请求:更新配置
|
/// 请求:编辑配置
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed record UpdateConfigReq : CreateConfigReq
|
public sealed record EditConfigReq : CreateConfigReq
|
||||||
{
|
{
|
||||||
/// <inheritdoc cref="IFieldVersion.Version" />
|
/// <inheritdoc cref="IFieldVersion.Version" />
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
@ -1,3 +1,4 @@
|
|||||||
|
using NetAdmin.Domain.DbMaps.Dependency;
|
||||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||||
using NetAdmin.Domain.DbMaps.Sys;
|
using NetAdmin.Domain.DbMaps.Sys;
|
||||||
|
|
||||||
@ -12,7 +13,7 @@ public sealed record QueryConfigReq : Sys_Config
|
|||||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||||
public new bool? Enabled { get; init; }
|
public new bool? Enabled { get; init; }
|
||||||
|
|
||||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||||
public override long Id { get; init; }
|
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.Dependency.Fields;
|
||||||
using NetAdmin.Domain.DbMaps.Sys;
|
using NetAdmin.Domain.DbMaps.Sys;
|
||||||
using NetAdmin.Domain.Dto.Sys.Dept;
|
using NetAdmin.Domain.Dto.Sys.Dept;
|
||||||
@ -18,7 +19,7 @@ public sealed record QueryConfigRsp : Sys_Config
|
|||||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||||
public override bool Enabled { get; init; }
|
public override bool Enabled { get; init; }
|
||||||
|
|
||||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||||
public override long Id { get; init; }
|
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;
|
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||||
|
|
||||||
namespace NetAdmin.Domain.Dto.Sys.Dept;
|
namespace NetAdmin.Domain.Dto.Sys.Dept;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 请求:更新部门
|
/// 请求:编辑部门
|
||||||
/// </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)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||||
public override long Id { get; init; }
|
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.DbMaps.Sys;
|
||||||
|
|
||||||
namespace NetAdmin.Domain.Dto.Sys.Dept;
|
namespace NetAdmin.Domain.Dto.Sys.Dept;
|
||||||
@ -8,7 +8,7 @@ namespace NetAdmin.Domain.Dto.Sys.Dept;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed record QueryDeptReq : Sys_Dept
|
public sealed record QueryDeptReq : Sys_Dept
|
||||||
{
|
{
|
||||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||||
public override long Id { get; init; }
|
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.Dependency.Fields;
|
||||||
using NetAdmin.Domain.DbMaps.Sys;
|
using NetAdmin.Domain.DbMaps.Sys;
|
||||||
|
|
||||||
@ -19,7 +20,7 @@ public sealed record QueryDeptRsp : Sys_Dept
|
|||||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||||
public override bool Enabled { get; init; }
|
public override bool Enabled { get; init; }
|
||||||
|
|
||||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||||
public override long Id { get; init; }
|
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;
|
namespace NetAdmin.Domain.Dto.Sys.Dic.Catalog;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 请求:更新字典目录
|
/// 请求:编辑字典目录
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed record UpdateDicCatalogReq : CreateDicCatalogReq
|
public sealed record EditDicCatalogReq : CreateDicCatalogReq
|
||||||
{
|
{
|
||||||
/// <inheritdoc cref="IFieldVersion.Version" />
|
/// <inheritdoc cref="IFieldVersion.Version" />
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
@ -1,3 +1,4 @@
|
|||||||
|
using NetAdmin.Domain.DbMaps.Dependency;
|
||||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||||
using NetAdmin.Domain.DbMaps.Sys;
|
using NetAdmin.Domain.DbMaps.Sys;
|
||||||
|
|
||||||
@ -15,7 +16,7 @@ public sealed record QueryDicCatalogRsp : Sys_DicCatalog
|
|||||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||||
public override string Code { get; init; }
|
public override string Code { get; init; }
|
||||||
|
|
||||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||||
public override long Id { get; init; }
|
public override long Id { get; init; }
|
||||||
|
|
||||||
|
@ -3,9 +3,9 @@ using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
|||||||
namespace NetAdmin.Domain.Dto.Sys.Dic.Content;
|
namespace NetAdmin.Domain.Dto.Sys.Dic.Content;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 请求:更新字典内容
|
/// 请求:编辑字典内容
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed record UpdateDicContentReq : CreateDicContentReq
|
public sealed record EditDicContentReq : CreateDicContentReq
|
||||||
{
|
{
|
||||||
/// <inheritdoc cref="IFieldVersion.Version" />
|
/// <inheritdoc cref="IFieldVersion.Version" />
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
[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;
|
using NetAdmin.Domain.DbMaps.Sys;
|
||||||
|
|
||||||
namespace NetAdmin.Domain.Dto.Sys.Job;
|
namespace NetAdmin.Domain.Dto.Sys.Job;
|
||||||
@ -8,7 +8,7 @@ namespace NetAdmin.Domain.Dto.Sys.Job;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed record QueryJobReq : Sys_Job
|
public sealed record QueryJobReq : Sys_Job
|
||||||
{
|
{
|
||||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||||
public override long Id { get; init; }
|
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.Dependency.Fields;
|
||||||
using NetAdmin.Domain.DbMaps.Sys;
|
using NetAdmin.Domain.DbMaps.Sys;
|
||||||
using NetAdmin.Domain.Dto.Sys.User;
|
using NetAdmin.Domain.Dto.Sys.User;
|
||||||
@ -11,6 +12,17 @@ namespace NetAdmin.Domain.Dto.Sys.Job;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed record QueryJobRsp : Sys_Job
|
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" />
|
/// <inheritdoc cref="IFieldCreatedTime.CreatedTime" />
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||||
public override DateTime CreatedTime { get; init; }
|
public override DateTime CreatedTime { get; init; }
|
||||||
@ -35,7 +47,7 @@ public sealed record QueryJobRsp : Sys_Job
|
|||||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||||
public override HttpMethods HttpMethod { get; init; }
|
public override HttpMethods HttpMethod { get; init; }
|
||||||
|
|
||||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||||
public override long Id { get; init; }
|
public override long Id { get; init; }
|
||||||
|
|
||||||
@ -51,10 +63,6 @@ public sealed record QueryJobRsp : Sys_Job
|
|||||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||||
public override DateTime? LastExecTime { get; init; }
|
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" />
|
/// <inheritdoc cref="IFieldModifiedTime.ModifiedTime" />
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||||
public override DateTime? ModifiedTime { get; init; }
|
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;
|
using NetAdmin.Domain.DbMaps.Sys;
|
||||||
|
|
||||||
namespace NetAdmin.Domain.Dto.Sys.JobRecord;
|
namespace NetAdmin.Domain.Dto.Sys.JobRecord;
|
||||||
@ -8,7 +8,7 @@ namespace NetAdmin.Domain.Dto.Sys.JobRecord;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed record QueryJobRecordReq : Sys_JobRecord
|
public sealed record QueryJobRecordReq : Sys_JobRecord
|
||||||
{
|
{
|
||||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||||
public override long Id { get; init; }
|
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.Dependency.Fields;
|
||||||
using NetAdmin.Domain.DbMaps.Sys;
|
using NetAdmin.Domain.DbMaps.Sys;
|
||||||
|
using NetAdmin.Domain.Dto.Sys.Job;
|
||||||
using HttpMethods = NetAdmin.Domain.Enums.HttpMethods;
|
using HttpMethods = NetAdmin.Domain.Enums.HttpMethods;
|
||||||
|
|
||||||
namespace NetAdmin.Domain.Dto.Sys.JobRecord;
|
namespace NetAdmin.Domain.Dto.Sys.JobRecord;
|
||||||
@ -10,8 +12,10 @@ namespace NetAdmin.Domain.Dto.Sys.JobRecord;
|
|||||||
public sealed record QueryJobRecordRsp : Sys_JobRecord
|
public sealed record QueryJobRecordRsp : Sys_JobRecord
|
||||||
{
|
{
|
||||||
/// <inheritdoc cref="Sys_JobRecord.HttpStatusCode" />
|
/// <inheritdoc cref="Sys_JobRecord.HttpStatusCode" />
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
public new string HttpStatusCode =>
|
||||||
public new HttpStatusCode HttpStatusCode => (HttpStatusCode)base.HttpStatusCode;
|
base.HttpStatusCode == Numbers.HTTP_STATUS_BIZ_FAIL
|
||||||
|
? nameof(ErrorCodes.Unhandled).ToLowerCamelCase()
|
||||||
|
: ((HttpStatusCode)base.HttpStatusCode).ToString().ToLowerCamelCase();
|
||||||
|
|
||||||
/// <inheritdoc cref="IFieldCreatedTime.CreatedTime" />
|
/// <inheritdoc cref="IFieldCreatedTime.CreatedTime" />
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||||
@ -25,10 +29,15 @@ public sealed record QueryJobRecordRsp : Sys_JobRecord
|
|||||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||||
public override HttpMethods HttpMethod { get; init; }
|
public override HttpMethods HttpMethod { get; init; }
|
||||||
|
|
||||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||||
public override long Id { get; init; }
|
public override long Id { get; init; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 作业信息
|
||||||
|
/// </summary>
|
||||||
|
public new QueryJobRsp Job { get; init; }
|
||||||
|
|
||||||
/// <inheritdoc cref="Sys_JobRecord.JobId" />
|
/// <inheritdoc cref="Sys_JobRecord.JobId" />
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||||
public override long JobId { get; init; }
|
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;
|
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||||
|
|
||||||
namespace NetAdmin.Domain.Dto.Sys.Menu;
|
namespace NetAdmin.Domain.Dto.Sys.Menu;
|
||||||
@ -5,9 +6,9 @@ namespace NetAdmin.Domain.Dto.Sys.Menu;
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 请求:更新菜单
|
/// 请求:更新菜单
|
||||||
/// </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)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||||
public override long Id { get; init; }
|
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.DbMaps.Sys;
|
||||||
|
|
||||||
namespace NetAdmin.Domain.Dto.Sys.Menu;
|
namespace NetAdmin.Domain.Dto.Sys.Menu;
|
||||||
@ -8,7 +8,7 @@ namespace NetAdmin.Domain.Dto.Sys.Menu;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed record QueryMenuReq : Sys_Menu
|
public sealed record QueryMenuReq : Sys_Menu
|
||||||
{
|
{
|
||||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||||
public override long Id { get; init; }
|
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.Dependency.Fields;
|
||||||
using NetAdmin.Domain.DbMaps.Sys;
|
using NetAdmin.Domain.DbMaps.Sys;
|
||||||
|
|
||||||
@ -36,7 +37,7 @@ public sealed record QueryMenuRsp : Sys_Menu, IRegister
|
|||||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||||
public override bool HiddenBreadCrumb { get; init; }
|
public override bool HiddenBreadCrumb { get; init; }
|
||||||
|
|
||||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||||
public override long Id { get; init; }
|
public override long Id { get; init; }
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||||
using NetAdmin.Domain.DbMaps.Sys;
|
using NetAdmin.Domain.DbMaps.Sys;
|
||||||
|
using NetAdmin.Domain.Dto.Sys.User;
|
||||||
|
|
||||||
namespace NetAdmin.Domain.Dto.Sys.RequestLog;
|
namespace NetAdmin.Domain.Dto.Sys.RequestLog;
|
||||||
|
|
||||||
@ -13,6 +14,11 @@ public sealed record QueryRequestLogRsp : Sys_RequestLog, IRegister
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public new string CreatedClientIp => base.CreatedClientIp?.ToIpV4();
|
public new string CreatedClientIp => base.CreatedClientIp?.ToIpV4();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 登录名
|
||||||
|
/// </summary>
|
||||||
|
public string LoginName => RequestBody?.ToObject<LoginByPwdReq>()?.Account;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 操作系统
|
/// 操作系统
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -35,10 +41,6 @@ public sealed record QueryRequestLogRsp : Sys_RequestLog, IRegister
|
|||||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||||
public override string CreatedUserAgent { get; init; }
|
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" />
|
/// <inheritdoc cref="Sys_RequestLog.Duration" />
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||||
public override long Duration { get; init; }
|
public override long Duration { get; init; }
|
||||||
@ -51,10 +53,6 @@ public sealed record QueryRequestLogRsp : Sys_RequestLog, IRegister
|
|||||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||||
public override string Exception { get; init; }
|
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" />
|
/// <inheritdoc cref="Sys_RequestLog.HttpStatusCode" />
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||||
public override int HttpStatusCode { get; init; }
|
public override int HttpStatusCode { get; init; }
|
||||||
@ -63,10 +61,6 @@ public sealed record QueryRequestLogRsp : Sys_RequestLog, IRegister
|
|||||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||||
public override string Method { get; init; }
|
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" />
|
/// <inheritdoc cref="Sys_RequestLog.RequestBody" />
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||||
public override string RequestBody { get; init; }
|
public override string RequestBody { get; init; }
|
||||||
@ -99,6 +93,13 @@ public sealed record QueryRequestLogRsp : Sys_RequestLog, IRegister
|
|||||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||||
public override int? ServerIp { get; init; }
|
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 />
|
/// <inheritdoc />
|
||||||
public void Register(TypeAdapterConfig config)
|
public void Register(TypeAdapterConfig config)
|
||||||
{
|
{
|
||||||
|
@ -1,19 +1,18 @@
|
|||||||
|
using NetAdmin.Domain.DbMaps.Dependency;
|
||||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||||
|
|
||||||
namespace NetAdmin.Domain.Dto.Sys.Role;
|
namespace NetAdmin.Domain.Dto.Sys.Role;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 请求:修改角色
|
/// 请求:编辑角色
|
||||||
/// </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)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.唯一编码不能为空))]
|
|
||||||
public override long Id { get; init; }
|
public override long Id { get; init; }
|
||||||
|
|
||||||
/// <inheritdoc cref="IFieldVersion.Version" />
|
/// <inheritdoc cref="IFieldVersion.Version" />
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.数据版本不能为空))]
|
|
||||||
public override long Version { get; init; }
|
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;
|
using NetAdmin.Domain.DbMaps.Sys;
|
||||||
|
|
||||||
namespace NetAdmin.Domain.Dto.Sys.Role;
|
namespace NetAdmin.Domain.Dto.Sys.Role;
|
||||||
@ -8,7 +8,7 @@ namespace NetAdmin.Domain.Dto.Sys.Role;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed record QueryRoleReq : Sys_Role
|
public sealed record QueryRoleReq : Sys_Role
|
||||||
{
|
{
|
||||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||||
public override long Id { get; init; }
|
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.Dependency.Fields;
|
||||||
using NetAdmin.Domain.DbMaps.Sys;
|
using NetAdmin.Domain.DbMaps.Sys;
|
||||||
using NetAdmin.Domain.Enums.Sys;
|
using NetAdmin.Domain.Enums.Sys;
|
||||||
@ -37,7 +38,7 @@ public sealed record QueryRoleRsp : Sys_Role, IRegister
|
|||||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||||
public override bool Enabled { get; init; }
|
public override bool Enabled { get; init; }
|
||||||
|
|
||||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||||
public override long Id { get; init; }
|
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;
|
using NetAdmin.Domain.DbMaps.Sys;
|
||||||
|
|
||||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsg;
|
namespace NetAdmin.Domain.Dto.Sys.SiteMsg;
|
||||||
@ -8,7 +8,7 @@ namespace NetAdmin.Domain.Dto.Sys.SiteMsg;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed record QuerySiteMsgReq : Sys_SiteMsg
|
public sealed record QuerySiteMsgReq : Sys_SiteMsg
|
||||||
{
|
{
|
||||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||||
public override long Id { get; init; }
|
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.Dependency.Fields;
|
||||||
using NetAdmin.Domain.DbMaps.Sys;
|
using NetAdmin.Domain.DbMaps.Sys;
|
||||||
using NetAdmin.Domain.Dto.Sys.Dept;
|
using NetAdmin.Domain.Dto.Sys.Dept;
|
||||||
@ -29,7 +30,7 @@ public sealed record QuerySiteMsgRsp : Sys_SiteMsg
|
|||||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||||
public new IEnumerable<QueryDeptRsp> Depts { get; init; }
|
public new IEnumerable<QueryDeptRsp> Depts { get; init; }
|
||||||
|
|
||||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||||
public override long Id { get; init; }
|
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;
|
using NetAdmin.Domain.DbMaps.Sys;
|
||||||
|
|
||||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsgDept;
|
namespace NetAdmin.Domain.Dto.Sys.SiteMsgDept;
|
||||||
@ -8,7 +8,7 @@ namespace NetAdmin.Domain.Dto.Sys.SiteMsgDept;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed record QuerySiteMsgDeptReq : Sys_SiteMsgDept
|
public sealed record QuerySiteMsgDeptReq : Sys_SiteMsgDept
|
||||||
{
|
{
|
||||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||||
public override long Id { get; init; }
|
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.DbMaps.Sys;
|
||||||
|
|
||||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsgDept;
|
namespace NetAdmin.Domain.Dto.Sys.SiteMsgDept;
|
||||||
@ -8,7 +8,7 @@ namespace NetAdmin.Domain.Dto.Sys.SiteMsgDept;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed record QuerySiteMsgDeptRsp : Sys_SiteMsgDept
|
public sealed record QuerySiteMsgDeptRsp : Sys_SiteMsgDept
|
||||||
{
|
{
|
||||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||||
public override long Id { get; init; }
|
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.DbMaps.Dependency.Fields;
|
||||||
|
using NetAdmin.Domain.Dto.Sys.SiteMsg;
|
||||||
|
|
||||||
namespace NetAdmin.Domain.Dto.Sys.Job;
|
namespace NetAdmin.Domain.Dto.Sys.SiteMsgFlag;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 请求:更新计划作业
|
/// 请求:编辑站内信
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed record UpdateJobReq : CreateJobReq
|
public sealed record EditSiteMsgReq : CreateSiteMsgReq
|
||||||
{
|
{
|
||||||
/// <inheritdoc cref="IFieldVersion.Version" />
|
/// <inheritdoc cref="IFieldVersion.Version" />
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
@ -1,4 +1,4 @@
|
|||||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
using NetAdmin.Domain.DbMaps.Dependency;
|
||||||
using NetAdmin.Domain.DbMaps.Sys;
|
using NetAdmin.Domain.DbMaps.Sys;
|
||||||
|
|
||||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsgFlag;
|
namespace NetAdmin.Domain.Dto.Sys.SiteMsgFlag;
|
||||||
@ -8,7 +8,7 @@ namespace NetAdmin.Domain.Dto.Sys.SiteMsgFlag;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed record QuerySiteMsgFlagReq : Sys_SiteMsgFlag
|
public sealed record QuerySiteMsgFlagReq : Sys_SiteMsgFlag
|
||||||
{
|
{
|
||||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||||
public override long Id { get; init; }
|
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.DbMaps.Sys;
|
||||||
using NetAdmin.Domain.Enums.Sys;
|
using NetAdmin.Domain.Enums.Sys;
|
||||||
|
|
||||||
@ -9,7 +9,7 @@ namespace NetAdmin.Domain.Dto.Sys.SiteMsgFlag;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed record QuerySiteMsgFlagRsp : Sys_SiteMsgFlag
|
public sealed record QuerySiteMsgFlagRsp : Sys_SiteMsgFlag
|
||||||
{
|
{
|
||||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||||
public override long Id { get; init; }
|
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;
|
using NetAdmin.Domain.DbMaps.Sys;
|
||||||
|
|
||||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsgRole;
|
namespace NetAdmin.Domain.Dto.Sys.SiteMsgRole;
|
||||||
@ -8,7 +8,7 @@ namespace NetAdmin.Domain.Dto.Sys.SiteMsgRole;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed record QuerySiteMsgRoleReq : Sys_SiteMsgRole
|
public sealed record QuerySiteMsgRoleReq : Sys_SiteMsgRole
|
||||||
{
|
{
|
||||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||||
public override long Id { get; init; }
|
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.DbMaps.Sys;
|
||||||
|
|
||||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsgRole;
|
namespace NetAdmin.Domain.Dto.Sys.SiteMsgRole;
|
||||||
@ -8,7 +8,7 @@ namespace NetAdmin.Domain.Dto.Sys.SiteMsgRole;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed record QuerySiteMsgRoleRsp : Sys_SiteMsgRole
|
public sealed record QuerySiteMsgRoleRsp : Sys_SiteMsgRole
|
||||||
{
|
{
|
||||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||||
public override long Id { get; init; }
|
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;
|
using NetAdmin.Domain.DbMaps.Sys;
|
||||||
|
|
||||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsgUser;
|
namespace NetAdmin.Domain.Dto.Sys.SiteMsgUser;
|
||||||
@ -8,7 +8,7 @@ namespace NetAdmin.Domain.Dto.Sys.SiteMsgUser;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed record QuerySiteMsgUserReq : Sys_SiteMsgUser
|
public sealed record QuerySiteMsgUserReq : Sys_SiteMsgUser
|
||||||
{
|
{
|
||||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||||
public override long Id { get; init; }
|
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.DbMaps.Sys;
|
||||||
|
|
||||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsgUser;
|
namespace NetAdmin.Domain.Dto.Sys.SiteMsgUser;
|
||||||
@ -8,7 +8,7 @@ namespace NetAdmin.Domain.Dto.Sys.SiteMsgUser;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed record QuerySiteMsgUserRsp : Sys_SiteMsgUser
|
public sealed record QuerySiteMsgUserRsp : Sys_SiteMsgUser
|
||||||
{
|
{
|
||||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||||
public override long Id { get; init; }
|
public override long Id { get; init; }
|
||||||
}
|
}
|
@ -1,6 +0,0 @@
|
|||||||
namespace NetAdmin.Domain.Dto.Sys.SiteMsgUser;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 请求:更新站内信-用户映射
|
|
||||||
/// </summary>
|
|
||||||
public sealed record UpdateSiteMsgUserReq : CreateSiteMsgUserReq;
|
|
@ -5,9 +5,9 @@ using NetAdmin.Domain.DbMaps.Sys;
|
|||||||
namespace NetAdmin.Domain.Dto.Sys.User;
|
namespace NetAdmin.Domain.Dto.Sys.User;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 请求:创建更新用户
|
/// 请求:创建编辑用户
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public abstract record CreateUpdateUserReq : Sys_User
|
public abstract record CreateEditUserReq : Sys_User
|
||||||
{
|
{
|
||||||
/// <inheritdoc cref="Sys_User.Avatar" />
|
/// <inheritdoc cref="Sys_User.Avatar" />
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
@ -6,9 +6,9 @@ namespace NetAdmin.Domain.Dto.Sys.User;
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 请求:创建用户
|
/// 请求:创建用户
|
||||||
/// </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.密码不能为空))]
|
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.密码不能为空))]
|
||||||
public override string PasswordText { get; init; }
|
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.Dependency.Fields;
|
||||||
using NetAdmin.Domain.DbMaps.Sys;
|
using NetAdmin.Domain.DbMaps.Sys;
|
||||||
using NetAdmin.Domain.Dto.Sys.UserProfile;
|
using NetAdmin.Domain.Dto.Sys.UserProfile;
|
||||||
@ -5,16 +6,16 @@ using NetAdmin.Domain.Dto.Sys.UserProfile;
|
|||||||
namespace NetAdmin.Domain.Dto.Sys.User;
|
namespace NetAdmin.Domain.Dto.Sys.User;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 请求:更新用户
|
/// 请求:编辑用户
|
||||||
/// </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)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||||
public override long Id { get; init; }
|
public override long Id { get; init; }
|
||||||
|
|
||||||
/// <inheritdoc cref="Sys_User.Profile" />
|
/// <inheritdoc cref="Sys_User.Profile" />
|
||||||
public new UpdateUserProfileReq Profile { get; init; }
|
public new EditUserProfileReq Profile { get; init; }
|
||||||
|
|
||||||
/// <inheritdoc cref="IFieldVersion.Version" />
|
/// <inheritdoc cref="IFieldVersion.Version" />
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
@ -1,4 +1,4 @@
|
|||||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
using NetAdmin.Domain.DbMaps.Dependency;
|
||||||
using NetAdmin.Domain.DbMaps.Sys;
|
using NetAdmin.Domain.DbMaps.Sys;
|
||||||
|
|
||||||
namespace NetAdmin.Domain.Dto.Sys.User;
|
namespace NetAdmin.Domain.Dto.Sys.User;
|
||||||
@ -12,7 +12,7 @@ public sealed record QueryUserReq : Sys_User
|
|||||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||||
public override long DeptId { get; init; }
|
public override long DeptId { get; init; }
|
||||||
|
|
||||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||||
public override long Id { get; init; }
|
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.Dependency.Fields;
|
||||||
using NetAdmin.Domain.DbMaps.Sys;
|
using NetAdmin.Domain.DbMaps.Sys;
|
||||||
using NetAdmin.Domain.Dto.Sys.Dept;
|
using NetAdmin.Domain.Dto.Sys.Dept;
|
||||||
@ -29,7 +30,7 @@ public record QueryUserRsp : Sys_User
|
|||||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||||
public override bool Enabled { get; init; }
|
public override bool Enabled { get; init; }
|
||||||
|
|
||||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||||
public override long Id { get; init; }
|
public override long Id { get; init; }
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ using NetAdmin.Domain.DbMaps.Sys;
|
|||||||
namespace NetAdmin.Domain.Dto.Sys.User;
|
namespace NetAdmin.Domain.Dto.Sys.User;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 请求:更新用户头像
|
/// 请求:设置用户头像
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed record SetAvatarReq : Sys_User
|
public sealed record SetAvatarReq : Sys_User
|
||||||
{
|
{
|
||||||
@ -12,4 +12,8 @@ public sealed record SetAvatarReq : Sys_User
|
|||||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.用户头像不能为空))]
|
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.用户头像不能为空))]
|
||||||
[Url(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.网络地址不正确))]
|
[Url(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.网络地址不正确))]
|
||||||
public override string Avatar { get; init; }
|
public override string Avatar { get; init; }
|
||||||
|
|
||||||
|
/// <inheritdoc cref="System.Version" />
|
||||||
|
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||||
|
public override long Version { get; init; }
|
||||||
}
|
}
|
@ -1,3 +1,4 @@
|
|||||||
|
using NetAdmin.Domain.DbMaps.Dependency;
|
||||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||||
using NetAdmin.Domain.DbMaps.Sys;
|
using NetAdmin.Domain.DbMaps.Sys;
|
||||||
|
|
||||||
@ -12,8 +13,11 @@ public sealed record SetUserEnabledReq : Sys_User
|
|||||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||||
public override bool Enabled { get; init; }
|
public override bool Enabled { get; init; }
|
||||||
|
|
||||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
/// <inheritdoc cref="EntityBase{T}.Id" />
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.用户编号不能为空))]
|
|
||||||
public override long Id { get; init; }
|
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.UserProfile;
|
namespace NetAdmin.Domain.Dto.Sys.UserProfile;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 请求:更新用户档案
|
/// 请求:编辑用户档案
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed record UpdateUserProfileReq : CreateUserProfileReq
|
public sealed record EditUserProfileReq : CreateUserProfileReq
|
||||||
{
|
{
|
||||||
/// <inheritdoc cref="IFieldVersion.Version" />
|
/// <inheritdoc cref="IFieldVersion.Version" />
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user