init
This commit is contained in:
commit
b61d3be423
25
.dockerignore
Normal file
25
.dockerignore
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
**/.classpath
|
||||||
|
**/.dockerignore
|
||||||
|
**/.env
|
||||||
|
**/.git
|
||||||
|
**/.gitignore
|
||||||
|
**/.project
|
||||||
|
**/.settings
|
||||||
|
**/.toolstarget
|
||||||
|
**/.vs
|
||||||
|
**/.vscode
|
||||||
|
**/*.*proj.user
|
||||||
|
**/*.dbmdl
|
||||||
|
**/*.jfm
|
||||||
|
**/azds.yaml
|
||||||
|
**/bin
|
||||||
|
**/charts
|
||||||
|
**/docker-compose*
|
||||||
|
**/Dockerfile*
|
||||||
|
**/node_modules
|
||||||
|
**/npm-debug.log
|
||||||
|
**/obj
|
||||||
|
**/secrets.dev.yaml
|
||||||
|
**/values.dev.yaml
|
||||||
|
LICENSE
|
||||||
|
README.md
|
63
.gitattributes
vendored
Normal file
63
.gitattributes
vendored
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
###############################################################################
|
||||||
|
# Set default behavior to automatically normalize line endings.
|
||||||
|
###############################################################################
|
||||||
|
* text=auto
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# Set default behavior for command prompt diff.
|
||||||
|
#
|
||||||
|
# This is need for earlier builds of msysgit that does not have it on by
|
||||||
|
# default for csharp files.
|
||||||
|
# Note: This is only used by command line
|
||||||
|
###############################################################################
|
||||||
|
#*.cs diff=csharp
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# Set the merge driver for project and solution files
|
||||||
|
#
|
||||||
|
# Merging from the command prompt will add diff markers to the files if there
|
||||||
|
# are conflicts (Merging from VS is not affected by the settings below, in VS
|
||||||
|
# the diff markers are never inserted). Diff markers may cause the following
|
||||||
|
# file extensions to fail to load in VS. An alternative would be to treat
|
||||||
|
# these files as binary and thus will always conflict and require user
|
||||||
|
# intervention with every merge. To do so, just uncomment the entries below
|
||||||
|
###############################################################################
|
||||||
|
#*.sln merge=binary
|
||||||
|
#*.csproj merge=binary
|
||||||
|
#*.vbproj merge=binary
|
||||||
|
#*.vcxproj merge=binary
|
||||||
|
#*.vcproj merge=binary
|
||||||
|
#*.dbproj merge=binary
|
||||||
|
#*.fsproj merge=binary
|
||||||
|
#*.lsproj merge=binary
|
||||||
|
#*.wixproj merge=binary
|
||||||
|
#*.modelproj merge=binary
|
||||||
|
#*.sqlproj merge=binary
|
||||||
|
#*.wwaproj merge=binary
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# behavior for image files
|
||||||
|
#
|
||||||
|
# image files are treated as binary by default.
|
||||||
|
###############################################################################
|
||||||
|
#*.jpg binary
|
||||||
|
#*.png binary
|
||||||
|
#*.gif binary
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# diff behavior for common document formats
|
||||||
|
#
|
||||||
|
# Convert binary document formats to text before diffing them. This feature
|
||||||
|
# is only available from the command line. Turn it on by uncommenting the
|
||||||
|
# entries below.
|
||||||
|
###############################################################################
|
||||||
|
#*.doc diff=astextplain
|
||||||
|
#*.DOC diff=astextplain
|
||||||
|
#*.docx diff=astextplain
|
||||||
|
#*.DOCX diff=astextplain
|
||||||
|
#*.dot diff=astextplain
|
||||||
|
#*.DOT diff=astextplain
|
||||||
|
#*.pdf diff=astextplain
|
||||||
|
#*.PDF diff=astextplain
|
||||||
|
#*.rtf diff=astextplain
|
||||||
|
#*.RTF diff=astextplain
|
411
.gitignore
vendored
Normal file
411
.gitignore
vendored
Normal file
@ -0,0 +1,411 @@
|
|||||||
|
## Ignore Visual Studio temporary files, build results, and
|
||||||
|
## files generated by popular Visual Studio add-ons.
|
||||||
|
##
|
||||||
|
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
|
||||||
|
|
||||||
|
# User-specific files
|
||||||
|
*.rsuser
|
||||||
|
*.suo
|
||||||
|
*.user
|
||||||
|
*.userosscache
|
||||||
|
*.sln.docstates
|
||||||
|
|
||||||
|
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||||
|
*.userprefs
|
||||||
|
|
||||||
|
# Mono auto generated files
|
||||||
|
mono_crash.*
|
||||||
|
|
||||||
|
# Build results
|
||||||
|
[Dd]ebug/
|
||||||
|
[Dd]ebugPublic/
|
||||||
|
[Rr]elease/
|
||||||
|
[Rr]eleases/
|
||||||
|
x64/
|
||||||
|
x86/
|
||||||
|
[Ww][Ii][Nn]32/
|
||||||
|
[Aa][Rr][Mm]/
|
||||||
|
[Aa][Rr][Mm]64/
|
||||||
|
bld/
|
||||||
|
[Bb]in/
|
||||||
|
[Oo]bj/
|
||||||
|
[Ll]og/
|
||||||
|
[Ll]ogs/
|
||||||
|
|
||||||
|
# Visual Studio 2015/2017 cache/options directory
|
||||||
|
.vs/
|
||||||
|
# Uncomment if you have tasks that create the project's static files in wwwroot
|
||||||
|
#wwwroot/
|
||||||
|
|
||||||
|
# Visual Studio 2017 auto generated files
|
||||||
|
Generated\ Files/
|
||||||
|
|
||||||
|
# MSTest test Results
|
||||||
|
[Tt]est[Rr]esult*/
|
||||||
|
[Bb]uild[Ll]og.*
|
||||||
|
|
||||||
|
# NUnit
|
||||||
|
*.VisualState.xml
|
||||||
|
TestResult.xml
|
||||||
|
nunit-*.xml
|
||||||
|
|
||||||
|
# Build Results of an ATL Project
|
||||||
|
[Dd]ebugPS/
|
||||||
|
[Rr]eleasePS/
|
||||||
|
dlldata.c
|
||||||
|
|
||||||
|
# Benchmark Results
|
||||||
|
BenchmarkDotNet.Artifacts/
|
||||||
|
|
||||||
|
# .NET Core
|
||||||
|
project.lock.json
|
||||||
|
project.fragment.lock.json
|
||||||
|
artifacts/
|
||||||
|
|
||||||
|
# ASP.NET Scaffolding
|
||||||
|
ScaffoldingReadMe.txt
|
||||||
|
|
||||||
|
# StyleCop
|
||||||
|
StyleCopReport.xml
|
||||||
|
|
||||||
|
# Files built by Visual Studio
|
||||||
|
*_i.c
|
||||||
|
*_p.c
|
||||||
|
*_h.h
|
||||||
|
*.ilk
|
||||||
|
*.meta
|
||||||
|
*.obj
|
||||||
|
*.iobj
|
||||||
|
*.pch
|
||||||
|
*.pdb
|
||||||
|
*.ipdb
|
||||||
|
*.pgc
|
||||||
|
*.pgd
|
||||||
|
*.rsp
|
||||||
|
*.sbr
|
||||||
|
*.tlb
|
||||||
|
*.tli
|
||||||
|
*.tlh
|
||||||
|
*.tmp
|
||||||
|
*.tmp_proj
|
||||||
|
*_wpftmp.csproj
|
||||||
|
*.log
|
||||||
|
*.tlog
|
||||||
|
*.vspscc
|
||||||
|
*.vssscc
|
||||||
|
.builds
|
||||||
|
*.pidb
|
||||||
|
*.svclog
|
||||||
|
*.scc
|
||||||
|
|
||||||
|
# Chutzpah Test files
|
||||||
|
_Chutzpah*
|
||||||
|
|
||||||
|
# Visual C++ cache files
|
||||||
|
ipch/
|
||||||
|
*.aps
|
||||||
|
*.ncb
|
||||||
|
*.opendb
|
||||||
|
*.opensdf
|
||||||
|
*.sdf
|
||||||
|
*.cachefile
|
||||||
|
*.VC.db
|
||||||
|
*.VC.VC.opendb
|
||||||
|
|
||||||
|
# Visual Studio profiler
|
||||||
|
*.psess
|
||||||
|
*.vsp
|
||||||
|
*.vspx
|
||||||
|
*.sap
|
||||||
|
|
||||||
|
# Visual Studio Trace Files
|
||||||
|
*.e2e
|
||||||
|
|
||||||
|
# TFS 2012 Local Workspace
|
||||||
|
$tf/
|
||||||
|
|
||||||
|
# Guidance Automation Toolkit
|
||||||
|
*.gpState
|
||||||
|
|
||||||
|
# ReSharper is a .NET coding add-in
|
||||||
|
_ReSharper*/
|
||||||
|
*.[Rr]e[Ss]harper
|
||||||
|
*.DotSettings.user
|
||||||
|
|
||||||
|
# TeamCity is a build add-in
|
||||||
|
_TeamCity*
|
||||||
|
|
||||||
|
# DotCover is a Code Coverage Tool
|
||||||
|
*.dotCover
|
||||||
|
|
||||||
|
# AxoCover is a Code Coverage Tool
|
||||||
|
.axoCover/*
|
||||||
|
!.axoCover/settings.json
|
||||||
|
|
||||||
|
# Coverlet is a free, cross platform Code Coverage Tool
|
||||||
|
coverage*.json
|
||||||
|
coverage*.xml
|
||||||
|
coverage*.info
|
||||||
|
|
||||||
|
# Visual Studio code coverage results
|
||||||
|
*.coverage
|
||||||
|
*.coveragexml
|
||||||
|
|
||||||
|
# NCrunch
|
||||||
|
_NCrunch_*
|
||||||
|
.*crunch*.local.xml
|
||||||
|
nCrunchTemp_*
|
||||||
|
|
||||||
|
# MightyMoose
|
||||||
|
*.mm.*
|
||||||
|
AutoTest.Net/
|
||||||
|
|
||||||
|
# Web workbench (sass)
|
||||||
|
.sass-cache/
|
||||||
|
|
||||||
|
# Installshield output folder
|
||||||
|
[Ee]xpress/
|
||||||
|
|
||||||
|
# DocProject is a documentation generator add-in
|
||||||
|
DocProject/buildhelp/
|
||||||
|
DocProject/Help/*.HxT
|
||||||
|
DocProject/Help/*.HxC
|
||||||
|
DocProject/Help/*.hhc
|
||||||
|
DocProject/Help/*.hhk
|
||||||
|
DocProject/Help/*.hhp
|
||||||
|
DocProject/Help/Html2
|
||||||
|
DocProject/Help/html
|
||||||
|
|
||||||
|
# Click-Once directory
|
||||||
|
publish/
|
||||||
|
|
||||||
|
# Publish Web Output
|
||||||
|
*.[Pp]ublish.xml
|
||||||
|
*.azurePubxml
|
||||||
|
# Note: Comment the next line if you want to checkin your web deploy settings,
|
||||||
|
# but database connection strings (with potential passwords) will be unencrypted
|
||||||
|
*.pubxml
|
||||||
|
*.publishproj
|
||||||
|
|
||||||
|
# Microsoft Azure Web App publish settings. Comment the next line if you want to
|
||||||
|
# checkin your Azure Web App publish settings, but sensitive information contained
|
||||||
|
# in these scripts will be unencrypted
|
||||||
|
PublishScripts/
|
||||||
|
|
||||||
|
# NuGet Packages
|
||||||
|
*.nupkg
|
||||||
|
# NuGet Symbol Packages
|
||||||
|
*.snupkg
|
||||||
|
# The packages folder can be ignored because of Package Restore
|
||||||
|
**/[Pp]ackages/*
|
||||||
|
# except build/, which is used as an MSBuild target.
|
||||||
|
!**/[Pp]ackages/build/
|
||||||
|
# Uncomment if necessary however generally it will be regenerated when needed
|
||||||
|
#!**/[Pp]ackages/repositories.config
|
||||||
|
# NuGet v3's project.json files produces more ignorable files
|
||||||
|
*.nuget.props
|
||||||
|
*.nuget.targets
|
||||||
|
|
||||||
|
# Microsoft Azure Build Output
|
||||||
|
csx/
|
||||||
|
*.build.csdef
|
||||||
|
|
||||||
|
# Microsoft Azure Emulator
|
||||||
|
ecf/
|
||||||
|
rcf/
|
||||||
|
|
||||||
|
# Windows Store app package directories and files
|
||||||
|
AppPackages/
|
||||||
|
BundleArtifacts/
|
||||||
|
Package.StoreAssociation.xml
|
||||||
|
_pkginfo.txt
|
||||||
|
*.appx
|
||||||
|
*.appxbundle
|
||||||
|
*.appxupload
|
||||||
|
|
||||||
|
# Visual Studio cache files
|
||||||
|
# files ending in .cache can be ignored
|
||||||
|
*.[Cc]ache
|
||||||
|
# but keep track of directories ending in .cache
|
||||||
|
!?*.[Cc]ache/
|
||||||
|
|
||||||
|
# Others
|
||||||
|
ClientBin/
|
||||||
|
~$*
|
||||||
|
*~
|
||||||
|
*.dbmdl
|
||||||
|
*.dbproj.schemaview
|
||||||
|
*.jfm
|
||||||
|
*.pfx
|
||||||
|
*.publishsettings
|
||||||
|
orleans.codegen.cs
|
||||||
|
|
||||||
|
# Including strong name files can present a security risk
|
||||||
|
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
|
||||||
|
#*.snk
|
||||||
|
|
||||||
|
# Since there are multiple workflows, uncomment next line to ignore bower_components
|
||||||
|
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
|
||||||
|
#bower_components/
|
||||||
|
|
||||||
|
# RIA/Silverlight projects
|
||||||
|
Generated_Code/
|
||||||
|
|
||||||
|
# Backup & report files from converting an old project file
|
||||||
|
# to a newer Visual Studio version. Backup files are not needed,
|
||||||
|
# because we have git ;-)
|
||||||
|
_UpgradeReport_Files/
|
||||||
|
Backup*/
|
||||||
|
UpgradeLog*.XML
|
||||||
|
UpgradeLog*.htm
|
||||||
|
ServiceFabricBackup/
|
||||||
|
*.rptproj.bak
|
||||||
|
|
||||||
|
# SQL Server files
|
||||||
|
*.mdf
|
||||||
|
*.ldf
|
||||||
|
*.ndf
|
||||||
|
|
||||||
|
# Business Intelligence projects
|
||||||
|
*.rdl.data
|
||||||
|
*.bim.layout
|
||||||
|
*.bim_*.settings
|
||||||
|
*.rptproj.rsuser
|
||||||
|
*- [Bb]ackup.rdl
|
||||||
|
*- [Bb]ackup ([0-9]).rdl
|
||||||
|
*- [Bb]ackup ([0-9][0-9]).rdl
|
||||||
|
|
||||||
|
# Microsoft Fakes
|
||||||
|
FakesAssemblies/
|
||||||
|
|
||||||
|
# GhostDoc plugin setting file
|
||||||
|
*.GhostDoc.xml
|
||||||
|
|
||||||
|
# Node.js Tools for Visual Studio
|
||||||
|
.ntvs_analysis.dat
|
||||||
|
node_modules/
|
||||||
|
|
||||||
|
# Visual Studio 6 build log
|
||||||
|
*.plg
|
||||||
|
|
||||||
|
# Visual Studio 6 workspace options file
|
||||||
|
*.opt
|
||||||
|
|
||||||
|
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
|
||||||
|
*.vbw
|
||||||
|
|
||||||
|
# Visual Studio 6 auto-generated project file (contains which files were open etc.)
|
||||||
|
*.vbp
|
||||||
|
|
||||||
|
# Visual Studio 6 workspace and project file (working project files containing files to include in project)
|
||||||
|
*.dsw
|
||||||
|
*.dsp
|
||||||
|
|
||||||
|
# Visual Studio 6 technical files
|
||||||
|
*.ncb
|
||||||
|
*.aps
|
||||||
|
|
||||||
|
# Visual Studio LightSwitch build output
|
||||||
|
**/*.HTMLClient/GeneratedArtifacts
|
||||||
|
**/*.DesktopClient/GeneratedArtifacts
|
||||||
|
**/*.DesktopClient/ModelManifest.xml
|
||||||
|
**/*.Server/GeneratedArtifacts
|
||||||
|
**/*.Server/ModelManifest.xml
|
||||||
|
_Pvt_Extensions
|
||||||
|
|
||||||
|
# Paket dependency manager
|
||||||
|
.paket/paket.exe
|
||||||
|
paket-files/
|
||||||
|
|
||||||
|
# FAKE - F# Make
|
||||||
|
.fake/
|
||||||
|
|
||||||
|
# CodeRush personal settings
|
||||||
|
.cr/personal
|
||||||
|
|
||||||
|
# Python Tools for Visual Studio (PTVS)
|
||||||
|
__pycache__/
|
||||||
|
*.pyc
|
||||||
|
|
||||||
|
# Cake - Uncomment if you are using it
|
||||||
|
# tools/**
|
||||||
|
# !tools/packages.config
|
||||||
|
|
||||||
|
# Tabs Studio
|
||||||
|
*.tss
|
||||||
|
|
||||||
|
# Telerik's JustMock configuration file
|
||||||
|
*.jmconfig
|
||||||
|
|
||||||
|
# BizTalk build output
|
||||||
|
*.btp.cs
|
||||||
|
*.btm.cs
|
||||||
|
*.odx.cs
|
||||||
|
*.xsd.cs
|
||||||
|
|
||||||
|
# OpenCover UI analysis results
|
||||||
|
OpenCover/
|
||||||
|
|
||||||
|
# Azure Stream Analytics local run output
|
||||||
|
ASALocalRun/
|
||||||
|
|
||||||
|
# MSBuild Binary and Structured Log
|
||||||
|
*.binlog
|
||||||
|
|
||||||
|
# NVidia Nsight GPU debugger configuration file
|
||||||
|
*.nvuser
|
||||||
|
|
||||||
|
# MFractors (Xamarin productivity tool) working folder
|
||||||
|
.mfractor/
|
||||||
|
|
||||||
|
# Local History for Visual Studio
|
||||||
|
.localhistory/
|
||||||
|
|
||||||
|
# Visual Studio History (VSHistory) files
|
||||||
|
.vshistory/
|
||||||
|
|
||||||
|
# BeatPulse healthcheck temp database
|
||||||
|
healthchecksdb
|
||||||
|
|
||||||
|
# Backup folder for Package Reference Convert tool in Visual Studio 2017
|
||||||
|
MigrationBackup/
|
||||||
|
|
||||||
|
# Ionide (cross platform F# VS Code tools) working folder
|
||||||
|
.ionide/
|
||||||
|
|
||||||
|
# Fody - auto-generated XML schema
|
||||||
|
FodyWeavers.xsd
|
||||||
|
|
||||||
|
# VS Code files for those working on multiple tools
|
||||||
|
.vscode/*
|
||||||
|
!.vscode/settings.json
|
||||||
|
!.vscode/tasks.json
|
||||||
|
!.vscode/launch.json
|
||||||
|
!.vscode/extensions.json
|
||||||
|
*.code-workspace
|
||||||
|
|
||||||
|
# Local History for Visual Studio Code
|
||||||
|
.history/
|
||||||
|
|
||||||
|
# Windows Installer files from build outputs
|
||||||
|
*.cab
|
||||||
|
*.msi
|
||||||
|
*.msix
|
||||||
|
*.msm
|
||||||
|
*.msp
|
||||||
|
|
||||||
|
# JetBrains Rider
|
||||||
|
*.sln.iml
|
||||||
|
|
||||||
|
**/wwwroot/upload
|
||||||
|
!**/ZhonTai.Admin/Core/Logs
|
||||||
|
!**/views/admin/logs
|
||||||
|
/ZhonTai.sln.EasyRun.json
|
||||||
|
!**/zhontai.ui.admin.vue3/bin
|
||||||
|
|
||||||
|
**/ZhonTai.Admin/ZhonTai.Admin.xml
|
||||||
|
**/ZhonTai.Admin.Core/ZhonTai.Admin.Core.xml
|
||||||
|
**/ZhonTai.Admin.Contracts/ZhonTai.Admin.Contracts.xml
|
||||||
|
**/ZhonTai.ApiUI/ZhonTai.ApiUI.xml
|
||||||
|
**/ZhonTai.Common/ZhonTai.Common.xml
|
||||||
|
**/ZhonTai.DynamicApi/ZhonTai.DynamicApi.xml
|
21
LICENSE
Normal file
21
LICENSE
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2020 zhontai
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
13
src/.idea/.idea.ZhonTai/.idea/.gitignore
generated
vendored
Normal file
13
src/.idea/.idea.ZhonTai/.idea/.gitignore
generated
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# 默认忽略的文件
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
||||||
|
# Rider 忽略的文件
|
||||||
|
/contentModel.xml
|
||||||
|
/.idea.ZhonTai.iml
|
||||||
|
/projectSettingsUpdater.xml
|
||||||
|
/modules.xml
|
||||||
|
# 基于编辑器的 HTTP 客户端请求
|
||||||
|
/httpRequests/
|
||||||
|
# Datasource local storage ignored files
|
||||||
|
/dataSources/
|
||||||
|
/dataSources.local.xml
|
1
src/.idea/.idea.ZhonTai/.idea/.name
generated
Normal file
1
src/.idea/.idea.ZhonTai/.idea/.name
generated
Normal file
@ -0,0 +1 @@
|
|||||||
|
ZhonTai
|
8
src/.idea/.idea.ZhonTai/.idea/MarsCodeWorkspaceAppSettings.xml
generated
Normal file
8
src/.idea/.idea.ZhonTai/.idea/MarsCodeWorkspaceAppSettings.xml
generated
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="com.codeverse.userSettings.MarscodeWorkspaceAppSettingsState">
|
||||||
|
<option name="chatAppRouterInfo" value="builder" />
|
||||||
|
<option name="ckgOperationStatus" value="SUCCESS" />
|
||||||
|
<option name="progress" value="0.9971618" />
|
||||||
|
</component>
|
||||||
|
</project>
|
10
src/.idea/.idea.ZhonTai/.idea/indexLayout.xml
generated
Normal file
10
src/.idea/.idea.ZhonTai/.idea/indexLayout.xml
generated
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="UserContentModel">
|
||||||
|
<attachedFolders>
|
||||||
|
<Path>../../SPMS.Portal</Path>
|
||||||
|
</attachedFolders>
|
||||||
|
<explicitIncludes />
|
||||||
|
<explicitExcludes />
|
||||||
|
</component>
|
||||||
|
</project>
|
5
src/Directory.Build.props
Normal file
5
src/Directory.Build.props
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<Project>
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net9.0</TargetFramework>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
114
src/ZhonTai.sln
Normal file
114
src/ZhonTai.sln
Normal file
@ -0,0 +1,114 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio Version 17
|
||||||
|
VisualStudioVersion = 17.0.31903.59
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ZhonTai.Admin.Host", "modules\admin\ZhonTai.Admin.Host\ZhonTai.Admin.Host.csproj", "{6F47A41A-085E-4422-BB73-5A2CBAA07D9F}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ZhonTai.Admin", "modules\admin\ZhonTai.Admin\ZhonTai.Admin.csproj", "{E725F0A1-0B03-406F-B84B-0F486C6137FC}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ZhonTai.Common", "platform\ZhonTai.Common\ZhonTai.Common.csproj", "{97D32A49-994C-44C5-A167-51E71D173B6F}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ZhonTai.Admin.Tests", "modules\admin\ZhonTai.Admin.Tests\ZhonTai.Admin.Tests.csproj", "{69A9CD28-39CE-415E-8150-A4A876E708FD}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ZhonTai.DynamicApi", "platform\ZhonTai.DynamicApi\ZhonTai.DynamicApi.csproj", "{BDD8E9DB-896C-4340-A7E6-DFE341DE86C2}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "05.platform", "05.platform", "{7D22DC19-78FC-4277-9768-06B5AF60FD14}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "02.build", "02.build", "{A6C50476-5236-4FD3-8C29-6449494846C0}"
|
||||||
|
ProjectSection(SolutionItems) = preProject
|
||||||
|
platform\Directory.Build.props = platform\Directory.Build.props
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ZhonTai.ApiUI", "platform\ZhonTai.ApiUI\ZhonTai.ApiUI.csproj", "{A6911102-A4F8-4000-A997-045F84F73060}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "01.sln", "01.sln", "{DA553AC2-CFE8-4DF7-B4BF-E57252CE5B83}"
|
||||||
|
ProjectSection(SolutionItems) = preProject
|
||||||
|
Directory.Build.props = Directory.Build.props
|
||||||
|
ZhonTai.sln.EasyRun.json = ZhonTai.sln.EasyRun.json
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "04.modules", "04.modules", "{626D43B7-A210-4754-BB59-357F917D5E86}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "admin", "admin", "{65CF5483-DF86-41D7-B367-7C2E28C1672D}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "im", "im", "{0602EECF-035B-42C2-B534-E29BC24DE646}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZhonTai.IMServer", "modules\im\ZhonTai.IMServer\ZhonTai.IMServer.csproj", "{8EB07596-339B-420A-BB32-1FB69D7E7BA5}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "03.gateways", "03.gateways", "{908FBE9E-EF24-4680-9C2F-259EC54D6AC6}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZhonTai.Gateway.Yarp", "gateways\ZhonTai.Gateway.Yarp\ZhonTai.Gateway.Yarp.csproj", "{979BE067-16EE-458F-B414-271749B0C038}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZhonTai.Admin.Core", "modules\admin\ZhonTai.Admin.Core\ZhonTai.Admin.Core.csproj", "{794CBF41-AF02-4B03-B1FE-C362C501F824}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZhonTai.Admin.Contracts", "modules\admin\ZhonTai.Admin.Contracts\ZhonTai.Admin.Contracts.csproj", "{547FC35E-7642-43AF-BCFA-72EED6FC483A}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{6F47A41A-085E-4422-BB73-5A2CBAA07D9F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{6F47A41A-085E-4422-BB73-5A2CBAA07D9F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{6F47A41A-085E-4422-BB73-5A2CBAA07D9F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{6F47A41A-085E-4422-BB73-5A2CBAA07D9F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{E725F0A1-0B03-406F-B84B-0F486C6137FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{E725F0A1-0B03-406F-B84B-0F486C6137FC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{E725F0A1-0B03-406F-B84B-0F486C6137FC}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{E725F0A1-0B03-406F-B84B-0F486C6137FC}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{97D32A49-994C-44C5-A167-51E71D173B6F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{97D32A49-994C-44C5-A167-51E71D173B6F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{97D32A49-994C-44C5-A167-51E71D173B6F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{97D32A49-994C-44C5-A167-51E71D173B6F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{69A9CD28-39CE-415E-8150-A4A876E708FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{69A9CD28-39CE-415E-8150-A4A876E708FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{69A9CD28-39CE-415E-8150-A4A876E708FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{69A9CD28-39CE-415E-8150-A4A876E708FD}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{BDD8E9DB-896C-4340-A7E6-DFE341DE86C2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{BDD8E9DB-896C-4340-A7E6-DFE341DE86C2}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{BDD8E9DB-896C-4340-A7E6-DFE341DE86C2}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{BDD8E9DB-896C-4340-A7E6-DFE341DE86C2}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{A6911102-A4F8-4000-A997-045F84F73060}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{A6911102-A4F8-4000-A997-045F84F73060}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{A6911102-A4F8-4000-A997-045F84F73060}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{A6911102-A4F8-4000-A997-045F84F73060}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{8EB07596-339B-420A-BB32-1FB69D7E7BA5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{8EB07596-339B-420A-BB32-1FB69D7E7BA5}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{8EB07596-339B-420A-BB32-1FB69D7E7BA5}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{8EB07596-339B-420A-BB32-1FB69D7E7BA5}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{979BE067-16EE-458F-B414-271749B0C038}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{979BE067-16EE-458F-B414-271749B0C038}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{979BE067-16EE-458F-B414-271749B0C038}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{979BE067-16EE-458F-B414-271749B0C038}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{794CBF41-AF02-4B03-B1FE-C362C501F824}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{794CBF41-AF02-4B03-B1FE-C362C501F824}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{794CBF41-AF02-4B03-B1FE-C362C501F824}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{794CBF41-AF02-4B03-B1FE-C362C501F824}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{547FC35E-7642-43AF-BCFA-72EED6FC483A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{547FC35E-7642-43AF-BCFA-72EED6FC483A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{547FC35E-7642-43AF-BCFA-72EED6FC483A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{547FC35E-7642-43AF-BCFA-72EED6FC483A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(NestedProjects) = preSolution
|
||||||
|
{6F47A41A-085E-4422-BB73-5A2CBAA07D9F} = {65CF5483-DF86-41D7-B367-7C2E28C1672D}
|
||||||
|
{E725F0A1-0B03-406F-B84B-0F486C6137FC} = {65CF5483-DF86-41D7-B367-7C2E28C1672D}
|
||||||
|
{97D32A49-994C-44C5-A167-51E71D173B6F} = {7D22DC19-78FC-4277-9768-06B5AF60FD14}
|
||||||
|
{69A9CD28-39CE-415E-8150-A4A876E708FD} = {65CF5483-DF86-41D7-B367-7C2E28C1672D}
|
||||||
|
{BDD8E9DB-896C-4340-A7E6-DFE341DE86C2} = {7D22DC19-78FC-4277-9768-06B5AF60FD14}
|
||||||
|
{A6911102-A4F8-4000-A997-045F84F73060} = {7D22DC19-78FC-4277-9768-06B5AF60FD14}
|
||||||
|
{65CF5483-DF86-41D7-B367-7C2E28C1672D} = {626D43B7-A210-4754-BB59-357F917D5E86}
|
||||||
|
{0602EECF-035B-42C2-B534-E29BC24DE646} = {626D43B7-A210-4754-BB59-357F917D5E86}
|
||||||
|
{8EB07596-339B-420A-BB32-1FB69D7E7BA5} = {0602EECF-035B-42C2-B534-E29BC24DE646}
|
||||||
|
{979BE067-16EE-458F-B414-271749B0C038} = {908FBE9E-EF24-4680-9C2F-259EC54D6AC6}
|
||||||
|
{794CBF41-AF02-4B03-B1FE-C362C501F824} = {65CF5483-DF86-41D7-B367-7C2E28C1672D}
|
||||||
|
{547FC35E-7642-43AF-BCFA-72EED6FC483A} = {65CF5483-DF86-41D7-B367-7C2E28C1672D}
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {AB40D0C5-E3EA-4A9B-86C2-38F0BB33FC04}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
49
src/ZhonTai.sln.EasyRun.json
Normal file
49
src/ZhonTai.sln.EasyRun.json
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
{
|
||||||
|
"SettingsId": "2b14968a-f3ca-4849-bcad-5d4f210d2960",
|
||||||
|
"Profiles": [
|
||||||
|
{
|
||||||
|
"Name": "Default",
|
||||||
|
"LoggingTargetType": 0,
|
||||||
|
"LoggingPath": "./.logs",
|
||||||
|
"LoggerUrl": null,
|
||||||
|
"UseTye": true,
|
||||||
|
"TyePort": 10000,
|
||||||
|
"Filter": ".Host|.Gateway|.IMServer",
|
||||||
|
"Services": [
|
||||||
|
{
|
||||||
|
"ServiceType": 0,
|
||||||
|
"Name": "ZhonTai.Gateway.Yarp",
|
||||||
|
"TyeName": null,
|
||||||
|
"ProjectFile": "gateways\\ZhonTai.Gateway.Yarp\\ZhonTai.Gateway.Yarp.csproj",
|
||||||
|
"DefaultSelected": true,
|
||||||
|
"Bindings": "::16010",
|
||||||
|
"Arguments": null,
|
||||||
|
"EnvVariables": null,
|
||||||
|
"Replicas": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ServiceType": 0,
|
||||||
|
"Name": "ZhonTai.IMServer",
|
||||||
|
"TyeName": null,
|
||||||
|
"ProjectFile": "modules\\im\\ZhonTai.IMServer\\ZhonTai.IMServer.csproj",
|
||||||
|
"DefaultSelected": true,
|
||||||
|
"Bindings": "::17010",
|
||||||
|
"Arguments": null,
|
||||||
|
"EnvVariables": null,
|
||||||
|
"Replicas": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ServiceType": 0,
|
||||||
|
"Name": "ZhonTai.Admin.Host",
|
||||||
|
"TyeName": null,
|
||||||
|
"ProjectFile": "modules\\admin\\ZhonTai.Admin.Host\\ZhonTai.Admin.Host.csproj",
|
||||||
|
"DefaultSelected": true,
|
||||||
|
"Bindings": "::18010",
|
||||||
|
"Arguments": null,
|
||||||
|
"EnvVariables": null,
|
||||||
|
"Replicas": 1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
64
src/build/pkg_push.ps1
Normal file
64
src/build/pkg_push.ps1
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
#定义全局变量
|
||||||
|
|
||||||
|
$buildFolder = (Get-Item -Path "./" -Verbose).FullName
|
||||||
|
$rootFolder = Join-Path $buildFolder "../"
|
||||||
|
$apiKey = $args[0]
|
||||||
|
if ([System.String]::IsNullOrWhiteSpace($apiKey))
|
||||||
|
{
|
||||||
|
$apiKey = $env:NUGET_KEY
|
||||||
|
}
|
||||||
|
$sourceUrl = "https://api.nuget.org/v3/index.json"
|
||||||
|
|
||||||
|
Write-Host "buildFolder:" $buildFolder
|
||||||
|
Write-Host "rootFolder:" $rootFolder
|
||||||
|
|
||||||
|
$nuGetOutputFolder = Join-Path $buildFolder "/packages"
|
||||||
|
Write-Host "NuGetOutputFolder:" $nuGetOutputFolder
|
||||||
|
|
||||||
|
#编译解决方案
|
||||||
|
$solutionPath = "../ZhonTai.sln";
|
||||||
|
# Write-Host $solutionPath
|
||||||
|
# pause
|
||||||
|
|
||||||
|
Write-Host "dotnet build -- start"
|
||||||
|
dotnet build $solutionPath -c Release
|
||||||
|
Write-Host "dotnet build -- end"
|
||||||
|
|
||||||
|
if($LASTEXITCODE -eq 0){
|
||||||
|
#success
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
throw "Build Error!";
|
||||||
|
}
|
||||||
|
# pause
|
||||||
|
|
||||||
|
#打包之前先删除nuget包
|
||||||
|
Remove-Item "$nuGetOutputFolder/*" -recurse
|
||||||
|
|
||||||
|
# 指定项目打包
|
||||||
|
$projects = (
|
||||||
|
"modules\admin\ZhonTai.Admin",
|
||||||
|
"modules\admin\ZhonTai.Admin.Contracts",
|
||||||
|
"modules\admin\ZhonTai.Admin.Core",
|
||||||
|
"platform\ZhonTai.ApiUI",
|
||||||
|
"platform\ZhonTai.Common",
|
||||||
|
"platform\ZhonTai.DynamicApi"
|
||||||
|
)
|
||||||
|
|
||||||
|
Write-Host "dotnet pack -- start"
|
||||||
|
foreach($project in $projects) {
|
||||||
|
$projectFolder = Join-Path $rootFolder $project
|
||||||
|
Write-Host "projectFolder:" $projectFolder
|
||||||
|
dotnet pack $projectFolder --no-build -c Release /p:SourceLinkCreate=true /p:SolutionDir=$rootFolder -o $nuGetOutputFolder;
|
||||||
|
}
|
||||||
|
Write-Host "dotnet pack -- end"
|
||||||
|
# pause
|
||||||
|
|
||||||
|
Write-Host "dotnet nuget push -- start"
|
||||||
|
$nupkgs = Join-Path $nuGetOutputFolder "/*.nupkg"
|
||||||
|
$snupkgs = Join-Path $nuGetOutputFolder "/*.snupkg"
|
||||||
|
dotnet nuget push $nupkgs -s $sourceUrl -k $apiKey --skip-duplicate
|
||||||
|
dotnet nuget push $snupkgs -s $sourceUrl -k $apiKey --skip-duplicate
|
||||||
|
Write-Host "dotnet nuget push -- end"
|
||||||
|
|
||||||
|
pause
|
@ -0,0 +1,48 @@
|
|||||||
|
namespace ZhonTai.Gateway.Yarp.Core.Configs;
|
||||||
|
public class GatewayConfig
|
||||||
|
{
|
||||||
|
public static class Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 模块信息
|
||||||
|
/// </summary>
|
||||||
|
public class ModuleInfo
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 名称
|
||||||
|
/// </summary>
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 路径
|
||||||
|
/// </summary>
|
||||||
|
public string Url { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 健康检查配置
|
||||||
|
/// </summary>
|
||||||
|
public class HealthChecksConfig
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 启用
|
||||||
|
/// </summary>
|
||||||
|
public bool Enable { get; set; } = true;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 访问路径
|
||||||
|
/// </summary>
|
||||||
|
public string Path { get; set; } = "/health";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 模块列表
|
||||||
|
/// </summary>
|
||||||
|
public List<Models.ModuleInfo> ModuleList { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 健康检查配置
|
||||||
|
/// </summary>
|
||||||
|
public Models.HealthChecksConfig HealthChecks { get; set; } = new Models.HealthChecksConfig();
|
||||||
|
}
|
77
src/gateways/ZhonTai.Gateway.Yarp/Program.cs
Normal file
77
src/gateways/ZhonTai.Gateway.Yarp/Program.cs
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
using NLog.Web;
|
||||||
|
using System.Reflection;
|
||||||
|
using ZhonTai.Gateway.Yarp.Core.Configs;
|
||||||
|
|
||||||
|
var builder = WebApplication.CreateBuilder(args);
|
||||||
|
|
||||||
|
//清空日志供应程序,避免.net自带日志输出到命令台
|
||||||
|
builder.Logging.ClearProviders();
|
||||||
|
//使用NLog日志
|
||||||
|
builder.Host.UseNLog();
|
||||||
|
|
||||||
|
var healthChecks = builder.Configuration.GetSection("GatewayConfig").Get<GatewayConfig>()?.HealthChecks;
|
||||||
|
//添加健康检查
|
||||||
|
if (healthChecks != null && healthChecks.Enable)
|
||||||
|
{
|
||||||
|
builder.Services.AddHealthChecks();
|
||||||
|
}
|
||||||
|
|
||||||
|
//添加跨域
|
||||||
|
builder.Services.AddCors(options =>
|
||||||
|
{
|
||||||
|
options.AddPolicy("AllowAnyPolicy", policy =>
|
||||||
|
{
|
||||||
|
policy
|
||||||
|
.AllowAnyOrigin()
|
||||||
|
.AllowAnyHeader()
|
||||||
|
.AllowAnyMethod();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
//添加代理
|
||||||
|
builder.Services.AddReverseProxy()
|
||||||
|
.LoadFromConfig(builder.Configuration.GetSection("ReverseProxy"));
|
||||||
|
|
||||||
|
// Add services to the container.
|
||||||
|
|
||||||
|
var app = builder.Build();
|
||||||
|
|
||||||
|
// Configure the HTTP request pipeline.
|
||||||
|
|
||||||
|
//使用跨域
|
||||||
|
app.UseCors("AllowAnyPolicy");
|
||||||
|
|
||||||
|
//使用健康检查
|
||||||
|
if (healthChecks != null && healthChecks.Enable)
|
||||||
|
{
|
||||||
|
app.MapHealthChecks(healthChecks.Path);
|
||||||
|
}
|
||||||
|
|
||||||
|
//使用代理
|
||||||
|
app.MapReverseProxy();
|
||||||
|
|
||||||
|
//首页
|
||||||
|
app.MapGet("/", async (HttpResponse response) =>
|
||||||
|
{
|
||||||
|
var gatewayConfig = builder.Configuration.GetSection("GatewayConfig").Get<GatewayConfig>();
|
||||||
|
var moduleList = gatewayConfig?.ModuleList;
|
||||||
|
|
||||||
|
var html = $"<html><body>";
|
||||||
|
if (moduleList?.Count > 0)
|
||||||
|
{
|
||||||
|
moduleList.ForEach(m =>
|
||||||
|
{
|
||||||
|
html += $"""<a href='{m.Url}' target="_blank">{m.Name}</a></br>""";
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
html += $"The {Assembly.GetEntryAssembly()?.GetName().Name} has started.";
|
||||||
|
}
|
||||||
|
html += "</body></html>";
|
||||||
|
|
||||||
|
response.ContentType = "text/html;charset=UTF-8";
|
||||||
|
await response.WriteAsync(html);
|
||||||
|
});
|
||||||
|
|
||||||
|
app.Run();
|
@ -0,0 +1,31 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://json.schemastore.org/launchsettings.json",
|
||||||
|
"iisSettings": {
|
||||||
|
"windowsAuthentication": false,
|
||||||
|
"anonymousAuthentication": true,
|
||||||
|
"iisExpress": {
|
||||||
|
"applicationUrl": "http://localhost:16010",
|
||||||
|
"sslPort": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"profiles": {
|
||||||
|
"ZhonTai.Gateway.Yarp": {
|
||||||
|
"commandName": "Project",
|
||||||
|
"dotnetRunMessages": true,
|
||||||
|
"launchBrowser": true,
|
||||||
|
"launchUrl": "",
|
||||||
|
"applicationUrl": "http://localhost:16010",
|
||||||
|
"environmentVariables": {
|
||||||
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"IIS Express": {
|
||||||
|
"commandName": "IISExpress",
|
||||||
|
"launchBrowser": true,
|
||||||
|
"launchUrl": "",
|
||||||
|
"environmentVariables": {
|
||||||
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
<PropertyGroup>
|
||||||
|
<Description>中台网关</Description>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net9.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Yarp.ReverseProxy" Version="2.3.0" />
|
||||||
|
<PackageReference Include="NLog.Web.AspNetCore" Version="5.5.0" />
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"Logging": {
|
||||||
|
"LogLevel": {
|
||||||
|
"Default": "Information",
|
||||||
|
"Microsoft.AspNetCore": "Warning"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
97
src/gateways/ZhonTai.Gateway.Yarp/appsettings.json
Normal file
97
src/gateways/ZhonTai.Gateway.Yarp/appsettings.json
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
{
|
||||||
|
"Logging": {
|
||||||
|
"LogLevel": {
|
||||||
|
"Default": "Information",
|
||||||
|
"Microsoft.AspNetCore": "Warning"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"AllowedHosts": "*",
|
||||||
|
"Urls": "http://*:16010",
|
||||||
|
"ReverseProxy": {
|
||||||
|
"Routes": {
|
||||||
|
"admin": {
|
||||||
|
"ClusterId": "admin",
|
||||||
|
"Match": {
|
||||||
|
"Path": "/api/admin/{**catch-all}",
|
||||||
|
//"Methods": [ "POST", "GET", "DELETE", "PUT" ],
|
||||||
|
"Hosts": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"admin-doc": {
|
||||||
|
"ClusterId": "admin",
|
||||||
|
"Match": {
|
||||||
|
"Path": "/doc/admin/{**catch-all}",
|
||||||
|
//"Methods": [ "POST", "GET", "DELETE", "PUT" ],
|
||||||
|
"Hosts": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"admin-file": {
|
||||||
|
"ClusterId": "admin",
|
||||||
|
"Match": {
|
||||||
|
"Path": "/upload/{**catch-all}",
|
||||||
|
//"Methods": [ "POST", "GET", "DELETE", "PUT" ],
|
||||||
|
"Hosts": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"app": {
|
||||||
|
"ClusterId": "app",
|
||||||
|
"Match": {
|
||||||
|
"Path": "/api/app/{**catch-all}",
|
||||||
|
//"Methods": [ "POST", "GET", "DELETE", "PUT" ],
|
||||||
|
"Hosts": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"app-doc": {
|
||||||
|
"ClusterId": "app",
|
||||||
|
"Match": {
|
||||||
|
"Path": "/doc/app/{**catch-all}",
|
||||||
|
//"Methods": [ "POST", "GET", "DELETE", "PUT" ],
|
||||||
|
"Hosts": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Clusters": {
|
||||||
|
"admin": {
|
||||||
|
"Destinations": {
|
||||||
|
"destination1": {
|
||||||
|
"Address": "http://localhost:18010"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"LoadBalancingPolicy": "RoundRobin"
|
||||||
|
},
|
||||||
|
"app": {
|
||||||
|
"Destinations": {
|
||||||
|
"destination1": {
|
||||||
|
"Address": "http://localhost:18020"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"LoadBalancingPolicy": "RoundRobin"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//网关配置
|
||||||
|
"GatewayConfig": {
|
||||||
|
//模块列表
|
||||||
|
"ModuleList": [
|
||||||
|
{
|
||||||
|
//文档名称
|
||||||
|
"Name": "权限接口文档",
|
||||||
|
//文档地址
|
||||||
|
"Url": "/doc/admin/index.html"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
//文档名称
|
||||||
|
"Name": "app接口文档",
|
||||||
|
//文档地址
|
||||||
|
"Url": "/doc/app/index.html"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
//健康检查
|
||||||
|
"HealthChecks": {
|
||||||
|
//启用
|
||||||
|
"Enable": true,
|
||||||
|
//访问路径
|
||||||
|
"Path": "/health"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
63
src/gateways/ZhonTai.Gateway.Yarp/nlog.config
Normal file
63
src/gateways/ZhonTai.Gateway.Yarp/nlog.config
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- 配置文档 https://nlog-project.org/config -->
|
||||||
|
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" autoReload="true" internalLogLevel="Info">
|
||||||
|
<!-- 启用.net core的核心布局渲染器 -->
|
||||||
|
<extensions>
|
||||||
|
<add assembly="NLog.Web.AspNetCore" />
|
||||||
|
</extensions>
|
||||||
|
<!-- 写入日志的目标配置 archiveAboveSize="102400" maxArchiveDays="60" -->
|
||||||
|
<targets>
|
||||||
|
<!-- 跟踪 -->
|
||||||
|
<target xsi:type="File" name="trace" fileName="../logs/trace-${shortdate}.log" layout="${longdate}|${event-properties:item=EventId_Id}|${uppercase:${level}}|${logger}|${message} ${exception:format=tostring}|url: ${aspnet-request-url}|action: ${aspnet-mvc-action}" />
|
||||||
|
<!-- 调试 -->
|
||||||
|
<target xsi:type="File" name="debug" fileName="../logs/debug-${shortdate}.log" layout="${longdate}|${event-properties:item=EventId_Id}|${uppercase:${level}}|${logger}|${message} ${exception:format=tostring}|url: ${aspnet-request-url}|action: ${aspnet-mvc-action}" />
|
||||||
|
<!-- 信息 -->
|
||||||
|
<target xsi:type="File" name="info" fileName="../logs/info-${shortdate}.log" layout="${longdate}|${event-properties:item=EventId_Id}|${uppercase:${level}}|${logger}|${message} ${exception:format=tostring}|url: ${aspnet-request-url}|action: ${aspnet-mvc-action}" />
|
||||||
|
<!-- 警告 -->
|
||||||
|
<target xsi:type="File" name="warn" fileName="../logs/warn-${shortdate}.log" layout="${longdate}|${event-properties:item=EventId_Id}|${uppercase:${level}}|${logger}|${message} ${exception:format=tostring}|url: ${aspnet-request-url}|action: ${aspnet-mvc-action}" />
|
||||||
|
<!-- 错误 -->
|
||||||
|
<target xsi:type="File" name="error" fileName="../logs/error-${shortdate}.log" layout="${longdate}|${event-properties:item=EventId_Id}|${uppercase:${level}}|${logger}|${message} ${exception:format=tostring}|url: ${aspnet-request-url}|action: ${aspnet-mvc-action}" />
|
||||||
|
<!-- 控制台 -->
|
||||||
|
<target xsi:type="Console" name="console" layout="${message}" />
|
||||||
|
<!-- 数据库 https://github.com/NLog/NLog/wiki/Database-target -->
|
||||||
|
<target name="db" xsi:type="Database" connectionString="Data Source=|DataDirectory|\\admindb.db; Pooling=true;Min Pool Size=1" dbProvider="System.Data.SQLite.SQLiteConnection, System.Data.SQLite">
|
||||||
|
<commandText>
|
||||||
|
INSERT INTO "ad_log"("Id", "Logged", "Level", "Message", "Logger", "Properties", "Callsite", "Exception") VALUES(@Id, @Logged, @Level, @Message, @Logger, @Properties, @Callsite, @Exception)
|
||||||
|
</commandText>
|
||||||
|
<!-- 自定义主键 -->
|
||||||
|
<parameter name="@Id" layout="${event-properties:id}" />
|
||||||
|
<parameter name="@Logged" layout="${date}" />
|
||||||
|
<parameter name="@Level" layout="${level}" />
|
||||||
|
<parameter name="@Message" layout="${message}" />
|
||||||
|
<parameter name="@Logger" layout="${logger}" />
|
||||||
|
<!-- 自定义属性 -->
|
||||||
|
<parameter name="@properties" layout="${all-event-properties:separator=|}" />
|
||||||
|
<parameter name="@Callsite" layout="${callsite}" />
|
||||||
|
<parameter name="@Exception" layout="${exception:tostring}" />
|
||||||
|
</target>
|
||||||
|
</targets>
|
||||||
|
<!-- 映射规则 -->
|
||||||
|
<rules>
|
||||||
|
<!--跳过不重要的微软日志-->
|
||||||
|
<logger name="Microsoft.*" maxlevel="Debug" final="true" />
|
||||||
|
<logger name="Microsoft.AspNetCore.*" maxlevel="Info" final="true" />
|
||||||
|
<!--跳过不重要的CAP日志-->
|
||||||
|
<logger name="DotNetCore.CAP.*" maxlevel="Debug" final="true" />
|
||||||
|
<!--跳过不重要的Localization日志-->
|
||||||
|
<logger name="My.Extensions.Localization.Json.*" maxlevel="Debug" final="true" />
|
||||||
|
<!-- 数据库 -->
|
||||||
|
<logger name="db" writeTo="db" />
|
||||||
|
<!-- 命令台 -->
|
||||||
|
<logger name="*" minlevel="Trace" writeTo="console" />
|
||||||
|
<!-- 跟踪 -->
|
||||||
|
<logger name="*" minlevel="Trace" maxlevel="Trace" writeTo="trace" />
|
||||||
|
<!-- 调试 -->
|
||||||
|
<logger name="*" minlevel="Trace" maxlevel="Debug" writeTo="debug" />
|
||||||
|
<!-- 信息 -->
|
||||||
|
<logger name="*" minlevel="Info" maxlevel="Info" writeTo="info" />
|
||||||
|
<!-- 警告 -->
|
||||||
|
<logger name="*" minlevel="Warn" maxlevel="Warn" writeTo="warn" />
|
||||||
|
<!-- 错误 -->
|
||||||
|
<logger name="*" minlevel="Error" maxlevel="Fatal" writeTo="error" />
|
||||||
|
</rules>
|
||||||
|
</nlog>
|
@ -0,0 +1,22 @@
|
|||||||
|
using System.ComponentModel;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Contracts.Core.Consts;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 缓存键
|
||||||
|
/// </summary>
|
||||||
|
public static partial class AdminCacheKeys
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 部门 admin:org:tenantId
|
||||||
|
/// </summary>
|
||||||
|
[Description("部门")]
|
||||||
|
public const string Org = "admin:org:";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取部门缓存键
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="tenantId">租户Id</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static string GetOrgKey(long tenantId) => $"{Org}{tenantId}";
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
namespace ZhonTai.Admin.Contracts.Core.Consts;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 数据库常量
|
||||||
|
/// </summary>
|
||||||
|
public static partial class DbConsts
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 表名前缀
|
||||||
|
/// </summary>
|
||||||
|
public const string TableNamePrefix = "base_";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 旧表名前缀
|
||||||
|
/// </summary>
|
||||||
|
public const string TableOldNamePrefix = "ad_";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// NPP 表前缀
|
||||||
|
/// </summary>
|
||||||
|
public const string NPPTableOldPrefix = "npp_";
|
||||||
|
}
|
@ -0,0 +1,82 @@
|
|||||||
|
using FreeSql.DataAnnotations;
|
||||||
|
using ZhonTai.Admin.Domain.PermissionApi;
|
||||||
|
using ZhonTai.Admin.Domain.Permission;
|
||||||
|
using ZhonTai.Admin.Core.Entities;
|
||||||
|
using ZhonTai.Admin.Core.Attributes;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain.Api;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 接口管理
|
||||||
|
/// </summary>
|
||||||
|
[Table(Name = DbConsts.TableNamePrefix + "api", OldName = DbConsts.TableOldNamePrefix + "api")]
|
||||||
|
[Index("idx_{tablename}_01", nameof(ParentId) + "," + nameof(Path), true)]
|
||||||
|
public partial class ApiEntity : EntityBase, IChilds<ApiEntity>
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 所属模块
|
||||||
|
/// </summary>
|
||||||
|
public long ParentId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 接口命名
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 50)]
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 接口名称
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 500)]
|
||||||
|
public string Label { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 接口地址
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 500)]
|
||||||
|
public string Path { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 接口提交方法
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 50)]
|
||||||
|
public string HttpMethods { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 启用接口日志
|
||||||
|
/// </summary>
|
||||||
|
public bool EnabledLog { get; set; } = true;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 启用请求参数
|
||||||
|
/// </summary>
|
||||||
|
public bool EnabledParams { get; set; } = false;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 启用响应结果
|
||||||
|
/// </summary>
|
||||||
|
public bool EnabledResult { get; set; } = false;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 说明
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 500)]
|
||||||
|
public string Description { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 排序
|
||||||
|
/// </summary>
|
||||||
|
public int Sort { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 启用
|
||||||
|
/// </summary>
|
||||||
|
public bool Enabled { get; set; } = true;
|
||||||
|
|
||||||
|
[Navigate(nameof(ParentId))]
|
||||||
|
public List<ApiEntity> Childs { get; set; }
|
||||||
|
|
||||||
|
[NotGen]
|
||||||
|
[Navigate(ManyToMany = typeof(PermissionApiEntity))]
|
||||||
|
public ICollection<PermissionEntity> Permissions { get; set; }
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
using ZhonTai.Admin.Core.Repositories;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain.Api;
|
||||||
|
|
||||||
|
public interface IApiRepository : IRepositoryBase<ApiEntity>
|
||||||
|
{
|
||||||
|
}
|
@ -0,0 +1,36 @@
|
|||||||
|
using FreeSql.DataAnnotations;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain.AppLog;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 应用程序日志
|
||||||
|
/// </summary>
|
||||||
|
[Table(Name = DbConsts.TableNamePrefix + "app_log", OldName = DbConsts.TableOldNamePrefix + "app_log")]
|
||||||
|
public partial class AppLogEntity
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 主键Id
|
||||||
|
/// </summary>
|
||||||
|
[Column(Position = 1, IsPrimary = true, IsNullable = false)]
|
||||||
|
public long Id { get; set; }
|
||||||
|
|
||||||
|
public DateTime Logged { get; set; }
|
||||||
|
|
||||||
|
[Column(StringLength = 5)]
|
||||||
|
public string Level { get; set; }
|
||||||
|
|
||||||
|
[Column(StringLength = -1)]
|
||||||
|
public string Message { get; set; }
|
||||||
|
|
||||||
|
[Column(StringLength = 300)]
|
||||||
|
public string Logger { get; set; }
|
||||||
|
|
||||||
|
[Column(StringLength = -1)]
|
||||||
|
public string Properties { get; set; }
|
||||||
|
|
||||||
|
[Column(StringLength = 300)]
|
||||||
|
public string Callsite { get; set; }
|
||||||
|
|
||||||
|
[Column(StringLength = -1)]
|
||||||
|
public string Exception { get; set; }
|
||||||
|
}
|
@ -0,0 +1,51 @@
|
|||||||
|
using ZhonTai.Admin.Core.Entities;
|
||||||
|
using FreeSql.DataAnnotations;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Contracts.Domain.Board;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 看板实体
|
||||||
|
/// </summary>
|
||||||
|
[Table(Name = "npp_dashboard")]
|
||||||
|
[Index("idx_{tablename}_01", nameof(Name) + "," + nameof(Sort), true)]
|
||||||
|
public class BoardEntity : EntityBase
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 看板名称
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 100)]
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 功能简介
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 500)]
|
||||||
|
public string Description { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 关键词
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 200)]
|
||||||
|
public string Keywords { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 网址
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 500)]
|
||||||
|
public string Url { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 需要安全认证
|
||||||
|
/// </summary>
|
||||||
|
public bool Safety { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 启用
|
||||||
|
/// </summary>
|
||||||
|
public bool Enabled { get; set; } = true;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 排序
|
||||||
|
/// </summary>
|
||||||
|
public int Sort { get; set; }
|
||||||
|
}
|
@ -0,0 +1,25 @@
|
|||||||
|
using FreeSql.DataAnnotations;
|
||||||
|
using ZhonTai.Admin.Core.Attributes;
|
||||||
|
using ZhonTai.Admin.Core.Entities;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Contracts.Domain.Board;
|
||||||
|
|
||||||
|
[Table(Name = "npp_dashboard_user")]
|
||||||
|
public class BoardUserEntity : EntityBase
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 用户Id
|
||||||
|
/// </summary>
|
||||||
|
public long UserId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 看板Id
|
||||||
|
/// </summary>
|
||||||
|
public long BoardId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 字典类型
|
||||||
|
/// </summary>
|
||||||
|
[NotGen]
|
||||||
|
public BoardEntity Board { get; set; }
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
using ZhonTai.Admin.Core.Entities;
|
||||||
|
using FreeSql.DataAnnotations;
|
||||||
|
using ZhonTai.Admin.Domain.DictType;
|
||||||
|
using ZhonTai.Admin.Core.Attributes;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Contracts.Domain.CustomNavigation;
|
||||||
|
|
||||||
|
[Table(Name = DbConsts.NPPTableOldPrefix + "CustomNavigation")]
|
||||||
|
[Index("idx_{tablename}_01", nameof(UserId), true)]
|
||||||
|
public partial class CustomNavigationEntity : EntityBase
|
||||||
|
{
|
||||||
|
public long UserId { get; set; }
|
||||||
|
|
||||||
|
public string CustomNavigationJson { get; set; }
|
||||||
|
}
|
@ -0,0 +1,65 @@
|
|||||||
|
using ZhonTai.Admin.Core.Entities;
|
||||||
|
using FreeSql.DataAnnotations;
|
||||||
|
using ZhonTai.Admin.Domain.DictType;
|
||||||
|
using ZhonTai.Admin.Core.Attributes;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain.Dict;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 数据字典
|
||||||
|
/// </summary>
|
||||||
|
[Table(Name = DbConsts.TableNamePrefix + "dict", OldName = DbConsts.TableOldNamePrefix + "dict")]
|
||||||
|
[Index("idx_{tablename}_01", nameof(DictTypeId) + "," + nameof(Name), true)]
|
||||||
|
public partial class DictEntity : EntityBase
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 上级Id
|
||||||
|
/// </summary>
|
||||||
|
public long? ParentId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 字典类型Id
|
||||||
|
/// </summary>
|
||||||
|
[Column(OldName = "DictionaryTypeId")]
|
||||||
|
public long DictTypeId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 字典类型
|
||||||
|
/// </summary>
|
||||||
|
[NotGen]
|
||||||
|
public DictTypeEntity DictType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 字典名称
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 50)]
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 字典编码
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 50)]
|
||||||
|
public string Code { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 字典值
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 50)]
|
||||||
|
public string Value { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 说明
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 500)]
|
||||||
|
public string Description { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 启用
|
||||||
|
/// </summary>
|
||||||
|
public bool Enabled { get; set; } = true;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 排序
|
||||||
|
/// </summary>
|
||||||
|
public int Sort { get; set; }
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
using ZhonTai.Admin.Core.Repositories;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain.Dict;
|
||||||
|
|
||||||
|
public interface IDictRepository : IRepositoryBase<DictEntity>
|
||||||
|
{
|
||||||
|
}
|
@ -0,0 +1,50 @@
|
|||||||
|
using ZhonTai.Admin.Core.Entities;
|
||||||
|
using FreeSql.DataAnnotations;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain.DictType;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 数据字典类型
|
||||||
|
/// </summary>
|
||||||
|
[Table(Name = DbConsts.TableNamePrefix + "dict_type", OldName = DbConsts.TableOldNamePrefix + "dict_type")]
|
||||||
|
[Index("idx_{tablename}_01", nameof(Name), true)]
|
||||||
|
public class DictTypeEntity : EntityBase
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 上级Id
|
||||||
|
/// </summary>
|
||||||
|
public long ParentId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 名称
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 50)]
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 编码
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 50)]
|
||||||
|
public string Code { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 描述
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 500)]
|
||||||
|
public string Description { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 启用
|
||||||
|
/// </summary>
|
||||||
|
public bool Enabled { get; set; } = true;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否树形
|
||||||
|
/// </summary>
|
||||||
|
public bool IsTree { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 排序
|
||||||
|
/// </summary>
|
||||||
|
public int Sort { get; set; }
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
using ZhonTai.Admin.Core.Repositories;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain.DictType;
|
||||||
|
|
||||||
|
public interface IDictTypeRepository : IRepositoryBase<DictTypeEntity>
|
||||||
|
{
|
||||||
|
}
|
@ -0,0 +1,68 @@
|
|||||||
|
using ZhonTai.Admin.Core.Entities;
|
||||||
|
using FreeSql.DataAnnotations;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain.Doc;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 文档
|
||||||
|
/// </summary>
|
||||||
|
[Table(Name = DbConsts.TableNamePrefix + "doc", OldName = DbConsts.TableOldNamePrefix + "document")]
|
||||||
|
[Index("idx_{tablename}_01", nameof(ParentId) + "," + nameof(Label) + "," + nameof(TenantId), true)]
|
||||||
|
public partial class DocEntity : EntityTenant
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 父级节点
|
||||||
|
/// </summary>
|
||||||
|
public long ParentId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 名称
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 50)]
|
||||||
|
public string Label { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 类型
|
||||||
|
/// </summary>
|
||||||
|
[Column(MapType = typeof(int), CanUpdate = false)]
|
||||||
|
public DocType Type { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 命名
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 500)]
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 内容
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = -1)]
|
||||||
|
public string Content { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Html
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = -1)]
|
||||||
|
public string Html { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 启用
|
||||||
|
/// </summary>
|
||||||
|
public bool Enabled { get; set; } = true;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 打开组
|
||||||
|
/// </summary>
|
||||||
|
public bool? Opened { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 排序
|
||||||
|
/// </summary>
|
||||||
|
public int? Sort { get; set; } = 0;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 描述
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 100)]
|
||||||
|
public string Description { get; set; }
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
namespace ZhonTai.Admin.Domain.Doc;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 文档类型
|
||||||
|
/// </summary>
|
||||||
|
public enum DocType
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 分组
|
||||||
|
/// </summary>
|
||||||
|
Group = 1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Markdown文档
|
||||||
|
/// </summary>
|
||||||
|
Markdown = 2
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
using ZhonTai.Admin.Core.Repositories;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain.Doc;
|
||||||
|
|
||||||
|
public interface IDocRepository : IRepositoryBase<DocEntity>
|
||||||
|
{
|
||||||
|
}
|
@ -0,0 +1,25 @@
|
|||||||
|
using ZhonTai.Admin.Core.Entities;
|
||||||
|
using FreeSql.DataAnnotations;
|
||||||
|
using ZhonTai.Admin.Domain.Doc;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain.DocImage;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 文档图片
|
||||||
|
/// </summary>
|
||||||
|
[Table(Name = DbConsts.TableNamePrefix + "doc_image", OldName = DbConsts.TableOldNamePrefix + "document_image")]
|
||||||
|
[Index("idx_{tablename}_01", nameof(DocumentId) + "," + nameof(Url), true)]
|
||||||
|
public class DocImageEntity : EntityAdd
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 文档Id
|
||||||
|
/// </summary>
|
||||||
|
public long DocumentId { get; set; }
|
||||||
|
|
||||||
|
public DocEntity Document { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 请求路径
|
||||||
|
/// </summary>
|
||||||
|
public string Url { get; set; }
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
using ZhonTai.Admin.Core.Repositories;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain.DocImage;
|
||||||
|
|
||||||
|
public interface IDocImageRepository : IRepositoryBase<DocImageEntity>
|
||||||
|
{
|
||||||
|
}
|
@ -0,0 +1,91 @@
|
|||||||
|
using FreeSql.DataAnnotations;
|
||||||
|
using ZhonTai.Admin.Core.Attributes;
|
||||||
|
using ZhonTai.Admin.Core.Entities;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Contracts.Domain.Feedback;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 意见反馈实体
|
||||||
|
/// </summary>
|
||||||
|
[Table(Name = DbConsts.NPPTableOldPrefix + "feedback")]
|
||||||
|
public class FeedbackEntity : EntityBase
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 反馈标题
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 200)]
|
||||||
|
public string Title { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 反馈类型
|
||||||
|
/// </summary>
|
||||||
|
public FeedbackTypeEnum FeedbackType { get; set; } = FeedbackTypeEnum.Suggestion;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 被反馈团队
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 100)]
|
||||||
|
public string FeedbackTeam { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 反馈人Id
|
||||||
|
/// </summary>
|
||||||
|
public long FeedbackPersonId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 反馈人姓名
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 50)]
|
||||||
|
public string FeedbackPersonName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 反馈人邮箱
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 100)]
|
||||||
|
public string FeedbackPersonEmail { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 相关知情人
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 500)]
|
||||||
|
public string RelatedPersons { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 建议内容
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = -1)]
|
||||||
|
public string Content { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 附件文件路径
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 1000)]
|
||||||
|
public string AttachmentPaths { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 处理状态:10-待处理,15-处理中,20-已处理,30-已驳回
|
||||||
|
/// </summary>
|
||||||
|
public FeedbackStatusEnum Status { get; set; } = FeedbackStatusEnum.Pending;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 处理人ID
|
||||||
|
/// </summary>
|
||||||
|
public long? ProcessorId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 处理人姓名
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 50)]
|
||||||
|
public string ProcessorName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 处理时间
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? ProcessTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 处理备注
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 500)]
|
||||||
|
public string ProcessRemark { get; set; }
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
namespace ZhonTai.Admin.Contracts.Domain.Feedback;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 反馈状态枚举
|
||||||
|
/// </summary>
|
||||||
|
public enum FeedbackStatusEnum
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 待处理
|
||||||
|
/// </summary>
|
||||||
|
Pending = 10,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 处理中
|
||||||
|
/// </summary>
|
||||||
|
Processing = 15,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 已处理
|
||||||
|
/// </summary>
|
||||||
|
Completed = 20,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 已驳回
|
||||||
|
/// </summary>
|
||||||
|
Rejected = 30
|
||||||
|
}
|
@ -0,0 +1,51 @@
|
|||||||
|
using FreeSql.DataAnnotations;
|
||||||
|
using ZhonTai.Admin.Core.Attributes;
|
||||||
|
using ZhonTai.Admin.Core.Entities;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Contracts.Domain.Feedback;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 反馈团队处理人实体
|
||||||
|
/// </summary>
|
||||||
|
[Table(Name = DbConsts.NPPTableOldPrefix + "feedback_team_processor")]
|
||||||
|
public class FeedbackTeamProcessorEntity : EntityBase
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 团队名称
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 100)]
|
||||||
|
public string TeamName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 站点
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 50)]
|
||||||
|
public string Site { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 处理人ID(模块负责人)
|
||||||
|
/// </summary>
|
||||||
|
public long ProcessorId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 处理人姓名(模块负责人)
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 50)]
|
||||||
|
public string ProcessorName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 处理人邮箱
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 100)]
|
||||||
|
public string ProcessorEmail { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否启用
|
||||||
|
/// </summary>
|
||||||
|
public bool Enabled { get; set; } = true;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 排序
|
||||||
|
/// </summary>
|
||||||
|
public int Sort { get; set; } = 0;
|
||||||
|
}
|
@ -0,0 +1,34 @@
|
|||||||
|
namespace ZhonTai.Admin.Contracts.Domain.Feedback;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 反馈类型枚举
|
||||||
|
/// </summary>
|
||||||
|
public enum FeedbackTypeEnum
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Bug
|
||||||
|
/// </summary>
|
||||||
|
Bug = 1,
|
||||||
|
/// <summary>
|
||||||
|
/// 建议
|
||||||
|
/// </summary>
|
||||||
|
Suggestion = 2,
|
||||||
|
/// <summary>
|
||||||
|
/// 投诉
|
||||||
|
/// </summary>
|
||||||
|
Complaint = 3,
|
||||||
|
/// <summary>
|
||||||
|
/// 需求
|
||||||
|
/// </summary>
|
||||||
|
Requirement = 4,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 咨询
|
||||||
|
/// </summary>
|
||||||
|
Consultation= 5,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 其他
|
||||||
|
/// </summary>
|
||||||
|
Other = 6
|
||||||
|
}
|
@ -0,0 +1,78 @@
|
|||||||
|
using FreeSql.DataAnnotations;
|
||||||
|
using ZhonTai.Admin.Core.Entities;
|
||||||
|
using ZhonTai.Admin.Core.Attributes;
|
||||||
|
using OnceMi.AspNetCore.OSS;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 文件
|
||||||
|
/// </summary>
|
||||||
|
[Table(Name = DbConsts.TableNamePrefix + "file", OldName = DbConsts.TableOldNamePrefix + "file")]
|
||||||
|
public partial class FileEntity : EntityBase
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// OSS供应商
|
||||||
|
/// </summary>
|
||||||
|
[Column(MapType = typeof(string), StringLength = 50)]
|
||||||
|
public OSSProvider? Provider { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 存储桶名称
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 200)]
|
||||||
|
public string BucketName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 文件目录
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 500)]
|
||||||
|
public string FileDirectory { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 文件Guid
|
||||||
|
/// </summary>
|
||||||
|
[OrderGuid]
|
||||||
|
public Guid FileGuid { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 保存文件名
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 200)]
|
||||||
|
public string SaveFileName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 文件名
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 200)]
|
||||||
|
public string FileName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 文件扩展名
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 20)]
|
||||||
|
public string Extension { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 文件字节长度
|
||||||
|
/// </summary>
|
||||||
|
public long Size { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 文件大小格式化
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 50)]
|
||||||
|
public string SizeFormat { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 链接地址
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 500)]
|
||||||
|
public string LinkUrl { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// md5码,防止上传重复文件
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 50)]
|
||||||
|
public string Md5 { get; set; } = string.Empty;
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
using ZhonTai.Admin.Core.Repositories;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain;
|
||||||
|
|
||||||
|
public interface IFileRepository : IRepositoryBase<FileEntity>
|
||||||
|
{
|
||||||
|
}
|
@ -0,0 +1,92 @@
|
|||||||
|
using ZhonTai.Admin.Core.Entities;
|
||||||
|
using FreeSql.DataAnnotations;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 日志
|
||||||
|
/// </summary>
|
||||||
|
public abstract class LogAbstract : EntityAdd, ITenant
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 租户Id
|
||||||
|
/// </summary>
|
||||||
|
[Column(Position = 2, CanUpdate = false)]
|
||||||
|
public long? TenantId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 姓名
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 60)]
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// IP
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 100)]
|
||||||
|
public string IP { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 国家
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 100)]
|
||||||
|
public string Country { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 省份
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 100)]
|
||||||
|
public string Province { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 城市
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 100)]
|
||||||
|
public string City { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 网络服务商
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 100)]
|
||||||
|
public string Isp { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 浏览器
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 100)]
|
||||||
|
public string Browser { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 操作系统
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 100)]
|
||||||
|
public string Os { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 设备
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 50)]
|
||||||
|
public string Device { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 浏览器信息
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = -1)]
|
||||||
|
public string BrowserInfo { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 耗时(毫秒)
|
||||||
|
/// </summary>
|
||||||
|
public long ElapsedMilliseconds { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 操作状态
|
||||||
|
/// </summary>
|
||||||
|
public bool Status { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 操作消息
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = -1)]
|
||||||
|
public string Msg { get; set; }
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
using ZhonTai.Admin.Core.Repositories;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain.LoginLog;
|
||||||
|
|
||||||
|
public interface ILoginLogRepository : IRepositoryBase<LoginLogEntity>
|
||||||
|
{
|
||||||
|
}
|
@ -0,0 +1,11 @@
|
|||||||
|
using FreeSql.DataAnnotations;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain.LoginLog;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 登录日志
|
||||||
|
/// </summary>
|
||||||
|
[Table(Name = DbConsts.TableNamePrefix + "login_log", OldName = DbConsts.TableOldNamePrefix + "login_log")]
|
||||||
|
public partial class LoginLogEntity : LogAbstract
|
||||||
|
{
|
||||||
|
}
|
@ -0,0 +1,52 @@
|
|||||||
|
using FreeSql.DataAnnotations;
|
||||||
|
using ZhonTai.Admin.Core.Attributes;
|
||||||
|
using ZhonTai.Admin.Core.Entities;
|
||||||
|
using ZhonTai.Admin.Domain.MsgType;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain.Msg;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 消息
|
||||||
|
/// </summary>
|
||||||
|
[Table(Name = DbConsts.TableNamePrefix + "msg")]
|
||||||
|
public partial class MsgEntity : EntityBase
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 标题
|
||||||
|
/// </summary>
|
||||||
|
public string Title { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 内容
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = -1)]
|
||||||
|
public string Content { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 类型Id
|
||||||
|
/// </summary>
|
||||||
|
public long TypeId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 定时发布时间
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? PublishTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 类型
|
||||||
|
/// </summary>
|
||||||
|
[NotGen]
|
||||||
|
[Navigate(nameof(TypeId))]
|
||||||
|
public MsgTypeEntity Type { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 类型名称
|
||||||
|
/// </summary>
|
||||||
|
public string TypeName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 消息状态
|
||||||
|
/// </summary>
|
||||||
|
public MsgStatusEnum Status { get; set; }
|
||||||
|
}
|
@ -0,0 +1,32 @@
|
|||||||
|
namespace ZhonTai.Admin.Domain.Msg;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 消息状态
|
||||||
|
/// </summary>
|
||||||
|
public enum MsgStatusEnum
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 草稿
|
||||||
|
/// </summary>
|
||||||
|
Draft = 1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 已发布
|
||||||
|
/// </summary>
|
||||||
|
Published = 2,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 定时发布
|
||||||
|
/// </summary>
|
||||||
|
Scheduled = 3,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 已撤销
|
||||||
|
/// </summary>
|
||||||
|
Revoked = 4,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 已归档
|
||||||
|
/// </summary>
|
||||||
|
Archived = 5,
|
||||||
|
}
|
@ -0,0 +1,58 @@
|
|||||||
|
using FreeSql.DataAnnotations;
|
||||||
|
using ZhonTai.Admin.Core.Attributes;
|
||||||
|
using ZhonTai.Admin.Core.Entities;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain.Msg;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 消息用户
|
||||||
|
/// </summary>
|
||||||
|
[Table(Name = DbConsts.TableNamePrefix + "msg_user")]
|
||||||
|
public partial class MsgUserEntity : EntityBase
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 消息Id
|
||||||
|
/// </summary>
|
||||||
|
public long MsgId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 消息
|
||||||
|
/// </summary>
|
||||||
|
[NotGen]
|
||||||
|
[Navigate(nameof(MsgId))]
|
||||||
|
public MsgEntity Msg { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 用户Id
|
||||||
|
/// </summary>
|
||||||
|
public long UserId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 用户
|
||||||
|
/// </summary>
|
||||||
|
[NotGen]
|
||||||
|
[Navigate(nameof(UserId))]
|
||||||
|
public MsgUserEntity User { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否已读
|
||||||
|
/// </summary>
|
||||||
|
public bool IsRead { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 已读时间
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? ReadTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否重要
|
||||||
|
/// </summary>
|
||||||
|
public bool IsImportant { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 邮件是否已发送
|
||||||
|
/// </summary>
|
||||||
|
public bool IsSendEmail { get; set; }
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,45 @@
|
|||||||
|
using ZhonTai.Admin.Core.Entities;
|
||||||
|
using FreeSql.DataAnnotations;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain.MsgType;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 消息分类
|
||||||
|
/// </summary>
|
||||||
|
[Table(Name = DbConsts.TableNamePrefix + "msg_type")]
|
||||||
|
[Index("idx_{tablename}_01", $"{nameof(ParentId)},{nameof(Name)}", true)]
|
||||||
|
public partial class MsgTypeEntity : EntityBase
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 父级Id
|
||||||
|
/// </summary>
|
||||||
|
public long ParentId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 子级列表
|
||||||
|
/// </summary>
|
||||||
|
[Navigate(nameof(ParentId))]
|
||||||
|
public List<MsgTypeEntity> Childs { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 名称
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 50)]
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 编码
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 50)]
|
||||||
|
public string Code { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 启用
|
||||||
|
/// </summary>
|
||||||
|
public bool Enabled { get; set; } = true;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 排序
|
||||||
|
/// </summary>
|
||||||
|
public int Sort { get; set; }
|
||||||
|
}
|
@ -0,0 +1,57 @@
|
|||||||
|
using ZhonTai.Admin.Core.Entities;
|
||||||
|
using FreeSql.DataAnnotations;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain.OnlineApp;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 在线应用
|
||||||
|
/// </summary>
|
||||||
|
[Table(Name = DbConsts.NPPTableOldPrefix + "online_app")]
|
||||||
|
[Index("idx_{tablename}_01", $"{nameof(WebsiteName)}", true)]
|
||||||
|
public partial class OnlineAppEntity : EntityBase
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 网站名称
|
||||||
|
/// </summary>
|
||||||
|
public string WebsiteName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 一级标题
|
||||||
|
/// </summary>
|
||||||
|
public string PrimaryTitle { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 二级标题
|
||||||
|
/// </summary>
|
||||||
|
public string SecondaryTitle { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 联系人
|
||||||
|
/// </summary>
|
||||||
|
public string ContactPerson { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统操作教程链接
|
||||||
|
/// </summary>
|
||||||
|
public string TutorialUrl { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 适用site
|
||||||
|
/// </summary>
|
||||||
|
public string ApplicableSite { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 功能简介
|
||||||
|
/// </summary>
|
||||||
|
public string FunctionIntro { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 关键词
|
||||||
|
/// </summary>
|
||||||
|
public string Keywords { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 网址
|
||||||
|
/// </summary>
|
||||||
|
public string WebsiteUrl { get; set; }
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
using ZhonTai.Admin.Core.Repositories;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain.OperationLog;
|
||||||
|
|
||||||
|
public interface IOperationLogRepository : IRepositoryBase<OperationLogEntity>
|
||||||
|
{
|
||||||
|
}
|
@ -0,0 +1,46 @@
|
|||||||
|
using FreeSql.DataAnnotations;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain.OperationLog;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 操作日志
|
||||||
|
/// </summary>
|
||||||
|
[Table(Name = DbConsts.TableNamePrefix + "operation_log", OldName = DbConsts.TableOldNamePrefix + "operation_log")]
|
||||||
|
[Index("idx_{tablename}_01", $"{nameof(ApiPath)},{nameof(CreatedTime)}", false)]
|
||||||
|
public partial class OperationLogEntity : LogAbstract
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 接口名称
|
||||||
|
/// </summary>
|
||||||
|
[Column(Position = 2, StringLength = 50)]
|
||||||
|
public string ApiLabel { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 接口地址
|
||||||
|
/// </summary>
|
||||||
|
[Column(Position = 3, StringLength = 500)]
|
||||||
|
public string ApiPath { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 接口方法
|
||||||
|
/// </summary>
|
||||||
|
[Column(Position = 4, StringLength = 50)]
|
||||||
|
public string ApiMethod { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 请求参数
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = -1)]
|
||||||
|
public string Params { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 状态码
|
||||||
|
/// </summary>
|
||||||
|
public int? StatusCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 响应结果
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = -1)]
|
||||||
|
public string Result { get; set; }
|
||||||
|
}
|
@ -0,0 +1,13 @@
|
|||||||
|
using ZhonTai.Admin.Core.Repositories;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain.Org;
|
||||||
|
|
||||||
|
public interface IOrgRepository : IRepositoryBase<OrgEntity>
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获得本部门和下级部门Id
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<List<long>> GetChildIdListAsync(long id);
|
||||||
|
}
|
@ -0,0 +1,88 @@
|
|||||||
|
using ZhonTai.Admin.Core.Entities;
|
||||||
|
using FreeSql.DataAnnotations;
|
||||||
|
using ZhonTai.Admin.Domain.UserStaff;
|
||||||
|
using ZhonTai.Admin.Domain.User;
|
||||||
|
using ZhonTai.Admin.Domain.Role;
|
||||||
|
using ZhonTai.Admin.Domain.UserOrg;
|
||||||
|
using ZhonTai.Admin.Core.Attributes;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain.Org;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 组织架构
|
||||||
|
/// </summary>
|
||||||
|
[Table(Name = DbConsts.TableNamePrefix + "org", OldName = DbConsts.TableOldNamePrefix + "org")]
|
||||||
|
[Index("idx_{tablename}_01", nameof(ParentId) + "," + nameof(Name) + "," + nameof(TenantId), true)]
|
||||||
|
public partial class OrgEntity : EntityTenant, IChilds<OrgEntity>
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 父级
|
||||||
|
/// </summary>
|
||||||
|
public long ParentId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 名称
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 50)]
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 编码
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 50)]
|
||||||
|
public string Code { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 值
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 50)]
|
||||||
|
public string Value { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 成员数
|
||||||
|
/// </summary>
|
||||||
|
public int MemberCount { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 启用
|
||||||
|
/// </summary>
|
||||||
|
public bool Enabled { get; set; } = true;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 排序
|
||||||
|
/// </summary>
|
||||||
|
public int Sort { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 描述
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 500)]
|
||||||
|
public string Description { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 员工列表
|
||||||
|
/// </summary>
|
||||||
|
[NotGen]
|
||||||
|
[Navigate(ManyToMany = typeof(UserOrgEntity))]
|
||||||
|
public ICollection<UserStaffEntity> Staffs { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 用户列表
|
||||||
|
/// </summary>
|
||||||
|
[NotGen]
|
||||||
|
[Navigate(ManyToMany = typeof(UserOrgEntity))]
|
||||||
|
public ICollection<UserEntity> Users { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 角色列表
|
||||||
|
/// </summary>
|
||||||
|
[NotGen]
|
||||||
|
[Navigate(ManyToMany = typeof(RoleOrgEntity))]
|
||||||
|
public ICollection<RoleEntity> Roles { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 子级列表
|
||||||
|
/// </summary>
|
||||||
|
[Navigate(nameof(ParentId))]
|
||||||
|
public List<OrgEntity> Childs { get; set; }
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
using ZhonTai.Admin.Core.Repositories;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain.Permission;
|
||||||
|
|
||||||
|
public interface IPermissionRepository : IRepositoryBase<PermissionEntity>
|
||||||
|
{
|
||||||
|
}
|
@ -0,0 +1,149 @@
|
|||||||
|
using ZhonTai.Admin.Core.Entities;
|
||||||
|
using FreeSql.DataAnnotations;
|
||||||
|
using ZhonTai.Admin.Domain.Api;
|
||||||
|
using ZhonTai.Admin.Domain.View;
|
||||||
|
using ZhonTai.Admin.Domain.PermissionApi;
|
||||||
|
using ZhonTai.Admin.Core.Attributes;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain.Permission;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 权限
|
||||||
|
/// </summary>
|
||||||
|
[Table(Name = DbConsts.TableNamePrefix + "permission", OldName = DbConsts.TableOldNamePrefix + "permission")]
|
||||||
|
[Index("idx_{tablename}_01", nameof(Platform) + "," + nameof(ParentId) + "," + nameof(Label), true)]
|
||||||
|
public partial class PermissionEntity : EntityBase, IChilds<PermissionEntity>
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 平台
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 20)]
|
||||||
|
public string Platform { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 父级节点
|
||||||
|
/// </summary>
|
||||||
|
public long ParentId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 权限名称
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 50)]
|
||||||
|
public string Label { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 权限编码
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 500)]
|
||||||
|
public string Code { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 权限类型
|
||||||
|
/// </summary>
|
||||||
|
[Column(MapType = typeof(int), CanUpdate = false)]
|
||||||
|
public PermissionType Type { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 视图Id
|
||||||
|
/// </summary>
|
||||||
|
public long? ViewId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 视图
|
||||||
|
/// </summary>
|
||||||
|
[NotGen]
|
||||||
|
public ViewEntity View { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 路由命名
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 100)]
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 路由地址
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 500)]
|
||||||
|
public string Path { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重定向地址
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 500)]
|
||||||
|
public string Redirect { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 图标
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 100)]
|
||||||
|
public string Icon { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 隐藏
|
||||||
|
/// </summary>
|
||||||
|
public bool Hidden { get; set; } = false;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 展开分组
|
||||||
|
/// </summary>
|
||||||
|
public bool Opened { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 打开新窗口
|
||||||
|
/// </summary>
|
||||||
|
public bool NewWindow { get; set; } = false;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 链接外显
|
||||||
|
/// </summary>
|
||||||
|
public bool External { get; set; } = false;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否缓存
|
||||||
|
/// </summary>
|
||||||
|
public bool IsKeepAlive { get; set; } = true;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否固定
|
||||||
|
/// </summary>
|
||||||
|
public bool IsAffix { get; set; } = false;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 链接地址
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 500)]
|
||||||
|
public string Link { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否内嵌窗口
|
||||||
|
/// </summary>
|
||||||
|
public bool IsIframe { get; set; } = false;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否系统权限
|
||||||
|
/// </summary>
|
||||||
|
public bool IsSystem { get; set; } = false;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 排序
|
||||||
|
/// </summary>
|
||||||
|
public int Sort { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 描述
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 200)]
|
||||||
|
public string Description { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 启用
|
||||||
|
/// </summary>
|
||||||
|
public bool Enabled { get; set; } = true;
|
||||||
|
|
||||||
|
[NotGen]
|
||||||
|
[Navigate(ManyToMany = typeof(PermissionApiEntity))]
|
||||||
|
public ICollection<ApiEntity> Apis { get; set; }
|
||||||
|
|
||||||
|
[Navigate(nameof(ParentId))]
|
||||||
|
public List<PermissionEntity> Childs { get; set; }
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
namespace ZhonTai.Admin.Domain.Permission;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 权限类型
|
||||||
|
/// </summary>
|
||||||
|
public enum PermissionType
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 分组
|
||||||
|
/// </summary>
|
||||||
|
Group = 1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 菜单
|
||||||
|
/// </summary>
|
||||||
|
Menu = 2,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 权限点
|
||||||
|
/// </summary>
|
||||||
|
Dot = 3
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
using ZhonTai.Admin.Core.Repositories;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain.PermissionApi;
|
||||||
|
|
||||||
|
public interface IPermissionApiRepository : IRepositoryBase<PermissionApiEntity>
|
||||||
|
{
|
||||||
|
}
|
@ -0,0 +1,39 @@
|
|||||||
|
using ZhonTai.Admin.Core.Entities;
|
||||||
|
using FreeSql.DataAnnotations;
|
||||||
|
using ZhonTai.Admin.Domain.Permission;
|
||||||
|
using ZhonTai.Admin.Domain.Api;
|
||||||
|
using ZhonTai.Admin.Core.Attributes;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain.PermissionApi;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 权限接口
|
||||||
|
/// </summary>
|
||||||
|
[Table(Name = DbConsts.TableNamePrefix + "permission_api", OldName = DbConsts.TableOldNamePrefix + "permission_api")]
|
||||||
|
[Index("idx_{tablename}_01", nameof(PermissionId) + "," + nameof(ApiId), true)]
|
||||||
|
public class PermissionApiEntity : EntityAdd
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 权限Id
|
||||||
|
/// </summary>
|
||||||
|
[Column(IsPrimary = true)]
|
||||||
|
public long PermissionId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 权限
|
||||||
|
/// </summary>
|
||||||
|
[NotGen]
|
||||||
|
public PermissionEntity Permission { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 接口Id
|
||||||
|
/// </summary>
|
||||||
|
[Column(IsPrimary = true)]
|
||||||
|
public long ApiId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 接口
|
||||||
|
/// </summary>
|
||||||
|
[NotGen]
|
||||||
|
public ApiEntity Api { get; set; }
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
using ZhonTai.Admin.Core.Repositories;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain.Pkg;
|
||||||
|
|
||||||
|
public interface IPkgRepository : IRepositoryBase<PkgEntity>
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获得本套餐和下级套餐Id
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<List<long>> GetChildIdListAsync(long id);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获得当前套餐和下级套餐Id
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="ids"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<List<long>> GetChildIdListAsync(long[] ids);
|
||||||
|
}
|
@ -0,0 +1,67 @@
|
|||||||
|
using ZhonTai.Admin.Core.Entities;
|
||||||
|
using FreeSql.DataAnnotations;
|
||||||
|
using ZhonTai.Admin.Domain.Permission;
|
||||||
|
using ZhonTai.Admin.Domain.Tenant;
|
||||||
|
using ZhonTai.Admin.Domain.TenantPkg;
|
||||||
|
using ZhonTai.Admin.Domain.PkgPermission;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain.Pkg;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 套餐
|
||||||
|
/// </summary>
|
||||||
|
[Table(Name = DbConsts.TableNamePrefix + "pkg", OldName = DbConsts.TableOldNamePrefix + "pkg")]
|
||||||
|
[Index("idx_{tablename}_01", $"{nameof(ParentId)},{nameof(Name)}", true)]
|
||||||
|
public partial class PkgEntity : EntityBase
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 父级Id
|
||||||
|
/// </summary>
|
||||||
|
public long ParentId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 子级列表
|
||||||
|
/// </summary>
|
||||||
|
[Navigate(nameof(ParentId))]
|
||||||
|
public List<PkgEntity> Childs { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 名称
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 50)]
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 编码
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 50)]
|
||||||
|
public string Code { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 说明
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 200)]
|
||||||
|
public string Description { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 启用
|
||||||
|
/// </summary>
|
||||||
|
public bool Enabled { get; set; } = true;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 排序
|
||||||
|
/// </summary>
|
||||||
|
public int Sort { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 租户列表
|
||||||
|
/// </summary>
|
||||||
|
[Navigate(ManyToMany = typeof(TenantPkgEntity))]
|
||||||
|
public ICollection<TenantEntity> Tenants { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 权限列表
|
||||||
|
/// </summary>
|
||||||
|
[Navigate(ManyToMany = typeof(PkgPermissionEntity))]
|
||||||
|
public ICollection<PermissionEntity> Permissions { get; set; }
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
using ZhonTai.Admin.Core.Repositories;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain.PkgPermission;
|
||||||
|
|
||||||
|
public interface IPkgPermissionRepository : IRepositoryBase<PkgPermissionEntity>
|
||||||
|
{
|
||||||
|
}
|
@ -0,0 +1,41 @@
|
|||||||
|
using ZhonTai.Admin.Core.Entities;
|
||||||
|
using FreeSql.DataAnnotations;
|
||||||
|
using ZhonTai.Admin.Domain.Permission;
|
||||||
|
using ZhonTai.Admin.Domain.Pkg;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain.PkgPermission;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 套餐权限
|
||||||
|
/// </summary>
|
||||||
|
[Table(Name = DbConsts.TableNamePrefix + "pkg_permission", OldName = DbConsts.TableOldNamePrefix + "pkg_permission")]
|
||||||
|
[Index("idx_{tablename}_01", nameof(Platform) + "," + nameof(PkgId) + "," + nameof(PermissionId), true)]
|
||||||
|
public class PkgPermissionEntity : EntityAdd
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 平台
|
||||||
|
/// </summary>
|
||||||
|
public string Platform { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 套餐Id
|
||||||
|
/// </summary>
|
||||||
|
[Column(IsPrimary = true)]
|
||||||
|
public long PkgId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 套餐
|
||||||
|
/// </summary>
|
||||||
|
public PkgEntity Pkg { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 权限Id
|
||||||
|
/// </summary>
|
||||||
|
[Column(IsPrimary = true)]
|
||||||
|
public long PermissionId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 权限
|
||||||
|
/// </summary>
|
||||||
|
public PermissionEntity Permission { get; set; }
|
||||||
|
}
|
@ -0,0 +1,64 @@
|
|||||||
|
using FreeSql.DataAnnotations;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
using ZhonTai.Admin.Core.Entities;
|
||||||
|
namespace ZhonTai.Admin.Domain.PrintTemplate;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 打印模板
|
||||||
|
/// </summary>
|
||||||
|
[Table(Name = DbConsts.TableNamePrefix + "print_template")]
|
||||||
|
[Index("idx_{tablename}_01", $"{nameof(TenantId)},{nameof(Name)}", true)]
|
||||||
|
[Index("idx_{tablename}_01", $"{nameof(TenantId)},{nameof(Code)}", true)]
|
||||||
|
public partial class PrintTemplateEntity : EntityVersion, ITenant
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 租户Id
|
||||||
|
/// </summary>
|
||||||
|
[Description("租户Id")]
|
||||||
|
[Column(Position = 2, CanUpdate = false)]
|
||||||
|
[JsonProperty(Order = -20)]
|
||||||
|
[JsonPropertyOrder(-20)]
|
||||||
|
public virtual long? TenantId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 名称
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 50)]
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 编码
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 50)]
|
||||||
|
public string Code { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 模板
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = -1)]
|
||||||
|
public string Template { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 打印数据
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = -1)]
|
||||||
|
public string PrintData { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 说明
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 200)]
|
||||||
|
public string Description { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 启用
|
||||||
|
/// </summary>
|
||||||
|
public bool Enabled { get; set; } = true;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 排序
|
||||||
|
/// </summary>
|
||||||
|
public int Sort { get; set; }
|
||||||
|
}
|
@ -0,0 +1,100 @@
|
|||||||
|
using ZhonTai.Admin.Core.Entities;
|
||||||
|
using FreeSql.DataAnnotations;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain.Region;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 地区
|
||||||
|
/// </summary>
|
||||||
|
[Table(Name = DbConsts.TableNamePrefix + "region")]
|
||||||
|
[Index("idx_{tablename}_01", nameof(ParentId) + "," + nameof(Name), true)]
|
||||||
|
[Index("idx_{tablename}_02", nameof(ParentId) + "," + nameof(Code), true)]
|
||||||
|
public partial class RegionEntity : EntityBase, IChilds<RegionEntity>
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 上级Id
|
||||||
|
/// </summary>
|
||||||
|
public long ParentId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 名称
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 100)]
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 简称
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 100)]
|
||||||
|
public string ShortName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 级别
|
||||||
|
/// </summary>
|
||||||
|
[Column(MapType = typeof(int))]
|
||||||
|
public RegionLevel Level { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 代码
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 20)]
|
||||||
|
public string Code { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 拼音
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 200)]
|
||||||
|
public string Pinyin { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 拼音首字母
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 20)]
|
||||||
|
public string PinyinFirst { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 行政中心/政府驻地
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 100)]
|
||||||
|
public string Capital { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 人口(单位:万人)
|
||||||
|
/// </summary>
|
||||||
|
public int? Population { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 面积(单位:平方千米)
|
||||||
|
/// </summary>
|
||||||
|
public int? Area { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 区号
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 20)]
|
||||||
|
public string AreaCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 邮编
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 20)]
|
||||||
|
public string ZipCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 排序
|
||||||
|
/// </summary>
|
||||||
|
public int? Sort { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 热门
|
||||||
|
/// </summary>
|
||||||
|
public bool Hot { get; set; } = false;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 启用
|
||||||
|
/// </summary>
|
||||||
|
public bool Enabled { get; set; } = true;
|
||||||
|
|
||||||
|
[Navigate(nameof(ParentId))]
|
||||||
|
public List<RegionEntity> Childs { get; set; }
|
||||||
|
}
|
@ -0,0 +1,36 @@
|
|||||||
|
using System.ComponentModel;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain.Region;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 地区级别
|
||||||
|
/// </summary>
|
||||||
|
public enum RegionLevel
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 省份
|
||||||
|
/// </summary>
|
||||||
|
Province = 1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 城市
|
||||||
|
/// </summary>
|
||||||
|
City = 2,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 县/区
|
||||||
|
/// </summary>
|
||||||
|
County = 3,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 镇/乡/街道
|
||||||
|
/// </summary>
|
||||||
|
[Description("镇/乡")]
|
||||||
|
Town = 4,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 村/村委会/社区/居委会
|
||||||
|
/// </summary>
|
||||||
|
[Description("村/社区")]
|
||||||
|
Vilage = 5
|
||||||
|
}
|
@ -0,0 +1,41 @@
|
|||||||
|
using FreeSql.DataAnnotations;
|
||||||
|
using ZhonTai.Admin.Core.Entities;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain.RemoteApp;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 远程应用
|
||||||
|
/// </summary>
|
||||||
|
[Table(Name = DbConsts.NPPTableOldPrefix + "remote_app")]
|
||||||
|
[Index("idx_{tablename}_01", $"{nameof(Name)}", true)]
|
||||||
|
|
||||||
|
public class RemoteAppEntity : EntityBase
|
||||||
|
{
|
||||||
|
|
||||||
|
public string ImgUrl { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 所属site
|
||||||
|
/// </summary>
|
||||||
|
public string Site { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 名称
|
||||||
|
/// </summary>
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// IP地址
|
||||||
|
/// </summary>
|
||||||
|
public string IpAddress { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 域
|
||||||
|
/// </summary>
|
||||||
|
public string Domain { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 用户名
|
||||||
|
/// </summary>
|
||||||
|
public string Username { get; set; }
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
using ZhonTai.Admin.Core.Repositories;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain.Role;
|
||||||
|
|
||||||
|
public interface IRoleRepository : IRepositoryBase<RoleEntity>
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获得本角色和下级角色Id
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<List<long>> GetChildIdListAsync(long id);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获得当前角色和下级角色Id
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="ids"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<List<long>> GetChildIdListAsync(long[] ids);
|
||||||
|
}
|
@ -0,0 +1,90 @@
|
|||||||
|
using FreeSql.DataAnnotations;
|
||||||
|
using ZhonTai.Admin.Core.Entities;
|
||||||
|
using ZhonTai.Admin.Domain.Permission;
|
||||||
|
using ZhonTai.Admin.Domain.User;
|
||||||
|
using ZhonTai.Admin.Domain.UserRole;
|
||||||
|
using ZhonTai.Admin.Domain.RolePermission;
|
||||||
|
using ZhonTai.Admin.Domain.Org;
|
||||||
|
using ZhonTai.Admin.Core.Attributes;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain.Role;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 角色
|
||||||
|
/// </summary>
|
||||||
|
[Table(Name = DbConsts.TableNamePrefix + "role", OldName = DbConsts.TableOldNamePrefix + "role")]
|
||||||
|
[Index("idx_{tablename}_01", $"{nameof(TenantId)},{nameof(ParentId)},{nameof(Name)}", true)]
|
||||||
|
public partial class RoleEntity : EntityTenant
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 父级Id
|
||||||
|
/// </summary>
|
||||||
|
public long ParentId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 子级列表
|
||||||
|
/// </summary>
|
||||||
|
[Navigate(nameof(ParentId))]
|
||||||
|
public List<RoleEntity> Childs { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 名称
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 50)]
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 编码
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 50)]
|
||||||
|
public string Code { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 角色类型
|
||||||
|
/// </summary>
|
||||||
|
[Column(MapType = typeof(int), CanUpdate = false)]
|
||||||
|
public RoleType Type { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 数据范围
|
||||||
|
/// </summary>
|
||||||
|
[Column(MapType = typeof(int))]
|
||||||
|
public DataScope DataScope { get; set; } = DataScope.All;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 说明
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 200)]
|
||||||
|
public string Description { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 隐藏
|
||||||
|
/// </summary>
|
||||||
|
public bool Hidden { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 排序
|
||||||
|
/// </summary>
|
||||||
|
public int Sort { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 用户列表
|
||||||
|
/// </summary>
|
||||||
|
[NotGen]
|
||||||
|
[Navigate(ManyToMany = typeof(UserRoleEntity))]
|
||||||
|
public ICollection<UserEntity> Users { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 部门列表
|
||||||
|
/// </summary>
|
||||||
|
[NotGen]
|
||||||
|
[Navigate(ManyToMany = typeof(RoleOrgEntity))]
|
||||||
|
public ICollection<OrgEntity> Orgs { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 权限列表
|
||||||
|
/// </summary>
|
||||||
|
[NotGen]
|
||||||
|
[Navigate(ManyToMany = typeof(RolePermissionEntity))]
|
||||||
|
public ICollection<PermissionEntity> Permissions { get; set; }
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
namespace ZhonTai.Admin.Domain.Role;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 角色类型
|
||||||
|
/// </summary>
|
||||||
|
public enum RoleType
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 分组
|
||||||
|
/// </summary>
|
||||||
|
Group = 1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 角色
|
||||||
|
/// </summary>
|
||||||
|
Role = 2
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
using ZhonTai.Admin.Core.Repositories;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain.RoleOrg;
|
||||||
|
|
||||||
|
public interface IRoleOrgRepository : IRepositoryBase<RoleOrgEntity>
|
||||||
|
{
|
||||||
|
}
|
@ -0,0 +1,36 @@
|
|||||||
|
using FreeSql.DataAnnotations;
|
||||||
|
using ZhonTai.Admin.Core.Entities;
|
||||||
|
using ZhonTai.Admin.Domain.Org;
|
||||||
|
using ZhonTai.Admin.Domain.Role;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 角色部门
|
||||||
|
/// </summary>
|
||||||
|
[Table(Name = DbConsts.TableNamePrefix + "role_org", OldName = DbConsts.TableOldNamePrefix + "role_org")]
|
||||||
|
[Index("idx_{tablename}_01", nameof(RoleId) + "," + nameof(OrgId), true)]
|
||||||
|
public partial class RoleOrgEntity : EntityAdd
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 角色Id
|
||||||
|
/// </summary>
|
||||||
|
[Column(IsPrimary = true)]
|
||||||
|
public long RoleId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 角色
|
||||||
|
/// </summary>
|
||||||
|
public RoleEntity Role { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 部门Id
|
||||||
|
/// </summary>
|
||||||
|
[Column(IsPrimary = true)]
|
||||||
|
public long OrgId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 部门
|
||||||
|
/// </summary>
|
||||||
|
public OrgEntity Org { get; set; }
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
using ZhonTai.Admin.Core.Repositories;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain.RolePermission;
|
||||||
|
|
||||||
|
public interface IRolePermissionRepository : IRepositoryBase<RolePermissionEntity>
|
||||||
|
{
|
||||||
|
}
|
@ -0,0 +1,44 @@
|
|||||||
|
using FreeSql.DataAnnotations;
|
||||||
|
using ZhonTai.Admin.Core.Entities;
|
||||||
|
using ZhonTai.Admin.Domain.Role;
|
||||||
|
using ZhonTai.Admin.Domain.Permission;
|
||||||
|
using ZhonTai.Admin.Core.Attributes;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain.RolePermission;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 角色权限
|
||||||
|
/// </summary>
|
||||||
|
[Table(Name = DbConsts.TableNamePrefix + "role_permission", OldName = DbConsts.TableOldNamePrefix + "role_permission")]
|
||||||
|
[Index("idx_{tablename}_01", nameof(Platform) + "," + nameof(RoleId) + "," + nameof(PermissionId), true)]
|
||||||
|
public class RolePermissionEntity : EntityAdd
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 平台
|
||||||
|
/// </summary>
|
||||||
|
public string Platform { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 角色Id
|
||||||
|
/// </summary>
|
||||||
|
[Column(IsPrimary = true)]
|
||||||
|
public long RoleId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 权限Id
|
||||||
|
/// </summary>
|
||||||
|
public long PermissionId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 角色
|
||||||
|
/// </summary>
|
||||||
|
[NotGen]
|
||||||
|
[Column(IsPrimary = true)]
|
||||||
|
public RoleEntity Role { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 权限
|
||||||
|
/// </summary>
|
||||||
|
[NotGen]
|
||||||
|
public PermissionEntity Permission { get; set; }
|
||||||
|
}
|
@ -0,0 +1,28 @@
|
|||||||
|
using FreeSql.DataAnnotations;
|
||||||
|
using ZhonTai.Admin.Core.Entities;
|
||||||
|
namespace ZhonTai.Admin.Domain.SearchTemplate;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查询模板
|
||||||
|
/// </summary>
|
||||||
|
[Table(Name = DbConsts.TableNamePrefix + "search_template")]
|
||||||
|
[Index("idx_{tablename}_01", $"{nameof(CreatedUserId)},{nameof(ModuleId)},{nameof(Name)}", true)]
|
||||||
|
public partial class SearchTemplateEntity : EntityVersion
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 模块Id
|
||||||
|
/// </summary>
|
||||||
|
public long ModuleId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 名称
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 50)]
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 模板
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = -1)]
|
||||||
|
public string Template { get; set; }
|
||||||
|
}
|
@ -0,0 +1 @@
|
|||||||
|
|
@ -0,0 +1,70 @@
|
|||||||
|
using ZhonTai.Admin.Core.Entities;
|
||||||
|
using FreeSql.DataAnnotations;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Contracts.Domain.TemplateCenter;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 模板中心实体
|
||||||
|
/// </summary>
|
||||||
|
[Table(Name = "npp_template_center")]
|
||||||
|
[Index("idx_{tablename}_01", nameof(Name) + "," + nameof(ParentId), false)]
|
||||||
|
public class TemplateCenterEntity : EntityBase
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 父级ID
|
||||||
|
/// </summary>
|
||||||
|
public long ParentId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 模板名称
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 100)]
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 联系人
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 50)]
|
||||||
|
public string ContactPerson { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 类型:1-文件夹,2-文件
|
||||||
|
/// </summary>
|
||||||
|
public int Type { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 功能简介
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 500)]
|
||||||
|
public string FunctionIntro { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 关键词
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 200)]
|
||||||
|
public string Keywords { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 网址
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 500)]
|
||||||
|
public string Site { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 文件路径
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 500)]
|
||||||
|
public string FilePath { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 文件关键词
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 200)]
|
||||||
|
public string FileKeword { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 文件URL
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 500)]
|
||||||
|
public string FileUrl { get; set; }
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
using ZhonTai.Admin.Core.Repositories;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain.Tenant;
|
||||||
|
|
||||||
|
public interface ITenantRepository : IRepositoryBase<TenantEntity>
|
||||||
|
{
|
||||||
|
}
|
@ -0,0 +1,86 @@
|
|||||||
|
using FreeSql;
|
||||||
|
using FreeSql.DataAnnotations;
|
||||||
|
using ZhonTai.Admin.Core.Entities;
|
||||||
|
using ZhonTai.Admin.Domain.User;
|
||||||
|
using ZhonTai.Admin.Domain.Org;
|
||||||
|
using ZhonTai.Admin.Domain.TenantPkg;
|
||||||
|
using ZhonTai.Admin.Domain.Pkg;
|
||||||
|
using ZhonTai.Admin.Core.Attributes;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain.Tenant;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 租户
|
||||||
|
/// </summary>
|
||||||
|
[Table(Name = DbConsts.TableNamePrefix + "tenant", OldName = DbConsts.TableOldNamePrefix + "tenant")]
|
||||||
|
public partial class TenantEntity : EntityBase
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 授权用户
|
||||||
|
/// </summary>
|
||||||
|
public long UserId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 用户
|
||||||
|
/// </summary>
|
||||||
|
[NotGen]
|
||||||
|
public UserEntity User { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 授权部门
|
||||||
|
/// </summary>
|
||||||
|
public long OrgId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 部门
|
||||||
|
/// </summary>
|
||||||
|
[NotGen]
|
||||||
|
public OrgEntity Org { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 租户类型
|
||||||
|
/// </summary>
|
||||||
|
public TenantType? TenantType { get; set; } = Tenant.TenantType.Tenant;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 域名
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 300)]
|
||||||
|
public string Domain { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 数据库注册键
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 50)]
|
||||||
|
public string DbKey { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 数据库
|
||||||
|
/// </summary>
|
||||||
|
[Column(MapType = typeof(int?))]
|
||||||
|
public DataType? DbType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 连接字符串
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 500)]
|
||||||
|
public string ConnectionString { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 启用
|
||||||
|
/// </summary>
|
||||||
|
public bool Enabled { get; set; } = true;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 说明
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 500)]
|
||||||
|
public string Description { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 套餐列表
|
||||||
|
/// </summary>
|
||||||
|
[NotGen]
|
||||||
|
[Navigate(ManyToMany = typeof(TenantPkgEntity))]
|
||||||
|
public ICollection<PkgEntity> Pkgs { get; set; }
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
using ZhonTai.Admin.Core.Repositories;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain.TenantPkg;
|
||||||
|
|
||||||
|
public interface ITenantPkgRepository : IRepositoryBase<TenantPkgEntity>
|
||||||
|
{
|
||||||
|
}
|
@ -0,0 +1,30 @@
|
|||||||
|
using FreeSql.DataAnnotations;
|
||||||
|
using ZhonTai.Admin.Core.Entities;
|
||||||
|
using ZhonTai.Admin.Domain.Tenant;
|
||||||
|
using ZhonTai.Admin.Domain.Pkg;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain.TenantPkg;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 租户套餐
|
||||||
|
/// </summary>
|
||||||
|
[Table(Name = DbConsts.TableNamePrefix + "tenant_pkg", OldName = DbConsts.TableOldNamePrefix + "tenant_pkg")]
|
||||||
|
[Index("idx_{tablename}_01", nameof(TenantId) + "," + nameof(PkgId), true)]
|
||||||
|
public class TenantPkgEntity : EntityAdd
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 租户Id
|
||||||
|
/// </summary>
|
||||||
|
[Column(IsPrimary = true)]
|
||||||
|
public long TenantId { get; set; }
|
||||||
|
|
||||||
|
public TenantEntity Tenant { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 套餐Id
|
||||||
|
/// </summary>
|
||||||
|
[Column(IsPrimary = true)]
|
||||||
|
public long PkgId { get; set; }
|
||||||
|
|
||||||
|
public PkgEntity Pkg { get; set; }
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
namespace ZhonTai.Admin.Domain.User;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 账号类型
|
||||||
|
/// </summary>
|
||||||
|
public enum AccountType
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 账号
|
||||||
|
/// </summary>
|
||||||
|
UserName = 1,
|
||||||
|
/// <summary>
|
||||||
|
/// 手机
|
||||||
|
/// </summary>
|
||||||
|
Mobile = 2,
|
||||||
|
/// <summary>
|
||||||
|
/// 邮箱
|
||||||
|
/// </summary>
|
||||||
|
Email = 3
|
||||||
|
}
|
@ -0,0 +1,8 @@
|
|||||||
|
using ZhonTai.Admin.Core.Repositories;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain.User;
|
||||||
|
|
||||||
|
public interface IUserRepository : IRepositoryBase<UserEntity>
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
namespace ZhonTai.Admin.Domain.User;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 密码加密类型
|
||||||
|
/// </summary>
|
||||||
|
public enum PasswordEncryptType
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 32位MD5加密
|
||||||
|
/// </summary>
|
||||||
|
MD5Encrypt32 = 0,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 标准标识密码哈希
|
||||||
|
/// </summary>
|
||||||
|
PasswordHasher = 1,
|
||||||
|
}
|
@ -0,0 +1,162 @@
|
|||||||
|
using FreeSql.DataAnnotations;
|
||||||
|
using ZhonTai.Admin.Core.Entities;
|
||||||
|
using ZhonTai.Admin.Domain.Tenant;
|
||||||
|
using ZhonTai.Admin.Domain.Role;
|
||||||
|
using ZhonTai.Admin.Domain.UserRole;
|
||||||
|
using ZhonTai.Admin.Domain.UserStaff;
|
||||||
|
using ZhonTai.Admin.Domain.Org;
|
||||||
|
using ZhonTai.Admin.Domain.UserOrg;
|
||||||
|
using ZhonTai.Admin.Core.Attributes;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain.User;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 用户
|
||||||
|
/// </summary>
|
||||||
|
[Table(Name = DbConsts.TableNamePrefix + "user", OldName = DbConsts.TableOldNamePrefix + "user")]
|
||||||
|
[Index("idx_{tablename}_01", nameof(UserName), true)]
|
||||||
|
[Index("idx_{tablename}_02", nameof(Mobile))]
|
||||||
|
[Index("idx_{tablename}_03", nameof(Email))]
|
||||||
|
public partial class UserEntity : EntityTenant
|
||||||
|
{
|
||||||
|
[NotGen]
|
||||||
|
public TenantEntity Tenant { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 账号
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 60)]
|
||||||
|
public string UserName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 密码
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 200)]
|
||||||
|
public string Password { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 密码加密类型
|
||||||
|
/// </summary>
|
||||||
|
[Column(MapType = typeof(int?))]
|
||||||
|
public PasswordEncryptType? PasswordEncryptType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 姓名
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 60)]
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 手机号
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 20)]
|
||||||
|
public string Mobile { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 邮箱
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 100)]
|
||||||
|
public string Email { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 主属部门Id
|
||||||
|
/// </summary>
|
||||||
|
public long OrgId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 部门
|
||||||
|
/// </summary>
|
||||||
|
[NotGen]
|
||||||
|
public OrgEntity Org { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 直属主管Id
|
||||||
|
/// </summary>
|
||||||
|
public long? ManagerUserId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 直属主管
|
||||||
|
/// </summary>
|
||||||
|
[NotGen]
|
||||||
|
public UserEntity ManagerUser { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 昵称
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 60)]
|
||||||
|
public string NickName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 头像
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 500)]
|
||||||
|
public string Avatar { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 用户状态
|
||||||
|
/// </summary>
|
||||||
|
[Column(MapType = typeof(int?))]
|
||||||
|
public UserStatus? Status { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 用户类型
|
||||||
|
/// </summary>
|
||||||
|
[Column(MapType = typeof(int))]
|
||||||
|
public UserType Type { get; set; } = UserType.DefaultUser;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 最后登录时间
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 100)]
|
||||||
|
public DateTime? LastLoginTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 最后登录IP
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 100)]
|
||||||
|
public string LastLoginIP { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 最后登录国家
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 100)]
|
||||||
|
public string LastLoginCountry { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 最后登录省份
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 100)]
|
||||||
|
public string LastLoginProvince { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 最后登录城市
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 100)]
|
||||||
|
public string LastLoginCity { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 启用
|
||||||
|
/// </summary>
|
||||||
|
public bool Enabled { get; set; } = true;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 角色列表
|
||||||
|
/// </summary>
|
||||||
|
[NotGen]
|
||||||
|
[Navigate(ManyToMany = typeof(UserRoleEntity))]
|
||||||
|
public ICollection<RoleEntity> Roles { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 部门列表
|
||||||
|
/// </summary>
|
||||||
|
[NotGen]
|
||||||
|
[Navigate(ManyToMany = typeof(UserOrgEntity))]
|
||||||
|
public ICollection<OrgEntity> Orgs { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 员工
|
||||||
|
/// </summary>
|
||||||
|
[NotGen]
|
||||||
|
[Navigate(nameof(Id))]
|
||||||
|
public UserStaffEntity Staff { get; set; }
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
namespace ZhonTai.Admin.Domain.User;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 用户状态
|
||||||
|
/// </summary>
|
||||||
|
public enum UserStatus
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 待修改密码
|
||||||
|
/// </summary>
|
||||||
|
WaitChangePasssword = 2,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 待激活
|
||||||
|
/// </summary>
|
||||||
|
WaitActive = 3,
|
||||||
|
}
|
@ -0,0 +1,38 @@
|
|||||||
|
using FreeSql.DataAnnotations;
|
||||||
|
using System;
|
||||||
|
using ZhonTai.Admin.Core.Entities;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain.UserClickStats;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 用户点击统计
|
||||||
|
/// </summary>
|
||||||
|
[Table(Name = DbConsts.NPPTableOldPrefix + "user_click")]
|
||||||
|
[Index("idx_userclick_id", nameof(UserId))]
|
||||||
|
public class UserClickStatsEntity : EntityBase<long>
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 网页类型 1 在线应用 3 模板中心 5 在线看板
|
||||||
|
/// </summary>
|
||||||
|
public int WebType { get; set; }
|
||||||
|
|
||||||
|
// 网页Id
|
||||||
|
public long WebId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 用户Id
|
||||||
|
/// </summary>
|
||||||
|
public long UserId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 页面点击次数
|
||||||
|
/// </summary>
|
||||||
|
public int PageClicks { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 最后点击时间
|
||||||
|
/// </summary>
|
||||||
|
public DateTime LastClickTime { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
using ZhonTai.Admin.Core.Repositories;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain.UserOrg;
|
||||||
|
|
||||||
|
public interface IUserOrgRepository : IRepositoryBase<UserOrgEntity>
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 本部门下是否有员工
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<bool> HasUser(long id);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 部门列表下是否有员工
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="idList"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<bool> HasUser(List<long> idList);
|
||||||
|
}
|
@ -0,0 +1,44 @@
|
|||||||
|
using FreeSql.DataAnnotations;
|
||||||
|
using ZhonTai.Admin.Core.Entities;
|
||||||
|
using ZhonTai.Admin.Domain.Org;
|
||||||
|
using ZhonTai.Admin.Domain.User;
|
||||||
|
using ZhonTai.Admin.Core.Attributes;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain.UserOrg;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 用户所属部门
|
||||||
|
/// </summary>
|
||||||
|
[Table(Name = DbConsts.TableNamePrefix + "user_org", OldName = DbConsts.TableOldNamePrefix + "user_org")]
|
||||||
|
[Index("idx_{tablename}_01", nameof(UserId) + "," + nameof(OrgId), true)]
|
||||||
|
public partial class UserOrgEntity : EntityUpdate
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 用户Id
|
||||||
|
/// </summary>
|
||||||
|
[Column(IsPrimary = true)]
|
||||||
|
public long UserId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 用户
|
||||||
|
/// </summary>
|
||||||
|
[NotGen]
|
||||||
|
public UserEntity User { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 部门Id
|
||||||
|
/// </summary>
|
||||||
|
[Column(IsPrimary = true)]
|
||||||
|
public long OrgId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 部门
|
||||||
|
/// </summary>
|
||||||
|
[NotGen]
|
||||||
|
public OrgEntity Org { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否主管
|
||||||
|
/// </summary>
|
||||||
|
public bool IsManager { get; set; } = false;
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
using ZhonTai.Admin.Core.Repositories;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain.UserRole;
|
||||||
|
|
||||||
|
public interface IUserRoleRepository : IRepositoryBase<UserRoleEntity>
|
||||||
|
{
|
||||||
|
}
|
@ -0,0 +1,33 @@
|
|||||||
|
using FreeSql.DataAnnotations;
|
||||||
|
using ZhonTai.Admin.Core.Entities;
|
||||||
|
using ZhonTai.Admin.Domain.User;
|
||||||
|
using ZhonTai.Admin.Domain.Role;
|
||||||
|
using ZhonTai.Admin.Core.Attributes;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain.UserRole;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 用户角色
|
||||||
|
/// </summary>
|
||||||
|
[Table(Name = DbConsts.TableNamePrefix + "user_role", OldName = DbConsts.TableOldNamePrefix + "user_role")]
|
||||||
|
[Index("idx_{tablename}_01", nameof(UserId) + "," + nameof(RoleId), true)]
|
||||||
|
public class UserRoleEntity : EntityAdd
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 用户Id
|
||||||
|
/// </summary>
|
||||||
|
[Column(IsPrimary = true)]
|
||||||
|
public long UserId { get; set; }
|
||||||
|
|
||||||
|
[NotGen]
|
||||||
|
public UserEntity User { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 角色Id
|
||||||
|
/// </summary>
|
||||||
|
[Column(IsPrimary = true)]
|
||||||
|
public long RoleId { get; set; }
|
||||||
|
|
||||||
|
[NotGen]
|
||||||
|
public RoleEntity Role { get; set; }
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
using ZhonTai.Admin.Core.Repositories;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain.UserStaff;
|
||||||
|
|
||||||
|
public interface IUserStaffRepository : IRepositoryBase<UserStaffEntity>
|
||||||
|
{
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
using System.ComponentModel;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain.UserStaff;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 性别
|
||||||
|
/// </summary>
|
||||||
|
public enum Sex
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 未知
|
||||||
|
/// </summary>
|
||||||
|
[Description("未知")]
|
||||||
|
Unknown = 0,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 男
|
||||||
|
/// </summary>
|
||||||
|
[Description("男")]
|
||||||
|
Male = 1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 女
|
||||||
|
/// </summary>
|
||||||
|
[Description("女")]
|
||||||
|
Female = 2
|
||||||
|
}
|
@ -0,0 +1,45 @@
|
|||||||
|
using FreeSql.DataAnnotations;
|
||||||
|
using ZhonTai.Admin.Core.Entities;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain.UserStaff;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 用户员工
|
||||||
|
/// </summary>
|
||||||
|
[Table(Name = DbConsts.TableNamePrefix + "user_staff", OldName = DbConsts.TableOldNamePrefix + "user_staff")]
|
||||||
|
public partial class UserStaffEntity : EntityTenant
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 职位
|
||||||
|
/// </summary>
|
||||||
|
public string Position { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 工号
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 20)]
|
||||||
|
public string JobNumber { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 性别
|
||||||
|
/// </summary>
|
||||||
|
[Column(MapType = typeof(int?))]
|
||||||
|
public Sex? Sex { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 入职时间
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? EntryTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 企业微信名片
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 500)]
|
||||||
|
public string WorkWeChatCard { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 个人简介
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 500)]
|
||||||
|
public string Introduce { get; set; }
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
using ZhonTai.Admin.Core.Repositories;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain.View;
|
||||||
|
|
||||||
|
public interface IViewRepository : IRepositoryBase<ViewEntity>
|
||||||
|
{
|
||||||
|
}
|
@ -0,0 +1,65 @@
|
|||||||
|
using FreeSql.DataAnnotations;
|
||||||
|
using ZhonTai.Admin.Core.Entities;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Domain.View;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 视图管理
|
||||||
|
/// </summary>
|
||||||
|
[Table(Name = DbConsts.TableNamePrefix + "view", OldName = DbConsts.TableOldNamePrefix + "view")]
|
||||||
|
[Index("idx_{tablename}_01", nameof(Platform) + "," + nameof(ParentId) + "," + nameof(Label), true)]
|
||||||
|
public partial class ViewEntity : EntityBase, IChilds<ViewEntity>
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 平台
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 20)]
|
||||||
|
public string Platform { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 所属节点
|
||||||
|
/// </summary>
|
||||||
|
public long ParentId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 视图命名
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 50)]
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 视图名称
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 500)]
|
||||||
|
public string Label { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 视图路径
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 500)]
|
||||||
|
public string Path { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 说明
|
||||||
|
/// </summary>
|
||||||
|
[Column(StringLength = 500)]
|
||||||
|
public string Description { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 缓存
|
||||||
|
/// </summary>
|
||||||
|
public bool Cache { get; set; } = true;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 排序
|
||||||
|
/// </summary>
|
||||||
|
public int Sort { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 启用
|
||||||
|
/// </summary>
|
||||||
|
public bool Enabled { get; set; } = true;
|
||||||
|
|
||||||
|
[Navigate(nameof(ParentId))]
|
||||||
|
public List<ViewEntity> Childs { get; set; }
|
||||||
|
}
|
@ -0,0 +1 @@
|
|||||||
|
global using ZhonTai.Admin.Contracts.Core.Consts;
|
@ -0,0 +1,16 @@
|
|||||||
|
using Microsoft.Extensions.Localization;
|
||||||
|
using ZhonTai.Admin.Core.Attributes;
|
||||||
|
using ZhonTai.Admin.Resources;
|
||||||
|
|
||||||
|
namespace ZhonTai.Admin.Contracts.Resources;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Admin契约库国际化
|
||||||
|
/// </summary>
|
||||||
|
[InjectSingleton]
|
||||||
|
public class AdminContractsLocalizer : ModuleLocalizer
|
||||||
|
{
|
||||||
|
public AdminContractsLocalizer(IStringLocalizer<AdminContractsLocalizer> localizer) : base(localizer)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,45 @@
|
|||||||
|
{
|
||||||
|
"密码不能为空": "Password cannot be empty",
|
||||||
|
"请选择接口": "Please select an interface",
|
||||||
|
"请输入邮箱地址": "Please enter your email address",
|
||||||
|
"请输入验证码": "Please enter the verification code",
|
||||||
|
"请获取验证码": "Please request a verification code",
|
||||||
|
"请输入新密码": "Please enter your new password",
|
||||||
|
"请输入手机号": "Please enter your mobile number",
|
||||||
|
"请输入密码": "Please enter your password",
|
||||||
|
"请输入企业名称": "Please enter the enterprise name",
|
||||||
|
"请完成安全验证": "Please complete security verification",
|
||||||
|
"请选择字典类型": "Please select a dictionary type",
|
||||||
|
"请输入字典名称": "Please enter a dictionary name",
|
||||||
|
"不能为空": "Cannot be empty",
|
||||||
|
"请选择数据字典": "Please select a data dictionary",
|
||||||
|
"请输入字典类型名称": "Please enter a dictionary type name",
|
||||||
|
"请选择文档": "Please select a document",
|
||||||
|
"请选择分组": "Please select a group",
|
||||||
|
"请选择菜单": "Please select a menu",
|
||||||
|
"请输入收件人": "Please enter the recipient",
|
||||||
|
"请输入邮件标题": "Please enter the email subject",
|
||||||
|
"请输入邮件内容": "Please enter the email content",
|
||||||
|
"请选择文件": "Please select a file",
|
||||||
|
"请选择消息": "Please select a message",
|
||||||
|
"请选择消息分类": "Please select a message category",
|
||||||
|
"请选择部门": "Please select a department",
|
||||||
|
"角色不能为空": "Role cannot be empty",
|
||||||
|
"权限不能为空": "Permissions cannot be empty",
|
||||||
|
"租户不能为空": "Tenant cannot be empty",
|
||||||
|
"请选择权限点": "Please select a permission point",
|
||||||
|
"请选择权限分组": "Please select a permission group",
|
||||||
|
"请选择套餐": "Please select a package",
|
||||||
|
"套餐不能为空": "Package cannot be empty",
|
||||||
|
"请选择地区": "Please select a region",
|
||||||
|
"请选择角色": "Please select a role",
|
||||||
|
"请选择任务": "Please select a task",
|
||||||
|
"请输入账号": "Please enter your account",
|
||||||
|
"请选择租户": "Please select a tenant",
|
||||||
|
"请输入旧密码": "Please enter your old password",
|
||||||
|
"请输入确认新密码": "Please enter your new password again",
|
||||||
|
"请输入姓名": "Please enter your name",
|
||||||
|
"请选择用户": "Please select a user",
|
||||||
|
"请选择会员": "Please select a member",
|
||||||
|
"请选择视图": "Please select a view",
|
||||||
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
namespace ZhonTai.Admin.Services.Api.Dto;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 添加
|
||||||
|
/// </summary>
|
||||||
|
public class ApiAddInput
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 所属模块
|
||||||
|
/// </summary>
|
||||||
|
public long? ParentId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 接口名称
|
||||||
|
/// </summary>
|
||||||
|
public string Label { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 接口地址
|
||||||
|
/// </summary>
|
||||||
|
public string Path { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 接口提交方法
|
||||||
|
/// </summary>
|
||||||
|
public string HttpMethods { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 说明
|
||||||
|
/// </summary>
|
||||||
|
public string Description { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 排序
|
||||||
|
/// </summary>
|
||||||
|
public int Sort { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 启用
|
||||||
|
/// </summary>
|
||||||
|
public bool Enabled { get; set; }
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user