diff --git a/Code/Be/Faster.Zheng.Winin/.gitattributes b/Code/Be/Faster.Zheng.Winin/.gitattributes
new file mode 100644
index 0000000..c941e52
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/.gitattributes
@@ -0,0 +1 @@
+**/wwwroot/libs/** linguist-vendored
diff --git a/Code/Be/Faster.Zheng.Winin/.gitignore b/Code/Be/Faster.Zheng.Winin/.gitignore
new file mode 100644
index 0000000..7eaf794
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/.gitignore
@@ -0,0 +1,265 @@
+## Ignore Visual Studio temporary files, build results, and
+## files generated by popular Visual Studio add-ons.
+
+# User-specific files
+*.suo
+*.user
+*.userosscache
+*.sln.docstates
+
+# User-specific files (MonoDevelop/Xamarin Studio)
+*.userprefs
+
+# Build results
+[Dd]ebug/
+[Dd]ebugPublic/
+[Rr]elease/
+[Rr]eleases/
+x64/
+x86/
+bld/
+[Bb]in/
+[Oo]bj/
+[Ll]og/
+
+# Visual Studio 2015 cache/options directory
+.vs/
+# Uncomment if you have tasks that create the project's static files in wwwroot
+#wwwroot/
+
+# MSTest test Results
+[Tt]est[Rr]esult*/
+[Bb]uild[Ll]og.*
+
+# NUNIT
+*.VisualState.xml
+TestResult.xml
+
+# Build Results of an ATL Project
+[Dd]ebugPS/
+[Rr]eleasePS/
+dlldata.c
+
+# DNX
+project.lock.json
+artifacts/
+
+*_i.c
+*_p.c
+*_i.h
+*.ilk
+*.meta
+*.obj
+*.pch
+*.pdb
+*.pgc
+*.pgd
+*.rsp
+*.sbr
+*.tlb
+*.tli
+*.tlh
+*.tmp
+*.tmp_proj
+*.log
+*.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
+
+# TFS 2012 Local Workspace
+$tf/
+
+# Guidance Automation Toolkit
+*.gpState
+
+# ReSharper is a .NET coding add-in
+_ReSharper*/
+*.[Rr]e[Ss]harper
+*.DotSettings.user
+
+# JustCode is a .NET coding add-in
+.JustCode
+
+# TeamCity is a build add-in
+_TeamCity*
+
+# DotCover is a Code Coverage Tool
+*.dotCover
+
+# 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
+# TODO: 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
+# The packages folder can be ignored because of Package Restore
+**/packages/*
+# except build/, which is used as an MSBuild target.
+!**/packages/build/
+# Uncomment if necessary however generally it will be regenerated when needed
+#!**/packages/repositories.config
+# NuGet v3's project.json files produces more ignoreable 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
+
+# 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
+*.pfx
+*.publishsettings
+node_modules/
+orleans.codegen.cs
+
+# 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
+
+# SQL Server files
+*.mdf
+*.ldf
+
+# Business Intelligence projects
+*.rdl.data
+*.bim.layout
+*.bim_*.settings
+
+# Microsoft Fakes
+FakesAssemblies/
+
+# GhostDoc plugin setting file
+*.GhostDoc.xml
+
+# Node.js Tools for Visual Studio
+.ntvs_analysis.dat
+
+# Visual Studio 6 build log
+*.plg
+
+# Visual Studio 6 workspace options file
+*.opt
+
+# 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/
+
+# JetBrains Rider
+.idea/
+*.sln.iml
+
+# Winin
+src/Faster.Zheng.Winin.Web/Logs/*
+src/Faster.Zheng.Winin.Web.Host/Logs/*
+src/Faster.Zheng.Winin.AuthServer/Logs/*
+src/Faster.Zheng.Winin.HttpApi.Host/Logs/*
+src/Faster.Zheng.Winin.HttpApi.HostWithIds/Logs/*
+src/Faster.Zheng.Winin.DbMigrator/Logs/*
+src/Faster.Zheng.Winin.Blazor.Server/Logs/*
+src/Faster.Zheng.Winin.Blazor.Server.Tiered/Logs/*
+
+# Use abp install-libs to restore.
+**/wwwroot/libs/*
diff --git a/Code/Be/Faster.Zheng.Winin/.prettierrc b/Code/Be/Faster.Zheng.Winin/.prettierrc
new file mode 100644
index 0000000..56af76b
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/.prettierrc
@@ -0,0 +1,5 @@
+{
+ "singleQuote": true,
+ "useTabs": false,
+ "tabWidth": 4
+}
diff --git a/Code/Be/Faster.Zheng.Winin/Faster.Zheng.Winin.sln b/Code/Be/Faster.Zheng.Winin/Faster.Zheng.Winin.sln
new file mode 100644
index 0000000..f58fa9d
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/Faster.Zheng.Winin.sln
@@ -0,0 +1,130 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.29020.237
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Faster.Zheng.Winin.Domain", "src\Faster.Zheng.Winin.Domain\Faster.Zheng.Winin.Domain.csproj", "{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Faster.Zheng.Winin.Application", "src\Faster.Zheng.Winin.Application\Faster.Zheng.Winin.Application.csproj", "{1A94A50E-06DC-43C1-80B5-B662820EC3EB}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Faster.Zheng.Winin.EntityFrameworkCore", "src\Faster.Zheng.Winin.EntityFrameworkCore\Faster.Zheng.Winin.EntityFrameworkCore.csproj", "{C956DD76-69C8-4A9C-83EA-D17DF83340FD}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Faster.Zheng.Winin.Web", "src\Faster.Zheng.Winin.Web\Faster.Zheng.Winin.Web.csproj", "{068855E8-9240-4F1A-910B-CF825794513B}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{CA9AC87F-097E-4F15-8393-4BC07735A5B0}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{04DBDB01-70F4-4E06-B468-8F87850B22BE}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Faster.Zheng.Winin.Application.Tests", "test\Faster.Zheng.Winin.Application.Tests\Faster.Zheng.Winin.Application.Tests.csproj", "{50B2631D-129C-47B3-A587-029CCD6099BC}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Faster.Zheng.Winin.Web.Tests", "test\Faster.Zheng.Winin.Web.Tests\Faster.Zheng.Winin.Web.Tests.csproj", "{5F1B28C6-8D0C-4155-92D0-252F7EA5F674}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Faster.Zheng.Winin.Domain.Shared", "src\Faster.Zheng.Winin.Domain.Shared\Faster.Zheng.Winin.Domain.Shared.csproj", "{42F719ED-8413-4895-B5B4-5AB56079BC66}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Faster.Zheng.Winin.Application.Contracts", "src\Faster.Zheng.Winin.Application.Contracts\Faster.Zheng.Winin.Application.Contracts.csproj", "{520659C8-C734-4298-A3DA-B539DB9DFC0B}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Faster.Zheng.Winin.HttpApi", "src\Faster.Zheng.Winin.HttpApi\Faster.Zheng.Winin.HttpApi.csproj", "{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Faster.Zheng.Winin.HttpApi.Client", "src\Faster.Zheng.Winin.HttpApi.Client\Faster.Zheng.Winin.HttpApi.Client.csproj", "{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Faster.Zheng.Winin.EntityFrameworkCore.Tests", "test\Faster.Zheng.Winin.EntityFrameworkCore.Tests\Faster.Zheng.Winin.EntityFrameworkCore.Tests.csproj", "{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Faster.Zheng.Winin.TestBase", "test\Faster.Zheng.Winin.TestBase\Faster.Zheng.Winin.TestBase.csproj", "{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Faster.Zheng.Winin.Domain.Tests", "test\Faster.Zheng.Winin.Domain.Tests\Faster.Zheng.Winin.Domain.Tests.csproj", "{E512F4D9-9375-480F-A2F6-A46509F9D824}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Faster.Zheng.Winin.HttpApi.Client.ConsoleTestApp", "test\Faster.Zheng.Winin.HttpApi.Client.ConsoleTestApp\Faster.Zheng.Winin.HttpApi.Client.ConsoleTestApp.csproj", "{EF480016-9127-4916-8735-D2466BDBC582}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Faster.Zheng.Winin.DbMigrator", "src\Faster.Zheng.Winin.DbMigrator\Faster.Zheng.Winin.DbMigrator.csproj", "{AA94D832-1CCC-4715-95A9-A483F23A1A5D}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C956DD76-69C8-4A9C-83EA-D17DF83340FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C956DD76-69C8-4A9C-83EA-D17DF83340FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C956DD76-69C8-4A9C-83EA-D17DF83340FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C956DD76-69C8-4A9C-83EA-D17DF83340FD}.Release|Any CPU.Build.0 = Release|Any CPU
+ {068855E8-9240-4F1A-910B-CF825794513B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {068855E8-9240-4F1A-910B-CF825794513B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {068855E8-9240-4F1A-910B-CF825794513B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {068855E8-9240-4F1A-910B-CF825794513B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {50B2631D-129C-47B3-A587-029CCD6099BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {50B2631D-129C-47B3-A587-029CCD6099BC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {50B2631D-129C-47B3-A587-029CCD6099BC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {50B2631D-129C-47B3-A587-029CCD6099BC}.Release|Any CPU.Build.0 = Release|Any CPU
+ {5F1B28C6-8D0C-4155-92D0-252F7EA5F674}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {5F1B28C6-8D0C-4155-92D0-252F7EA5F674}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {5F1B28C6-8D0C-4155-92D0-252F7EA5F674}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {5F1B28C6-8D0C-4155-92D0-252F7EA5F674}.Release|Any CPU.Build.0 = Release|Any CPU
+ {42F719ED-8413-4895-B5B4-5AB56079BC66}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {42F719ED-8413-4895-B5B4-5AB56079BC66}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {42F719ED-8413-4895-B5B4-5AB56079BC66}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {42F719ED-8413-4895-B5B4-5AB56079BC66}.Release|Any CPU.Build.0 = Release|Any CPU
+ {520659C8-C734-4298-A3DA-B539DB9DFC0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {520659C8-C734-4298-A3DA-B539DB9DFC0B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {520659C8-C734-4298-A3DA-B539DB9DFC0B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {520659C8-C734-4298-A3DA-B539DB9DFC0B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Release|Any CPU.Build.0 = Release|Any CPU
+ {3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}.Release|Any CPU.Build.0 = Release|Any CPU
+ {91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E512F4D9-9375-480F-A2F6-A46509F9D824}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E512F4D9-9375-480F-A2F6-A46509F9D824}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E512F4D9-9375-480F-A2F6-A46509F9D824}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E512F4D9-9375-480F-A2F6-A46509F9D824}.Release|Any CPU.Build.0 = Release|Any CPU
+ {EF480016-9127-4916-8735-D2466BDBC582}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {EF480016-9127-4916-8735-D2466BDBC582}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {EF480016-9127-4916-8735-D2466BDBC582}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {EF480016-9127-4916-8735-D2466BDBC582}.Release|Any CPU.Build.0 = Release|Any CPU
+ {AA94D832-1CCC-4715-95A9-A483F23A1A5D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {AA94D832-1CCC-4715-95A9-A483F23A1A5D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {AA94D832-1CCC-4715-95A9-A483F23A1A5D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {AA94D832-1CCC-4715-95A9-A483F23A1A5D}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(NestedProjects) = preSolution
+ {554AD327-6DBA-4F8F-96F8-81CE7A0C863F} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ {1A94A50E-06DC-43C1-80B5-B662820EC3EB} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ {C956DD76-69C8-4A9C-83EA-D17DF83340FD} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ {068855E8-9240-4F1A-910B-CF825794513B} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ {50B2631D-129C-47B3-A587-029CCD6099BC} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
+ {5F1B28C6-8D0C-4155-92D0-252F7EA5F674} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
+ {42F719ED-8413-4895-B5B4-5AB56079BC66} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ {520659C8-C734-4298-A3DA-B539DB9DFC0B} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ {4164BDF7-F527-4E85-9CE6-E3C2D7426A27} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ {3B5A0094-670D-4BB1-BFDD-61B88A8773DC} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ {1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
+ {91853F21-9CD9-4132-BC29-A7D5D84FFFE7} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
+ {E512F4D9-9375-480F-A2F6-A46509F9D824} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
+ {EF480016-9127-4916-8735-D2466BDBC582} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
+ {AA94D832-1CCC-4715-95A9-A483F23A1A5D} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {28315BFD-90E7-4E14-A2EA-F3D23AF4126F}
+ EndGlobalSection
+EndGlobal
diff --git a/Code/Be/Faster.Zheng.Winin/Faster.Zheng.Winin.sln.DotSettings b/Code/Be/Faster.Zheng.Winin/Faster.Zheng.Winin.sln.DotSettings
new file mode 100644
index 0000000..cb0b2c9
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/Faster.Zheng.Winin.sln.DotSettings
@@ -0,0 +1,23 @@
+
+ True
+ WARNING
+ WARNING
+ WARNING
+ WARNING
+ WARNING
+ WARNING
+ WARNING
+ WARNING
+ Required
+ Required
+ Required
+ Required
+ False
+ True
+ False
+ False
+ True
+ False
+ False
+ SQL
+
\ No newline at end of file
diff --git a/Code/Be/Faster.Zheng.Winin/NuGet.Config b/Code/Be/Faster.Zheng.Winin/NuGet.Config
new file mode 100644
index 0000000..bdc4519
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/NuGet.Config
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/Code/Be/Faster.Zheng.Winin/common.props b/Code/Be/Faster.Zheng.Winin/common.props
new file mode 100644
index 0000000..7e89c3a
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/common.props
@@ -0,0 +1,19 @@
+
+
+ latest
+ 1.0.0
+ $(NoWarn);CS1591
+ app
+
+
+
+
+ $(NoWarn);0436
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Application.Contracts/Faster.Zheng.Winin.Application.Contracts.csproj b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Application.Contracts/Faster.Zheng.Winin.Application.Contracts.csproj
new file mode 100644
index 0000000..a104bd0
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Application.Contracts/Faster.Zheng.Winin.Application.Contracts.csproj
@@ -0,0 +1,25 @@
+
+
+
+
+
+ netstandard2.0
+ enable
+ Faster.Zheng.Winin
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Application.Contracts/Permissions/WininPermissionDefinitionProvider.cs b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Application.Contracts/Permissions/WininPermissionDefinitionProvider.cs
new file mode 100644
index 0000000..c29fd43
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Application.Contracts/Permissions/WininPermissionDefinitionProvider.cs
@@ -0,0 +1,20 @@
+using Faster.Zheng.Winin.Localization;
+using Volo.Abp.Authorization.Permissions;
+using Volo.Abp.Localization;
+
+namespace Faster.Zheng.Winin.Permissions;
+
+public class WininPermissionDefinitionProvider : PermissionDefinitionProvider
+{
+ public override void Define(IPermissionDefinitionContext context)
+ {
+ var myGroup = context.AddGroup(WininPermissions.GroupName);
+ //Define your own permissions here. Example:
+ //myGroup.AddPermission(WininPermissions.MyPermission1, L("Permission:MyPermission1"));
+ }
+
+ private static LocalizableString L(string name)
+ {
+ return LocalizableString.Create(name);
+ }
+}
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Application.Contracts/Permissions/WininPermissions.cs b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Application.Contracts/Permissions/WininPermissions.cs
new file mode 100644
index 0000000..cd35044
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Application.Contracts/Permissions/WininPermissions.cs
@@ -0,0 +1,9 @@
+namespace Faster.Zheng.Winin.Permissions;
+
+public static class WininPermissions
+{
+ public const string GroupName = "Winin";
+
+ //Add your own permission names. Example:
+ //public const string MyPermission1 = GroupName + ".MyPermission1";
+}
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Application.Contracts/WininApplicationContractsModule.cs b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Application.Contracts/WininApplicationContractsModule.cs
new file mode 100644
index 0000000..cb84df8
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Application.Contracts/WininApplicationContractsModule.cs
@@ -0,0 +1,28 @@
+using Volo.Abp.Account;
+using Volo.Abp.FeatureManagement;
+using Volo.Abp.Identity;
+using Volo.Abp.Modularity;
+using Volo.Abp.ObjectExtending;
+using Volo.Abp.PermissionManagement;
+using Volo.Abp.SettingManagement;
+using Volo.Abp.TenantManagement;
+
+namespace Faster.Zheng.Winin;
+
+[DependsOn(
+ typeof(WininDomainSharedModule),
+ typeof(AbpAccountApplicationContractsModule),
+ typeof(AbpFeatureManagementApplicationContractsModule),
+ typeof(AbpIdentityApplicationContractsModule),
+ typeof(AbpPermissionManagementApplicationContractsModule),
+ typeof(AbpSettingManagementApplicationContractsModule),
+ typeof(AbpTenantManagementApplicationContractsModule),
+ typeof(AbpObjectExtendingModule)
+)]
+public class WininApplicationContractsModule : AbpModule
+{
+ public override void PreConfigureServices(ServiceConfigurationContext context)
+ {
+ WininDtoExtensions.Configure();
+ }
+}
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Application.Contracts/WininDtoExtensions.cs b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Application.Contracts/WininDtoExtensions.cs
new file mode 100644
index 0000000..0a9eb12
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Application.Contracts/WininDtoExtensions.cs
@@ -0,0 +1,28 @@
+using Volo.Abp.Identity;
+using Volo.Abp.ObjectExtending;
+using Volo.Abp.Threading;
+
+namespace Faster.Zheng.Winin;
+
+public static class WininDtoExtensions
+{
+ private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner();
+
+ public static void Configure()
+ {
+ OneTimeRunner.Run(() =>
+ {
+ /* You can add extension properties to DTOs
+ * defined in the depended modules.
+ *
+ * Example:
+ *
+ * ObjectExtensionManager.Instance
+ * .AddOrUpdateProperty("Title");
+ *
+ * See the documentation for more:
+ * https://docs.abp.io/en/abp/latest/Object-Extensions
+ */
+ });
+ }
+}
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Application/Faster.Zheng.Winin.Application.csproj b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Application/Faster.Zheng.Winin.Application.csproj
new file mode 100644
index 0000000..6fd6645
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Application/Faster.Zheng.Winin.Application.csproj
@@ -0,0 +1,25 @@
+
+
+
+
+
+ net7.0
+ enable
+ Faster.Zheng.Winin
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Application/Properties/AssemblyInfo.cs b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Application/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..27b81cd
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Application/Properties/AssemblyInfo.cs
@@ -0,0 +1,2 @@
+using System.Runtime.CompilerServices;
+[assembly:InternalsVisibleToAttribute("Faster.Zheng.Winin.Application.Tests")]
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Application/WininAppService.cs b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Application/WininAppService.cs
new file mode 100644
index 0000000..c45e3be
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Application/WininAppService.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using Faster.Zheng.Winin.Localization;
+using Volo.Abp.Application.Services;
+
+namespace Faster.Zheng.Winin;
+
+/* Inherit your application services from this class.
+ */
+public abstract class WininAppService : ApplicationService
+{
+ protected WininAppService()
+ {
+ LocalizationResource = typeof(WininResource);
+ }
+}
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Application/WininApplicationAutoMapperProfile.cs b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Application/WininApplicationAutoMapperProfile.cs
new file mode 100644
index 0000000..821cf38
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Application/WininApplicationAutoMapperProfile.cs
@@ -0,0 +1,13 @@
+using AutoMapper;
+
+namespace Faster.Zheng.Winin;
+
+public class WininApplicationAutoMapperProfile : Profile
+{
+ public WininApplicationAutoMapperProfile()
+ {
+ /* You can configure your AutoMapper mapping configuration here.
+ * Alternatively, you can split your mapping configurations
+ * into multiple profile classes for a better organization. */
+ }
+}
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Application/WininApplicationModule.cs b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Application/WininApplicationModule.cs
new file mode 100644
index 0000000..89fba3e
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Application/WininApplicationModule.cs
@@ -0,0 +1,31 @@
+using Volo.Abp.Account;
+using Volo.Abp.AutoMapper;
+using Volo.Abp.FeatureManagement;
+using Volo.Abp.Identity;
+using Volo.Abp.Modularity;
+using Volo.Abp.PermissionManagement;
+using Volo.Abp.SettingManagement;
+using Volo.Abp.TenantManagement;
+
+namespace Faster.Zheng.Winin;
+
+[DependsOn(
+ typeof(WininDomainModule),
+ typeof(AbpAccountApplicationModule),
+ typeof(WininApplicationContractsModule),
+ typeof(AbpIdentityApplicationModule),
+ typeof(AbpPermissionManagementApplicationModule),
+ typeof(AbpTenantManagementApplicationModule),
+ typeof(AbpFeatureManagementApplicationModule),
+ typeof(AbpSettingManagementApplicationModule)
+ )]
+public class WininApplicationModule : AbpModule
+{
+ public override void ConfigureServices(ServiceConfigurationContext context)
+ {
+ Configure(options =>
+ {
+ options.AddMaps();
+ });
+ }
+}
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.DbMigrator/DbMigratorHostedService.cs b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.DbMigrator/DbMigratorHostedService.cs
new file mode 100644
index 0000000..1179082
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.DbMigrator/DbMigratorHostedService.cs
@@ -0,0 +1,51 @@
+using System.Threading;
+using System.Threading.Tasks;
+using Microsoft.Extensions.Configuration;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Hosting;
+using Faster.Zheng.Winin.Data;
+using Serilog;
+using Volo.Abp;
+using Volo.Abp.Data;
+
+namespace Faster.Zheng.Winin.DbMigrator;
+
+public class DbMigratorHostedService : IHostedService
+{
+ private readonly IHostApplicationLifetime _hostApplicationLifetime;
+ private readonly IConfiguration _configuration;
+
+ public DbMigratorHostedService(IHostApplicationLifetime hostApplicationLifetime, IConfiguration configuration)
+ {
+ _hostApplicationLifetime = hostApplicationLifetime;
+ _configuration = configuration;
+ }
+
+ public async Task StartAsync(CancellationToken cancellationToken)
+ {
+ using (var application = await AbpApplicationFactory.CreateAsync(options =>
+ {
+ options.Services.ReplaceConfiguration(_configuration);
+ options.UseAutofac();
+ options.Services.AddLogging(c => c.AddSerilog());
+ options.AddDataMigrationEnvironment();
+ }))
+ {
+ await application.InitializeAsync();
+
+ await application
+ .ServiceProvider
+ .GetRequiredService()
+ .MigrateAsync();
+
+ await application.ShutdownAsync();
+
+ _hostApplicationLifetime.StopApplication();
+ }
+ }
+
+ public Task StopAsync(CancellationToken cancellationToken)
+ {
+ return Task.CompletedTask;
+ }
+}
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.DbMigrator/Faster.Zheng.Winin.DbMigrator.csproj b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.DbMigrator/Faster.Zheng.Winin.DbMigrator.csproj
new file mode 100644
index 0000000..bc9be38
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.DbMigrator/Faster.Zheng.Winin.DbMigrator.csproj
@@ -0,0 +1,45 @@
+
+
+
+
+
+ Exe
+ net7.0
+ enable
+
+
+
+
+
+ PreserveNewest
+ Always
+
+
+
+ PreserveNewest
+ Always
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.DbMigrator/Program.cs b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.DbMigrator/Program.cs
new file mode 100644
index 0000000..222a3d0
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.DbMigrator/Program.cs
@@ -0,0 +1,41 @@
+using System.IO;
+using System.Threading.Tasks;
+using Microsoft.Extensions.Configuration;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Hosting;
+using Microsoft.Extensions.Logging;
+using Serilog;
+using Serilog.Events;
+
+namespace Faster.Zheng.Winin.DbMigrator;
+
+class Program
+{
+ static async Task Main(string[] args)
+ {
+ Log.Logger = new LoggerConfiguration()
+ .MinimumLevel.Information()
+ .MinimumLevel.Override("Microsoft", LogEventLevel.Warning)
+ .MinimumLevel.Override("Volo.Abp", LogEventLevel.Warning)
+#if DEBUG
+ .MinimumLevel.Override("Faster.Zheng.Winin", LogEventLevel.Debug)
+#else
+ .MinimumLevel.Override("Faster.Zheng.Winin", LogEventLevel.Information)
+#endif
+ .Enrich.FromLogContext()
+ .WriteTo.Async(c => c.File("Logs/logs.txt"))
+ .WriteTo.Async(c => c.Console())
+ .CreateLogger();
+
+ await CreateHostBuilder(args).RunConsoleAsync();
+ }
+
+ public static IHostBuilder CreateHostBuilder(string[] args) =>
+ Host.CreateDefaultBuilder(args)
+ .AddAppSettingsSecretsJson()
+ .ConfigureLogging((context, logging) => logging.ClearProviders())
+ .ConfigureServices((hostContext, services) =>
+ {
+ services.AddHostedService();
+ });
+}
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.DbMigrator/WininDbMigratorModule.cs b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.DbMigrator/WininDbMigratorModule.cs
new file mode 100644
index 0000000..c22305d
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.DbMigrator/WininDbMigratorModule.cs
@@ -0,0 +1,15 @@
+using Faster.Zheng.Winin.EntityFrameworkCore;
+using Volo.Abp.Autofac;
+using Volo.Abp.Modularity;
+
+namespace Faster.Zheng.Winin.DbMigrator;
+
+[DependsOn(
+ typeof(AbpAutofacModule),
+ typeof(WininEntityFrameworkCoreModule),
+ typeof(WininApplicationContractsModule)
+ )]
+public class WininDbMigratorModule : AbpModule
+{
+
+}
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.DbMigrator/appsettings.json b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.DbMigrator/appsettings.json
new file mode 100644
index 0000000..bbf287c
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.DbMigrator/appsettings.json
@@ -0,0 +1,27 @@
+{
+ "ConnectionStrings": {
+ "Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=Winin;Trusted_Connection=True;TrustServerCertificate=True"
+ },
+ "OpenIddict": {
+ "Applications": {
+ "Winin_Web": {
+ "ClientId": "Winin_Web",
+ "ClientSecret": "1q2w3e*",
+ "RootUrl": "https://localhost:44392"
+ },
+ "Winin_App": {
+ "ClientId": "Winin_App",
+ "RootUrl": "http://localhost:4200"
+ },
+ "Winin_BlazorServerTiered": {
+ "ClientId": "Winin_BlazorServerTiered",
+ "ClientSecret": "1q2w3e*",
+ "RootUrl": "https://localhost:44367"
+ },
+ "Winin_Swagger": {
+ "ClientId": "Winin_Swagger",
+ "RootUrl": "https://localhost:44380"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.DbMigrator/appsettings.secrets.json b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.DbMigrator/appsettings.secrets.json
new file mode 100644
index 0000000..7a73a41
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.DbMigrator/appsettings.secrets.json
@@ -0,0 +1,2 @@
+{
+}
\ No newline at end of file
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Faster.Zheng.Winin.Domain.Shared.csproj b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Faster.Zheng.Winin.Domain.Shared.csproj
new file mode 100644
index 0000000..0645cb1
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Faster.Zheng.Winin.Domain.Shared.csproj
@@ -0,0 +1,32 @@
+
+
+
+
+
+ netstandard2.0
+ enable
+ Faster.Zheng.Winin
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/ar.json b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/ar.json
new file mode 100644
index 0000000..96bbf80
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/ar.json
@@ -0,0 +1,8 @@
+{
+ "culture": "ar",
+ "texts": {
+ "Menu:Home": "الرئيسية",
+ "Menu:Home": "الصفحة الرئيسية",
+ "LongWelcomeMessage": "مرحبا بكم في التطبيق. هذا مشروع بدء تشغيل يعتمد على إطار عمل ABP. لمزيد من المعلومات ، يرجى زيارة abp.io."
+ }
+}
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/cs.json b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/cs.json
new file mode 100644
index 0000000..5a0bbf6
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/cs.json
@@ -0,0 +1,8 @@
+{
+ "culture": "cs",
+ "texts": {
+ "Menu:Home": "Úvod",
+ "Welcome": "Vítejte",
+ "LongWelcomeMessage": "Vítejte v aplikaci. Toto je startovací projekt založený na ABP frameworku. Pro více informací, navštivte abp.io."
+ }
+}
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/de.json b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/de.json
new file mode 100644
index 0000000..831493b
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/de.json
@@ -0,0 +1,8 @@
+{
+ "culture": "de",
+ "texts": {
+ "Menu:Home": "Home",
+ "Welcome": "Willkommen",
+ "LongWelcomeMessage": "Willkommen bei der Anwendung. Dies ist ein Startup-Projekt, das auf dem ABP-Framework basiert. Weitere Informationen finden Sie unter abp.io."
+ }
+}
\ No newline at end of file
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/en-GB.json b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/en-GB.json
new file mode 100644
index 0000000..d2ca079
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/en-GB.json
@@ -0,0 +1,8 @@
+{
+ "culture": "en-GB",
+ "texts": {
+ "Menu:Home": "Home",
+ "Welcome": "Welcome",
+ "LongWelcomeMessage": "Welcome to the application. This is a startup project based on the ABP framework. For more information, visit abp.io."
+ }
+}
\ No newline at end of file
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/en.json b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/en.json
new file mode 100644
index 0000000..d2a6a98
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/en.json
@@ -0,0 +1,8 @@
+{
+ "culture": "en",
+ "texts": {
+ "Menu:Home": "Home",
+ "Welcome": "Welcome",
+ "LongWelcomeMessage": "Welcome to the application. This is a startup project based on the ABP framework. For more information, visit abp.io."
+ }
+}
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/es.json b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/es.json
new file mode 100644
index 0000000..31b4b59
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/es.json
@@ -0,0 +1,8 @@
+{
+ "culture": "es",
+ "texts": {
+ "Menu:Home": "Inicio",
+ "Welcome": "Bienvenido",
+ "LongWelcomeMessage": "Bienvenido a la aplicación, este es un proyecto base basado en el framework ABP. Para más información, visita abp.io."
+ }
+}
\ No newline at end of file
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/fi.json b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/fi.json
new file mode 100644
index 0000000..a318859
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/fi.json
@@ -0,0 +1,8 @@
+{
+ "culture": "fi",
+ "texts": {
+ "Menu:Home": "Koti",
+ "Welcome": "Tervetuloa",
+ "LongWelcomeMessage": "Tervetuloa sovellukseen. Tämä on ABP-kehykseen perustuva käynnistysprojekti. Lisätietoja on osoitteessa abp.io."
+ }
+}
\ No newline at end of file
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/fr.json b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/fr.json
new file mode 100644
index 0000000..e76eac0
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/fr.json
@@ -0,0 +1,8 @@
+{
+ "culture": "fr",
+ "texts": {
+ "Menu:Home": "Accueil",
+ "Welcome": "Bienvenue",
+ "LongWelcomeMessage": "Bienvenue dans l'application. Il s'agit d'un projet de démarrage basé sur le framework ABP. Pour plus d'informations, visitez abp.io."
+ }
+}
\ No newline at end of file
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/hi.json b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/hi.json
new file mode 100644
index 0000000..a1676bf
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/hi.json
@@ -0,0 +1,8 @@
+{
+ "culture": "hi",
+ "texts": {
+ "Menu:Home": "घर",
+ "Welcome": "स्वागत हे",
+ "LongWelcomeMessage": "आवेदन करने के लिए आपका स्वागत है। यह एबीपी ढांचे पर आधारित एक स्टार्टअप परियोजना है। अधिक जानकारी के लिए, abp.io पर जाएं।"
+ }
+}
\ No newline at end of file
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/hr.json b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/hr.json
new file mode 100644
index 0000000..fa8efab
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/hr.json
@@ -0,0 +1,8 @@
+{
+ "culture": "hr",
+ "texts": {
+ "Menu:Home": "Početna",
+ "Welcome": "Dobrodošli",
+ "LongWelcomeMessage": "Dobrodošli u aplikaciju. Ovo je startup projekt temeljen na ABP framework-u. Za više informacija posjetite abp.io."
+ }
+}
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/hu.json b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/hu.json
new file mode 100644
index 0000000..c7b6a33
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/hu.json
@@ -0,0 +1,8 @@
+{
+ "culture": "hu",
+ "texts": {
+ "Menu:Home": "Kezdőlap",
+ "Welcome": "Üdvözlöm",
+ "LongWelcomeMessage": "Üdvözöljük az alkalmazásban. Ez egy ABP keretrendszeren alapuló startup projekt. További információkért látogasson el az abp.io oldalra."
+ }
+}
\ No newline at end of file
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/is.json b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/is.json
new file mode 100644
index 0000000..190df90
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/is.json
@@ -0,0 +1,8 @@
+{
+ "culture": "is",
+ "texts": {
+ "Menu:Home": "Heim",
+ "Welcome": "Velkomin",
+ "LongWelcomeMessage": "Verið velkomin í forritið. Þetta er startup verkefni sem byggir á ABP. Nánari upplýsingar er að finna á abp.io."
+ }
+}
\ No newline at end of file
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/it.json b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/it.json
new file mode 100644
index 0000000..82ce42b
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/it.json
@@ -0,0 +1,8 @@
+{
+ "culture": "it",
+ "texts": {
+ "Menu:Home": "Home",
+ "Welcome": "Benvenuto",
+ "LongWelcomeMessage": "Benvenuto nell'applicazione. Questo è un progetto di avvio basato sul framework ABP. Per ulteriori informazioni, visita abp.io."
+ }
+}
\ No newline at end of file
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/nl.json b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/nl.json
new file mode 100644
index 0000000..9ba8da4
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/nl.json
@@ -0,0 +1,8 @@
+{
+ "culture": "nl",
+ "texts": {
+ "Menu:Home": "Home",
+ "Welcome": "Welkom",
+ "LongWelcomeMessage": "Welkom bij de applicatie. Dit is een startup-project gebaseerd op het ABP-framework. Bezoek abp.io voor meer informatie."
+ }
+}
\ No newline at end of file
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/pl-PL.json b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/pl-PL.json
new file mode 100644
index 0000000..33412f3
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/pl-PL.json
@@ -0,0 +1,8 @@
+{
+ "culture": "pl-PL",
+ "texts": {
+ "Menu:Home": "Home",
+ "Welcome": "Witaj",
+ "LongWelcomeMessage": "Witaj w aplikacji. To jest inicjalny projekt bazujący na ABP framework. Po więcej informacji odwiedź stronę abp.io."
+ }
+}
\ No newline at end of file
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/pt-BR.json b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/pt-BR.json
new file mode 100644
index 0000000..8c818a0
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/pt-BR.json
@@ -0,0 +1,8 @@
+{
+ "culture": "pt-BR",
+ "texts": {
+ "Menu:Home": "Principal",
+ "Welcome": "Seja bem-vindo!",
+ "LongWelcomeMessage": "Bem-vindo a esta aplicação. Este é um projeto inicial baseado no ABP framework. Para mais informações, visite abp.io."
+ }
+}
\ No newline at end of file
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/ro-RO.json b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/ro-RO.json
new file mode 100644
index 0000000..1fe5601
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/ro-RO.json
@@ -0,0 +1,8 @@
+{
+ "culture": "ro-RO",
+ "texts": {
+ "Menu:Home": "Acasă",
+ "Welcome": "Bun venit",
+ "LongWelcomeMessage": "Bun venit la aplicaţie. Acesta este un proiect de pornire bazat pe framework-ul ABP. Pentru mai multe informaţii, vizitaţi, visit abp.io."
+ }
+}
\ No newline at end of file
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/ru.json b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/ru.json
new file mode 100644
index 0000000..8464e44
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/ru.json
@@ -0,0 +1,8 @@
+{
+ "culture": "ru",
+ "texts": {
+ "Menu:Home": "Главная",
+ "Welcome": "Добро пожаловать",
+ "LongWelcomeMessage": "Добро пожаловать в приложение. Этот запущенный проект основан на фреймворке ABP. Для получения дополнительной информации посетите сайт abp.io."
+ }
+}
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/sk.json b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/sk.json
new file mode 100644
index 0000000..4f35aaf
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/sk.json
@@ -0,0 +1,8 @@
+{
+ "culture": "sk",
+ "texts": {
+ "Menu:Home": "Domov",
+ "Welcome": "Vitajte",
+ "LongWelcomeMessage": "Vitajte v aplikácii. Toto je štartovací projekt založený na ABP frameworku. Viac informácií nájdete na stránke abp.io."
+ }
+}
\ No newline at end of file
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/sl.json b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/sl.json
new file mode 100644
index 0000000..a066ef2
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/sl.json
@@ -0,0 +1,8 @@
+{
+ "culture": "sl",
+ "texts": {
+ "Menu:Home": "Domov",
+ "Welcome": "Dobrodošli",
+ "LongWelcomeMessage": "Dobrodošli v aplikaciji. To je začetni projekt na osnovi okolja ABP. Za več informacij obiščite abp.io."
+ }
+}
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/tr.json b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/tr.json
new file mode 100644
index 0000000..2cc911e
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/tr.json
@@ -0,0 +1,8 @@
+{
+ "culture": "tr",
+ "texts": {
+ "Menu:Home": "Ana sayfa",
+ "Welcome": "Hoşgeldiniz",
+ "LongWelcomeMessage": "Uygulamaya hoşgeldiniz. Bu, ABP framework'ü üzerine bina edilmiş bir başlangıç projesidir. Daha fazla bilgi için abp.io adresini ziyaret edebilirsiniz."
+ }
+}
\ No newline at end of file
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/vi.json b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/vi.json
new file mode 100644
index 0000000..c115a35
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/vi.json
@@ -0,0 +1,8 @@
+{
+ "culture": "vi",
+ "texts": {
+ "Menu:Home": "Trang chủ",
+ "Welcome": "Chào mừng bạn",
+ "LongWelcomeMessage": "Chào mừng bạn đến ứng dụng. Đây là một dự án khởi nghiệp dựa trên khung ABP. Để biết thêm thông tin, hãy truy cập abp.io."
+ }
+}
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/zh-Hans.json b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/zh-Hans.json
new file mode 100644
index 0000000..23790bd
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/zh-Hans.json
@@ -0,0 +1,8 @@
+{
+ "culture": "zh-Hans",
+ "texts": {
+ "Menu:Home": "首页",
+ "Welcome": "欢迎",
+ "LongWelcomeMessage": "欢迎来到该应用程序. 这是一个基于ABP框架的启动项目. 有关更多信息, 请访问 abp.io."
+ }
+ }
\ No newline at end of file
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/zh-Hant.json b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/zh-Hant.json
new file mode 100644
index 0000000..31e0ab5
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/Winin/zh-Hant.json
@@ -0,0 +1,8 @@
+{
+ "culture": "zh-Hant",
+ "texts": {
+ "Menu:Home": "首頁",
+ "Welcome": "歡迎",
+ "LongWelcomeMessage": "歡迎來到此應用程式. 這是一個基於ABP框架的起始專案. 有關更多訊息, 請瀏覽 abp.io."
+ }
+ }
\ No newline at end of file
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/WininResource.cs b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/WininResource.cs
new file mode 100644
index 0000000..5db4a0a
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/Localization/WininResource.cs
@@ -0,0 +1,9 @@
+using Volo.Abp.Localization;
+
+namespace Faster.Zheng.Winin.Localization;
+
+[LocalizationResourceName("Winin")]
+public class WininResource
+{
+
+}
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/MultiTenancy/MultiTenancyConsts.cs b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/MultiTenancy/MultiTenancyConsts.cs
new file mode 100644
index 0000000..c4bfc19
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/MultiTenancy/MultiTenancyConsts.cs
@@ -0,0 +1,10 @@
+namespace Faster.Zheng.Winin.MultiTenancy;
+
+public static class MultiTenancyConsts
+{
+ /* Enable/disable multi-tenancy easily in a single point.
+ * If you will never need to multi-tenancy, you can remove
+ * related modules and code parts, including this file.
+ */
+ public const bool IsEnabled = true;
+}
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/WininDomainErrorCodes.cs b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/WininDomainErrorCodes.cs
new file mode 100644
index 0000000..d6c34f1
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/WininDomainErrorCodes.cs
@@ -0,0 +1,6 @@
+namespace Faster.Zheng.Winin;
+
+public static class WininDomainErrorCodes
+{
+ /* You can add your business exception error codes here, as constants */
+}
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/WininDomainSharedModule.cs b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/WininDomainSharedModule.cs
new file mode 100644
index 0000000..529c814
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/WininDomainSharedModule.cs
@@ -0,0 +1,58 @@
+using Faster.Zheng.Winin.Localization;
+using Volo.Abp.AuditLogging;
+using Volo.Abp.BackgroundJobs;
+using Volo.Abp.FeatureManagement;
+using Volo.Abp.Identity;
+using Volo.Abp.Localization;
+using Volo.Abp.Localization.ExceptionHandling;
+using Volo.Abp.Modularity;
+using Volo.Abp.OpenIddict;
+using Volo.Abp.PermissionManagement;
+using Volo.Abp.SettingManagement;
+using Volo.Abp.TenantManagement;
+using Volo.Abp.Validation.Localization;
+using Volo.Abp.VirtualFileSystem;
+
+namespace Faster.Zheng.Winin;
+
+[DependsOn(
+ typeof(AbpAuditLoggingDomainSharedModule),
+ typeof(AbpBackgroundJobsDomainSharedModule),
+ typeof(AbpFeatureManagementDomainSharedModule),
+ typeof(AbpIdentityDomainSharedModule),
+ typeof(AbpOpenIddictDomainSharedModule),
+ typeof(AbpPermissionManagementDomainSharedModule),
+ typeof(AbpSettingManagementDomainSharedModule),
+ typeof(AbpTenantManagementDomainSharedModule)
+ )]
+public class WininDomainSharedModule : AbpModule
+{
+ public override void PreConfigureServices(ServiceConfigurationContext context)
+ {
+ WininGlobalFeatureConfigurator.Configure();
+ WininModuleExtensionConfigurator.Configure();
+ }
+
+ public override void ConfigureServices(ServiceConfigurationContext context)
+ {
+ Configure(options =>
+ {
+ options.FileSets.AddEmbedded();
+ });
+
+ Configure(options =>
+ {
+ options.Resources
+ .Add("en")
+ .AddBaseTypes(typeof(AbpValidationResource))
+ .AddVirtualJson("/Localization/Winin");
+
+ options.DefaultResourceType = typeof(WininResource);
+ });
+
+ Configure(options =>
+ {
+ options.MapCodeNamespace("Winin", typeof(WininResource));
+ });
+ }
+}
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/WininGlobalFeatureConfigurator.cs b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/WininGlobalFeatureConfigurator.cs
new file mode 100644
index 0000000..f34cc61
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/WininGlobalFeatureConfigurator.cs
@@ -0,0 +1,22 @@
+using Volo.Abp.Threading;
+
+namespace Faster.Zheng.Winin;
+
+public static class WininGlobalFeatureConfigurator
+{
+ private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner();
+
+ public static void Configure()
+ {
+ OneTimeRunner.Run(() =>
+ {
+ /* You can configure (enable/disable) global features of the used modules here.
+ *
+ * YOU CAN SAFELY DELETE THIS CLASS AND REMOVE ITS USAGES IF YOU DON'T NEED TO IT!
+ *
+ * Please refer to the documentation to lear more about the Global Features System:
+ * https://docs.abp.io/en/abp/latest/Global-Features
+ */
+ });
+ }
+}
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/WininModuleExtensionConfigurator.cs b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/WininModuleExtensionConfigurator.cs
new file mode 100644
index 0000000..8d6b314
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain.Shared/WininModuleExtensionConfigurator.cs
@@ -0,0 +1,73 @@
+using System.ComponentModel.DataAnnotations;
+using Volo.Abp.Identity;
+using Volo.Abp.ObjectExtending;
+using Volo.Abp.Threading;
+
+namespace Faster.Zheng.Winin;
+
+public static class WininModuleExtensionConfigurator
+{
+ private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner();
+
+ public static void Configure()
+ {
+ OneTimeRunner.Run(() =>
+ {
+ ConfigureExistingProperties();
+ ConfigureExtraProperties();
+ });
+ }
+
+ private static void ConfigureExistingProperties()
+ {
+ /* You can change max lengths for properties of the
+ * entities defined in the modules used by your application.
+ *
+ * Example: Change user and role name max lengths
+
+ IdentityUserConsts.MaxNameLength = 99;
+ IdentityRoleConsts.MaxNameLength = 99;
+
+ * Notice: It is not suggested to change property lengths
+ * unless you really need it. Go with the standard values wherever possible.
+ *
+ * If you are using EF Core, you will need to run the add-migration command after your changes.
+ */
+ }
+
+ private static void ConfigureExtraProperties()
+ {
+ /* You can configure extra properties for the
+ * entities defined in the modules used by your application.
+ *
+ * This class can be used to define these extra properties
+ * with a high level, easy to use API.
+ *
+ * Example: Add a new property to the user entity of the identity module
+
+ ObjectExtensionManager.Instance.Modules()
+ .ConfigureIdentity(identity =>
+ {
+ identity.ConfigureUser(user =>
+ {
+ user.AddOrUpdateProperty( //property type: string
+ "SocialSecurityNumber", //property name
+ property =>
+ {
+ //validation rules
+ property.Attributes.Add(new RequiredAttribute());
+ property.Attributes.Add(new StringLengthAttribute(64) {MinimumLength = 4});
+
+ property.Configuration[IdentityModuleExtensionConsts.ConfigurationNames.AllowUserToEdit] = true;
+
+ //...other configurations for this property
+ }
+ );
+ });
+ });
+
+ * See the documentation for more:
+ * https://docs.abp.io/en/abp/latest/Module-Entity-Extensions
+ */
+ }
+}
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain/Data/IWininDbSchemaMigrator.cs b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain/Data/IWininDbSchemaMigrator.cs
new file mode 100644
index 0000000..bd6785c
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain/Data/IWininDbSchemaMigrator.cs
@@ -0,0 +1,8 @@
+using System.Threading.Tasks;
+
+namespace Faster.Zheng.Winin.Data;
+
+public interface IWininDbSchemaMigrator
+{
+ Task MigrateAsync();
+}
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain/Data/NullWininDbSchemaMigrator.cs b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain/Data/NullWininDbSchemaMigrator.cs
new file mode 100644
index 0000000..9703d79
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain/Data/NullWininDbSchemaMigrator.cs
@@ -0,0 +1,15 @@
+using System.Threading.Tasks;
+using Volo.Abp.DependencyInjection;
+
+namespace Faster.Zheng.Winin.Data;
+
+/* This is used if database provider does't define
+ * IWininDbSchemaMigrator implementation.
+ */
+public class NullWininDbSchemaMigrator : IWininDbSchemaMigrator, ITransientDependency
+{
+ public Task MigrateAsync()
+ {
+ return Task.CompletedTask;
+ }
+}
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain/Data/WininDbMigrationService.cs b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain/Data/WininDbMigrationService.cs
new file mode 100644
index 0000000..70e6a79
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain/Data/WininDbMigrationService.cs
@@ -0,0 +1,218 @@
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.IO;
+using System.Linq;
+using System.Runtime.InteropServices;
+using System.Threading.Tasks;
+using Microsoft.Extensions.Logging;
+using Microsoft.Extensions.Logging.Abstractions;
+using Volo.Abp.Data;
+using Volo.Abp.DependencyInjection;
+using Volo.Abp.Identity;
+using Volo.Abp.MultiTenancy;
+using Volo.Abp.TenantManagement;
+
+namespace Faster.Zheng.Winin.Data;
+
+public class WininDbMigrationService : ITransientDependency
+{
+ public ILogger Logger { get; set; }
+
+ private readonly IDataSeeder _dataSeeder;
+ private readonly IEnumerable _dbSchemaMigrators;
+ private readonly ITenantRepository _tenantRepository;
+ private readonly ICurrentTenant _currentTenant;
+
+ public WininDbMigrationService(
+ IDataSeeder dataSeeder,
+ IEnumerable dbSchemaMigrators,
+ ITenantRepository tenantRepository,
+ ICurrentTenant currentTenant)
+ {
+ _dataSeeder = dataSeeder;
+ _dbSchemaMigrators = dbSchemaMigrators;
+ _tenantRepository = tenantRepository;
+ _currentTenant = currentTenant;
+
+ Logger = NullLogger.Instance;
+ }
+
+ public async Task MigrateAsync()
+ {
+ var initialMigrationAdded = AddInitialMigrationIfNotExist();
+
+ if (initialMigrationAdded)
+ {
+ return;
+ }
+
+ Logger.LogInformation("Started database migrations...");
+
+ await MigrateDatabaseSchemaAsync();
+ await SeedDataAsync();
+
+ Logger.LogInformation($"Successfully completed host database migrations.");
+
+ var tenants = await _tenantRepository.GetListAsync(includeDetails: true);
+
+ var migratedDatabaseSchemas = new HashSet();
+ foreach (var tenant in tenants)
+ {
+ using (_currentTenant.Change(tenant.Id))
+ {
+ if (tenant.ConnectionStrings.Any())
+ {
+ var tenantConnectionStrings = tenant.ConnectionStrings
+ .Select(x => x.Value)
+ .ToList();
+
+ if (!migratedDatabaseSchemas.IsSupersetOf(tenantConnectionStrings))
+ {
+ await MigrateDatabaseSchemaAsync(tenant);
+
+ migratedDatabaseSchemas.AddIfNotContains(tenantConnectionStrings);
+ }
+ }
+
+ await SeedDataAsync(tenant);
+ }
+
+ Logger.LogInformation($"Successfully completed {tenant.Name} tenant database migrations.");
+ }
+
+ Logger.LogInformation("Successfully completed all database migrations.");
+ Logger.LogInformation("You can safely end this process...");
+ }
+
+ private async Task MigrateDatabaseSchemaAsync(Tenant? tenant = null)
+ {
+ Logger.LogInformation(
+ $"Migrating schema for {(tenant == null ? "host" : tenant.Name + " tenant")} database...");
+
+ foreach (var migrator in _dbSchemaMigrators)
+ {
+ await migrator.MigrateAsync();
+ }
+ }
+
+ private async Task SeedDataAsync(Tenant? tenant = null)
+ {
+ Logger.LogInformation($"Executing {(tenant == null ? "host" : tenant.Name + " tenant")} database seed...");
+
+ await _dataSeeder.SeedAsync(new DataSeedContext(tenant?.Id)
+ .WithProperty(IdentityDataSeedContributor.AdminEmailPropertyName, IdentityDataSeedContributor.AdminEmailDefaultValue)
+ .WithProperty(IdentityDataSeedContributor.AdminPasswordPropertyName, IdentityDataSeedContributor.AdminPasswordDefaultValue)
+ );
+ }
+
+ private bool AddInitialMigrationIfNotExist()
+ {
+ try
+ {
+ if (!DbMigrationsProjectExists())
+ {
+ return false;
+ }
+ }
+ catch (Exception)
+ {
+ return false;
+ }
+
+ try
+ {
+ if (!MigrationsFolderExists())
+ {
+ AddInitialMigration();
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+ catch (Exception e)
+ {
+ Logger.LogWarning("Couldn't determinate if any migrations exist : " + e.Message);
+ return false;
+ }
+ }
+
+ private bool DbMigrationsProjectExists()
+ {
+ var dbMigrationsProjectFolder = GetEntityFrameworkCoreProjectFolderPath();
+
+ return dbMigrationsProjectFolder != null;
+ }
+
+ private bool MigrationsFolderExists()
+ {
+ var dbMigrationsProjectFolder = GetEntityFrameworkCoreProjectFolderPath();
+ return dbMigrationsProjectFolder != null && Directory.Exists(Path.Combine(dbMigrationsProjectFolder, "Migrations"));
+ }
+
+ private void AddInitialMigration()
+ {
+ Logger.LogInformation("Creating initial migration...");
+
+ string argumentPrefix;
+ string fileName;
+
+ if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX) || RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
+ {
+ argumentPrefix = "-c";
+ fileName = "/bin/bash";
+ }
+ else
+ {
+ argumentPrefix = "/C";
+ fileName = "cmd.exe";
+ }
+
+ var procStartInfo = new ProcessStartInfo(fileName,
+ $"{argumentPrefix} \"abp create-migration-and-run-migrator \"{GetEntityFrameworkCoreProjectFolderPath()}\"\""
+ );
+
+ try
+ {
+ Process.Start(procStartInfo);
+ }
+ catch (Exception)
+ {
+ throw new Exception("Couldn't run ABP CLI...");
+ }
+ }
+
+ private string? GetEntityFrameworkCoreProjectFolderPath()
+ {
+ var slnDirectoryPath = GetSolutionDirectoryPath();
+
+ if (slnDirectoryPath == null)
+ {
+ throw new Exception("Solution folder not found!");
+ }
+
+ var srcDirectoryPath = Path.Combine(slnDirectoryPath, "src");
+
+ return Directory.GetDirectories(srcDirectoryPath)
+ .FirstOrDefault(d => d.EndsWith(".EntityFrameworkCore"));
+ }
+
+ private string? GetSolutionDirectoryPath()
+ {
+ var currentDirectory = new DirectoryInfo(Directory.GetCurrentDirectory());
+
+ while (currentDirectory != null && Directory.GetParent(currentDirectory.FullName) != null)
+ {
+ currentDirectory = Directory.GetParent(currentDirectory.FullName);
+
+ if (currentDirectory != null && Directory.GetFiles(currentDirectory.FullName).FirstOrDefault(f => f.EndsWith(".sln")) != null)
+ {
+ return currentDirectory.FullName;
+ }
+ }
+
+ return null;
+ }
+}
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain/Faster.Zheng.Winin.Domain.csproj b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain/Faster.Zheng.Winin.Domain.csproj
new file mode 100644
index 0000000..d37ff3c
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain/Faster.Zheng.Winin.Domain.csproj
@@ -0,0 +1,28 @@
+
+
+
+
+
+ net7.0
+ enable
+ Faster.Zheng.Winin
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain/OpenIddict/OpenIddictDataSeedContributor.cs b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain/OpenIddict/OpenIddictDataSeedContributor.cs
new file mode 100644
index 0000000..d3fdb98
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain/OpenIddict/OpenIddictDataSeedContributor.cs
@@ -0,0 +1,405 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using JetBrains.Annotations;
+using Microsoft.Extensions.Configuration;
+using Microsoft.Extensions.Localization;
+using OpenIddict.Abstractions;
+using Volo.Abp;
+using Volo.Abp.Authorization.Permissions;
+using Volo.Abp.Data;
+using Volo.Abp.DependencyInjection;
+using Volo.Abp.OpenIddict.Applications;
+using Volo.Abp.PermissionManagement;
+using Volo.Abp.Uow;
+
+namespace Faster.Zheng.Winin.OpenIddict;
+
+/* Creates initial data that is needed to property run the application
+ * and make client-to-server communication possible.
+ */
+public class OpenIddictDataSeedContributor : IDataSeedContributor, ITransientDependency
+{
+ private readonly IConfiguration _configuration;
+ private readonly IAbpApplicationManager _applicationManager;
+ private readonly IOpenIddictScopeManager _scopeManager;
+ private readonly IPermissionDataSeeder _permissionDataSeeder;
+ private readonly IStringLocalizer L;
+
+ public OpenIddictDataSeedContributor(
+ IConfiguration configuration,
+ IAbpApplicationManager applicationManager,
+ IOpenIddictScopeManager scopeManager,
+ IPermissionDataSeeder permissionDataSeeder,
+ IStringLocalizer l)
+ {
+ _configuration = configuration;
+ _applicationManager = applicationManager;
+ _scopeManager = scopeManager;
+ _permissionDataSeeder = permissionDataSeeder;
+ L = l;
+ }
+
+ [UnitOfWork]
+ public virtual async Task SeedAsync(DataSeedContext context)
+ {
+ await CreateScopesAsync();
+ await CreateApplicationsAsync();
+ }
+
+ private async Task CreateScopesAsync()
+ {
+ if (await _scopeManager.FindByNameAsync("Winin") == null)
+ {
+ await _scopeManager.CreateAsync(new OpenIddictScopeDescriptor
+ {
+ Name = "Winin",
+ DisplayName = "Winin API",
+ Resources =
+ {
+ "Winin"
+ }
+ });
+ }
+ }
+
+ private async Task CreateApplicationsAsync()
+ {
+ var commonScopes = new List
+ {
+ OpenIddictConstants.Permissions.Scopes.Address,
+ OpenIddictConstants.Permissions.Scopes.Email,
+ OpenIddictConstants.Permissions.Scopes.Phone,
+ OpenIddictConstants.Permissions.Scopes.Profile,
+ OpenIddictConstants.Permissions.Scopes.Roles,
+ "Winin"
+ };
+
+ var configurationSection = _configuration.GetSection("OpenIddict:Applications");
+
+ //Web Client
+ var webClientId = configurationSection["Winin_Web:ClientId"];
+ if (!webClientId.IsNullOrWhiteSpace())
+ {
+ var webClientRootUrl = configurationSection["Winin_Web:RootUrl"].EnsureEndsWith('/');
+
+ /* Winin_Web client is only needed if you created a tiered
+ * solution. Otherwise, you can delete this client. */
+ await CreateApplicationAsync(
+ name: webClientId!,
+ type: OpenIddictConstants.ClientTypes.Confidential,
+ consentType: OpenIddictConstants.ConsentTypes.Implicit,
+ displayName: "Web Application",
+ secret: configurationSection["Winin_Web:ClientSecret"] ?? "1q2w3e*",
+ grantTypes: new List //Hybrid flow
+ {
+ OpenIddictConstants.GrantTypes.AuthorizationCode,
+ OpenIddictConstants.GrantTypes.Implicit
+ },
+ scopes: commonScopes,
+ redirectUri: $"{webClientRootUrl}signin-oidc",
+ clientUri: webClientRootUrl,
+ postLogoutRedirectUri: $"{webClientRootUrl}signout-callback-oidc"
+ );
+ }
+
+ //Console Test / Angular Client
+ var consoleAndAngularClientId = configurationSection["Winin_App:ClientId"];
+ if (!consoleAndAngularClientId.IsNullOrWhiteSpace())
+ {
+ var consoleAndAngularClientRootUrl = configurationSection["Winin_App:RootUrl"]?.TrimEnd('/');
+ await CreateApplicationAsync(
+ name: consoleAndAngularClientId!,
+ type: OpenIddictConstants.ClientTypes.Public,
+ consentType: OpenIddictConstants.ConsentTypes.Implicit,
+ displayName: "Console Test / Angular Application",
+ secret: null,
+ grantTypes: new List
+ {
+ OpenIddictConstants.GrantTypes.AuthorizationCode,
+ OpenIddictConstants.GrantTypes.Password,
+ OpenIddictConstants.GrantTypes.ClientCredentials,
+ OpenIddictConstants.GrantTypes.RefreshToken
+ },
+ scopes: commonScopes,
+ redirectUri: consoleAndAngularClientRootUrl,
+ clientUri: consoleAndAngularClientRootUrl,
+ postLogoutRedirectUri: consoleAndAngularClientRootUrl
+ );
+ }
+
+ // Blazor Client
+ var blazorClientId = configurationSection["Winin_Blazor:ClientId"];
+ if (!blazorClientId.IsNullOrWhiteSpace())
+ {
+ var blazorRootUrl = configurationSection["Winin_Blazor:RootUrl"]?.TrimEnd('/');
+
+ await CreateApplicationAsync(
+ name: blazorClientId!,
+ type: OpenIddictConstants.ClientTypes.Public,
+ consentType: OpenIddictConstants.ConsentTypes.Implicit,
+ displayName: "Blazor Application",
+ secret: null,
+ grantTypes: new List
+ {
+ OpenIddictConstants.GrantTypes.AuthorizationCode,
+ },
+ scopes: commonScopes,
+ redirectUri: $"{blazorRootUrl}/authentication/login-callback",
+ clientUri: blazorRootUrl,
+ postLogoutRedirectUri: $"{blazorRootUrl}/authentication/logout-callback"
+ );
+ }
+
+ // Blazor Server Tiered Client
+ var blazorServerTieredClientId = configurationSection["Winin_BlazorServerTiered:ClientId"];
+ if (!blazorServerTieredClientId.IsNullOrWhiteSpace())
+ {
+ var blazorServerTieredRootUrl = configurationSection["Winin_BlazorServerTiered:RootUrl"].EnsureEndsWith('/');
+
+ await CreateApplicationAsync(
+ name: blazorServerTieredClientId!,
+ type: OpenIddictConstants.ClientTypes.Confidential,
+ consentType: OpenIddictConstants.ConsentTypes.Implicit,
+ displayName: "Blazor Server Application",
+ secret: configurationSection["Winin_BlazorServerTiered:ClientSecret"] ?? "1q2w3e*",
+ grantTypes: new List //Hybrid flow
+ {
+ OpenIddictConstants.GrantTypes.AuthorizationCode,
+ OpenIddictConstants.GrantTypes.Implicit
+ },
+ scopes: commonScopes,
+ redirectUri: $"{blazorServerTieredRootUrl}signin-oidc",
+ clientUri: blazorServerTieredRootUrl,
+ postLogoutRedirectUri: $"{blazorServerTieredRootUrl}signout-callback-oidc"
+ );
+ }
+
+ // Swagger Client
+ var swaggerClientId = configurationSection["Winin_Swagger:ClientId"];
+ if (!swaggerClientId.IsNullOrWhiteSpace())
+ {
+ var swaggerRootUrl = configurationSection["Winin_Swagger:RootUrl"]?.TrimEnd('/');
+
+ await CreateApplicationAsync(
+ name: swaggerClientId!,
+ type: OpenIddictConstants.ClientTypes.Public,
+ consentType: OpenIddictConstants.ConsentTypes.Implicit,
+ displayName: "Swagger Application",
+ secret: null,
+ grantTypes: new List
+ {
+ OpenIddictConstants.GrantTypes.AuthorizationCode,
+ },
+ scopes: commonScopes,
+ redirectUri: $"{swaggerRootUrl}/swagger/oauth2-redirect.html",
+ clientUri: swaggerRootUrl
+ );
+ }
+ }
+
+ private async Task CreateApplicationAsync(
+ [NotNull] string name,
+ [NotNull] string type,
+ [NotNull] string consentType,
+ string displayName,
+ string? secret,
+ List grantTypes,
+ List scopes,
+ string? clientUri = null,
+ string? redirectUri = null,
+ string? postLogoutRedirectUri = null,
+ List? permissions = null)
+ {
+ if (!string.IsNullOrEmpty(secret) && string.Equals(type, OpenIddictConstants.ClientTypes.Public, StringComparison.OrdinalIgnoreCase))
+ {
+ throw new BusinessException(L["NoClientSecretCanBeSetForPublicApplications"]);
+ }
+
+ if (string.IsNullOrEmpty(secret) && string.Equals(type, OpenIddictConstants.ClientTypes.Confidential, StringComparison.OrdinalIgnoreCase))
+ {
+ throw new BusinessException(L["TheClientSecretIsRequiredForConfidentialApplications"]);
+ }
+
+ if (!string.IsNullOrEmpty(name) && await _applicationManager.FindByClientIdAsync(name) != null)
+ {
+ return;
+ //throw new BusinessException(L["TheClientIdentifierIsAlreadyTakenByAnotherApplication"]);
+ }
+
+ var client = await _applicationManager.FindByClientIdAsync(name);
+ if (client == null)
+ {
+ var application = new AbpApplicationDescriptor
+ {
+ ClientId = name,
+ Type = type,
+ ClientSecret = secret,
+ ConsentType = consentType,
+ DisplayName = displayName,
+ ClientUri = clientUri,
+ };
+
+ Check.NotNullOrEmpty(grantTypes, nameof(grantTypes));
+ Check.NotNullOrEmpty(scopes, nameof(scopes));
+
+ if (new [] { OpenIddictConstants.GrantTypes.AuthorizationCode, OpenIddictConstants.GrantTypes.Implicit }.All(grantTypes.Contains))
+ {
+ application.Permissions.Add(OpenIddictConstants.Permissions.ResponseTypes.CodeIdToken);
+
+ if (string.Equals(type, OpenIddictConstants.ClientTypes.Public, StringComparison.OrdinalIgnoreCase))
+ {
+ application.Permissions.Add(OpenIddictConstants.Permissions.ResponseTypes.CodeIdTokenToken);
+ application.Permissions.Add(OpenIddictConstants.Permissions.ResponseTypes.CodeToken);
+ }
+ }
+
+ if (!redirectUri.IsNullOrWhiteSpace() || !postLogoutRedirectUri.IsNullOrWhiteSpace())
+ {
+ application.Permissions.Add(OpenIddictConstants.Permissions.Endpoints.Logout);
+ }
+
+ var buildInGrantTypes = new []
+ {
+ OpenIddictConstants.GrantTypes.Implicit,
+ OpenIddictConstants.GrantTypes.Password,
+ OpenIddictConstants.GrantTypes.AuthorizationCode,
+ OpenIddictConstants.GrantTypes.ClientCredentials,
+ OpenIddictConstants.GrantTypes.DeviceCode,
+ OpenIddictConstants.GrantTypes.RefreshToken
+ };
+
+ foreach (var grantType in grantTypes)
+ {
+ if (grantType == OpenIddictConstants.GrantTypes.AuthorizationCode)
+ {
+ application.Permissions.Add(OpenIddictConstants.Permissions.GrantTypes.AuthorizationCode);
+ application.Permissions.Add(OpenIddictConstants.Permissions.ResponseTypes.Code);
+ }
+
+ if (grantType == OpenIddictConstants.GrantTypes.AuthorizationCode || grantType == OpenIddictConstants.GrantTypes.Implicit)
+ {
+ application.Permissions.Add(OpenIddictConstants.Permissions.Endpoints.Authorization);
+ }
+
+ if (grantType == OpenIddictConstants.GrantTypes.AuthorizationCode ||
+ grantType == OpenIddictConstants.GrantTypes.ClientCredentials ||
+ grantType == OpenIddictConstants.GrantTypes.Password ||
+ grantType == OpenIddictConstants.GrantTypes.RefreshToken ||
+ grantType == OpenIddictConstants.GrantTypes.DeviceCode)
+ {
+ application.Permissions.Add(OpenIddictConstants.Permissions.Endpoints.Token);
+ application.Permissions.Add(OpenIddictConstants.Permissions.Endpoints.Revocation);
+ application.Permissions.Add(OpenIddictConstants.Permissions.Endpoints.Introspection);
+ }
+
+ if (grantType == OpenIddictConstants.GrantTypes.ClientCredentials)
+ {
+ application.Permissions.Add(OpenIddictConstants.Permissions.GrantTypes.ClientCredentials);
+ }
+
+ if (grantType == OpenIddictConstants.GrantTypes.Implicit)
+ {
+ application.Permissions.Add(OpenIddictConstants.Permissions.GrantTypes.Implicit);
+ }
+
+ if (grantType == OpenIddictConstants.GrantTypes.Password)
+ {
+ application.Permissions.Add(OpenIddictConstants.Permissions.GrantTypes.Password);
+ }
+
+ if (grantType == OpenIddictConstants.GrantTypes.RefreshToken)
+ {
+ application.Permissions.Add(OpenIddictConstants.Permissions.GrantTypes.RefreshToken);
+ }
+
+ if (grantType == OpenIddictConstants.GrantTypes.DeviceCode)
+ {
+ application.Permissions.Add(OpenIddictConstants.Permissions.GrantTypes.DeviceCode);
+ application.Permissions.Add(OpenIddictConstants.Permissions.Endpoints.Device);
+ }
+
+ if (grantType == OpenIddictConstants.GrantTypes.Implicit)
+ {
+ application.Permissions.Add(OpenIddictConstants.Permissions.ResponseTypes.IdToken);
+ if (string.Equals(type, OpenIddictConstants.ClientTypes.Public, StringComparison.OrdinalIgnoreCase))
+ {
+ application.Permissions.Add(OpenIddictConstants.Permissions.ResponseTypes.IdTokenToken);
+ application.Permissions.Add(OpenIddictConstants.Permissions.ResponseTypes.Token);
+ }
+ }
+
+ if (!buildInGrantTypes.Contains(grantType))
+ {
+ application.Permissions.Add(OpenIddictConstants.Permissions.Prefixes.GrantType + grantType);
+ }
+ }
+
+ var buildInScopes = new []
+ {
+ OpenIddictConstants.Permissions.Scopes.Address,
+ OpenIddictConstants.Permissions.Scopes.Email,
+ OpenIddictConstants.Permissions.Scopes.Phone,
+ OpenIddictConstants.Permissions.Scopes.Profile,
+ OpenIddictConstants.Permissions.Scopes.Roles
+ };
+
+ foreach (var scope in scopes)
+ {
+ if (buildInScopes.Contains(scope))
+ {
+ application.Permissions.Add(scope);
+ }
+ else
+ {
+ application.Permissions.Add(OpenIddictConstants.Permissions.Prefixes.Scope + scope);
+ }
+ }
+
+ if (redirectUri != null)
+ {
+ if (!redirectUri.IsNullOrEmpty())
+ {
+ if (!Uri.TryCreate(redirectUri, UriKind.Absolute, out var uri) || !uri.IsWellFormedOriginalString())
+ {
+ throw new BusinessException(L["InvalidRedirectUri", redirectUri]);
+ }
+
+ if (application.RedirectUris.All(x => x != uri))
+ {
+ application.RedirectUris.Add(uri);
+ }
+ }
+ }
+
+ if (postLogoutRedirectUri != null)
+ {
+ if (!postLogoutRedirectUri.IsNullOrEmpty())
+ {
+ if (!Uri.TryCreate(postLogoutRedirectUri, UriKind.Absolute, out var uri) || !uri.IsWellFormedOriginalString())
+ {
+ throw new BusinessException(L["InvalidPostLogoutRedirectUri", postLogoutRedirectUri]);
+ }
+
+ if (application.PostLogoutRedirectUris.All(x => x != uri))
+ {
+ application.PostLogoutRedirectUris.Add(uri);
+ }
+ }
+ }
+
+ if (permissions != null)
+ {
+ await _permissionDataSeeder.SeedAsync(
+ ClientPermissionValueProvider.ProviderName,
+ name,
+ permissions,
+ null
+ );
+ }
+
+ await _applicationManager.CreateAsync(application);
+ }
+ }
+}
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain/Properties/AssemblyInfo.cs b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..dcaae22
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain/Properties/AssemblyInfo.cs
@@ -0,0 +1,3 @@
+using System.Runtime.CompilerServices;
+[assembly:InternalsVisibleToAttribute("Faster.Zheng.Winin.Domain.Tests")]
+[assembly:InternalsVisibleToAttribute("Faster.Zheng.Winin.TestBase")]
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain/Settings/WininSettingDefinitionProvider.cs b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain/Settings/WininSettingDefinitionProvider.cs
new file mode 100644
index 0000000..7ebf6e2
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain/Settings/WininSettingDefinitionProvider.cs
@@ -0,0 +1,12 @@
+using Volo.Abp.Settings;
+
+namespace Faster.Zheng.Winin.Settings;
+
+public class WininSettingDefinitionProvider : SettingDefinitionProvider
+{
+ public override void Define(ISettingDefinitionContext context)
+ {
+ //Define your own settings here. Example:
+ //context.Add(new SettingDefinition(WininSettings.MySetting1));
+ }
+}
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain/Settings/WininSettings.cs b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain/Settings/WininSettings.cs
new file mode 100644
index 0000000..76dfec9
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain/Settings/WininSettings.cs
@@ -0,0 +1,9 @@
+namespace Faster.Zheng.Winin.Settings;
+
+public static class WininSettings
+{
+ private const string Prefix = "Winin";
+
+ //Add your own setting names here. Example:
+ //public const string MySetting1 = Prefix + ".MySetting1";
+}
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain/WininConsts.cs b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain/WininConsts.cs
new file mode 100644
index 0000000..840bf83
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain/WininConsts.cs
@@ -0,0 +1,8 @@
+namespace Faster.Zheng.Winin;
+
+public static class WininConsts
+{
+ public const string DbTablePrefix = "App";
+
+ public const string DbSchema = null;
+}
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain/WininDomainModule.cs b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain/WininDomainModule.cs
new file mode 100644
index 0000000..ee917cf
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Domain/WininDomainModule.cs
@@ -0,0 +1,68 @@
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.DependencyInjection.Extensions;
+using Faster.Zheng.Winin.MultiTenancy;
+using Volo.Abp.AuditLogging;
+using Volo.Abp.BackgroundJobs;
+using Volo.Abp.Emailing;
+using Volo.Abp.FeatureManagement;
+using Volo.Abp.Identity;
+using Volo.Abp.Localization;
+using Volo.Abp.Modularity;
+using Volo.Abp.MultiTenancy;
+using Volo.Abp.OpenIddict;
+using Volo.Abp.PermissionManagement.Identity;
+using Volo.Abp.PermissionManagement.OpenIddict;
+using Volo.Abp.SettingManagement;
+using Volo.Abp.TenantManagement;
+
+namespace Faster.Zheng.Winin;
+
+[DependsOn(
+ typeof(WininDomainSharedModule),
+ typeof(AbpAuditLoggingDomainModule),
+ typeof(AbpBackgroundJobsDomainModule),
+ typeof(AbpFeatureManagementDomainModule),
+ typeof(AbpIdentityDomainModule),
+ typeof(AbpOpenIddictDomainModule),
+ typeof(AbpPermissionManagementDomainOpenIddictModule),
+ typeof(AbpPermissionManagementDomainIdentityModule),
+ typeof(AbpSettingManagementDomainModule),
+ typeof(AbpTenantManagementDomainModule),
+ typeof(AbpEmailingModule)
+)]
+public class WininDomainModule : AbpModule
+{
+ public override void ConfigureServices(ServiceConfigurationContext context)
+ {
+ Configure(options =>
+ {
+ options.Languages.Add(new LanguageInfo("ar", "ar", "العربية", "ae"));
+ options.Languages.Add(new LanguageInfo("cs", "cs", "Čeština"));
+ options.Languages.Add(new LanguageInfo("en", "en", "English", "gb"));
+ options.Languages.Add(new LanguageInfo("en-GB", "en-GB", "English (UK)"));
+ options.Languages.Add(new LanguageInfo("hu", "hu", "Magyar"));
+ options.Languages.Add(new LanguageInfo("hr", "hr", "Croatian"));
+ options.Languages.Add(new LanguageInfo("fi", "fi", "Finnish", "fi"));
+ options.Languages.Add(new LanguageInfo("fr", "fr", "Français", "fr"));
+ options.Languages.Add(new LanguageInfo("hi", "hi", "Hindi", "in"));
+ options.Languages.Add(new LanguageInfo("it", "it", "Italiano", "it"));
+ options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português"));
+ options.Languages.Add(new LanguageInfo("ru", "ru", "Русский", "ru"));
+ options.Languages.Add(new LanguageInfo("sk", "sk", "Slovak", "sk"));
+ options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe", "tr"));
+ options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文"));
+ options.Languages.Add(new LanguageInfo("zh-Hant", "zh-Hant", "繁體中文"));
+ options.Languages.Add(new LanguageInfo("de-DE", "de-DE", "Deutsch", "de"));
+ options.Languages.Add(new LanguageInfo("es", "es", "Español"));
+ });
+
+ Configure(options =>
+ {
+ options.IsEnabled = MultiTenancyConsts.IsEnabled;
+ });
+
+#if DEBUG
+ context.Services.Replace(ServiceDescriptor.Singleton());
+#endif
+ }
+}
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.EntityFrameworkCore/EntityFrameworkCore/EntityFrameworkCoreWininDbSchemaMigrator.cs b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.EntityFrameworkCore/EntityFrameworkCore/EntityFrameworkCoreWininDbSchemaMigrator.cs
new file mode 100644
index 0000000..00c6690
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.EntityFrameworkCore/EntityFrameworkCore/EntityFrameworkCoreWininDbSchemaMigrator.cs
@@ -0,0 +1,34 @@
+using System;
+using System.Threading.Tasks;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.Extensions.DependencyInjection;
+using Faster.Zheng.Winin.Data;
+using Volo.Abp.DependencyInjection;
+
+namespace Faster.Zheng.Winin.EntityFrameworkCore;
+
+public class EntityFrameworkCoreWininDbSchemaMigrator
+ : IWininDbSchemaMigrator, ITransientDependency
+{
+ private readonly IServiceProvider _serviceProvider;
+
+ public EntityFrameworkCoreWininDbSchemaMigrator(
+ IServiceProvider serviceProvider)
+ {
+ _serviceProvider = serviceProvider;
+ }
+
+ public async Task MigrateAsync()
+ {
+ /* We intentionally resolving the WininDbContext
+ * from IServiceProvider (instead of directly injecting it)
+ * to properly get the connection string of the current tenant in the
+ * current scope.
+ */
+
+ await _serviceProvider
+ .GetRequiredService()
+ .Database
+ .MigrateAsync();
+ }
+}
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.EntityFrameworkCore/EntityFrameworkCore/WininDbContext.cs b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.EntityFrameworkCore/EntityFrameworkCore/WininDbContext.cs
new file mode 100644
index 0000000..6c5fb4a
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.EntityFrameworkCore/EntityFrameworkCore/WininDbContext.cs
@@ -0,0 +1,86 @@
+using Microsoft.EntityFrameworkCore;
+using Volo.Abp.AuditLogging.EntityFrameworkCore;
+using Volo.Abp.BackgroundJobs.EntityFrameworkCore;
+using Volo.Abp.Data;
+using Volo.Abp.DependencyInjection;
+using Volo.Abp.EntityFrameworkCore;
+using Volo.Abp.FeatureManagement.EntityFrameworkCore;
+using Volo.Abp.Identity;
+using Volo.Abp.Identity.EntityFrameworkCore;
+using Volo.Abp.OpenIddict.EntityFrameworkCore;
+using Volo.Abp.PermissionManagement.EntityFrameworkCore;
+using Volo.Abp.SettingManagement.EntityFrameworkCore;
+using Volo.Abp.TenantManagement;
+using Volo.Abp.TenantManagement.EntityFrameworkCore;
+
+namespace Faster.Zheng.Winin.EntityFrameworkCore;
+
+[ReplaceDbContext(typeof(IIdentityDbContext))]
+[ReplaceDbContext(typeof(ITenantManagementDbContext))]
+[ConnectionStringName("Default")]
+public class WininDbContext :
+ AbpDbContext,
+ IIdentityDbContext,
+ ITenantManagementDbContext
+{
+ /* Add DbSet properties for your Aggregate Roots / Entities here. */
+
+ #region Entities from the modules
+
+ /* Notice: We only implemented IIdentityDbContext and ITenantManagementDbContext
+ * and replaced them for this DbContext. This allows you to perform JOIN
+ * queries for the entities of these modules over the repositories easily. You
+ * typically don't need that for other modules. But, if you need, you can
+ * implement the DbContext interface of the needed module and use ReplaceDbContext
+ * attribute just like IIdentityDbContext and ITenantManagementDbContext.
+ *
+ * More info: Replacing a DbContext of a module ensures that the related module
+ * uses this DbContext on runtime. Otherwise, it will use its own DbContext class.
+ */
+
+ //Identity
+ public DbSet Users { get; set; }
+ public DbSet Roles { get; set; }
+ public DbSet ClaimTypes { get; set; }
+ public DbSet OrganizationUnits { get; set; }
+ public DbSet SecurityLogs { get; set; }
+ public DbSet LinkUsers { get; set; }
+ public DbSet UserDelegations { get; set; }
+
+ // Tenant Management
+ public DbSet Tenants { get; set; }
+ public DbSet TenantConnectionStrings { get; set; }
+
+ #endregion
+
+ public WininDbContext(DbContextOptions options)
+ : base(options)
+ {
+
+ }
+
+ protected override void OnModelCreating(ModelBuilder builder)
+ {
+ base.OnModelCreating(builder);
+
+ /* Include modules to your migration db context */
+
+ builder.ConfigurePermissionManagement();
+ builder.ConfigureSettingManagement();
+ builder.ConfigureBackgroundJobs();
+ builder.ConfigureAuditLogging();
+ builder.ConfigureIdentity();
+ builder.ConfigureOpenIddict();
+ builder.ConfigureFeatureManagement();
+ builder.ConfigureTenantManagement();
+
+ /* Configure your own tables/entities inside here */
+
+ //builder.Entity(b =>
+ //{
+ // b.ToTable(WininConsts.DbTablePrefix + "YourEntities", WininConsts.DbSchema);
+ // b.ConfigureByConvention(); //auto configure for the base class props
+ // //...
+ //});
+ }
+}
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.EntityFrameworkCore/EntityFrameworkCore/WininDbContextFactory.cs b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.EntityFrameworkCore/EntityFrameworkCore/WininDbContextFactory.cs
new file mode 100644
index 0000000..2e958cf
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.EntityFrameworkCore/EntityFrameworkCore/WininDbContextFactory.cs
@@ -0,0 +1,33 @@
+using System;
+using System.IO;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Design;
+using Microsoft.Extensions.Configuration;
+
+namespace Faster.Zheng.Winin.EntityFrameworkCore;
+
+/* This class is needed for EF Core console commands
+ * (like Add-Migration and Update-Database commands) */
+public class WininDbContextFactory : IDesignTimeDbContextFactory
+{
+ public WininDbContext CreateDbContext(string[] args)
+ {
+ WininEfCoreEntityExtensionMappings.Configure();
+
+ var configuration = BuildConfiguration();
+
+ var builder = new DbContextOptionsBuilder()
+ .UseSqlServer(configuration.GetConnectionString("Default"));
+
+ return new WininDbContext(builder.Options);
+ }
+
+ private static IConfigurationRoot BuildConfiguration()
+ {
+ var builder = new ConfigurationBuilder()
+ .SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), "../Faster.Zheng.Winin.DbMigrator/"))
+ .AddJsonFile("appsettings.json", optional: false);
+
+ return builder.Build();
+ }
+}
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.EntityFrameworkCore/EntityFrameworkCore/WininEfCoreEntityExtensionMappings.cs b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.EntityFrameworkCore/EntityFrameworkCore/WininEfCoreEntityExtensionMappings.cs
new file mode 100644
index 0000000..13ae755
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.EntityFrameworkCore/EntityFrameworkCore/WininEfCoreEntityExtensionMappings.cs
@@ -0,0 +1,44 @@
+using Microsoft.EntityFrameworkCore;
+using Volo.Abp.Identity;
+using Volo.Abp.ObjectExtending;
+using Volo.Abp.Threading;
+
+namespace Faster.Zheng.Winin.EntityFrameworkCore;
+
+public static class WininEfCoreEntityExtensionMappings
+{
+ private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner();
+
+ public static void Configure()
+ {
+ WininGlobalFeatureConfigurator.Configure();
+ WininModuleExtensionConfigurator.Configure();
+
+ OneTimeRunner.Run(() =>
+ {
+ /* You can configure extra properties for the
+ * entities defined in the modules used by your application.
+ *
+ * This class can be used to map these extra properties to table fields in the database.
+ *
+ * USE THIS CLASS ONLY TO CONFIGURE EF CORE RELATED MAPPING.
+ * USE WininModuleExtensionConfigurator CLASS (in the Domain.Shared project)
+ * FOR A HIGH LEVEL API TO DEFINE EXTRA PROPERTIES TO ENTITIES OF THE USED MODULES
+ *
+ * Example: Map a property to a table field:
+
+ ObjectExtensionManager.Instance
+ .MapEfCoreProperty(
+ "MyProperty",
+ (entityBuilder, propertyBuilder) =>
+ {
+ propertyBuilder.HasMaxLength(128);
+ }
+ );
+
+ * See the documentation for more:
+ * https://docs.abp.io/en/abp/latest/Customizing-Application-Modules-Extending-Entities
+ */
+ });
+ }
+}
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.EntityFrameworkCore/EntityFrameworkCore/WininEntityFrameworkCoreModule.cs b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.EntityFrameworkCore/EntityFrameworkCore/WininEntityFrameworkCoreModule.cs
new file mode 100644
index 0000000..6cd5cb9
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.EntityFrameworkCore/EntityFrameworkCore/WininEntityFrameworkCoreModule.cs
@@ -0,0 +1,54 @@
+using System;
+using Microsoft.Extensions.DependencyInjection;
+using Volo.Abp.Uow;
+using Volo.Abp.AuditLogging.EntityFrameworkCore;
+using Volo.Abp.BackgroundJobs.EntityFrameworkCore;
+using Volo.Abp.EntityFrameworkCore;
+using Volo.Abp.EntityFrameworkCore.SqlServer;
+using Volo.Abp.FeatureManagement.EntityFrameworkCore;
+using Volo.Abp.Identity.EntityFrameworkCore;
+using Volo.Abp.Modularity;
+using Volo.Abp.OpenIddict.EntityFrameworkCore;
+using Volo.Abp.PermissionManagement.EntityFrameworkCore;
+using Volo.Abp.SettingManagement.EntityFrameworkCore;
+using Volo.Abp.TenantManagement.EntityFrameworkCore;
+
+namespace Faster.Zheng.Winin.EntityFrameworkCore;
+
+[DependsOn(
+ typeof(WininDomainModule),
+ typeof(AbpIdentityEntityFrameworkCoreModule),
+ typeof(AbpOpenIddictEntityFrameworkCoreModule),
+ typeof(AbpPermissionManagementEntityFrameworkCoreModule),
+ typeof(AbpSettingManagementEntityFrameworkCoreModule),
+ typeof(AbpEntityFrameworkCoreSqlServerModule),
+ typeof(AbpBackgroundJobsEntityFrameworkCoreModule),
+ typeof(AbpAuditLoggingEntityFrameworkCoreModule),
+ typeof(AbpTenantManagementEntityFrameworkCoreModule),
+ typeof(AbpFeatureManagementEntityFrameworkCoreModule)
+ )]
+public class WininEntityFrameworkCoreModule : AbpModule
+{
+ public override void PreConfigureServices(ServiceConfigurationContext context)
+ {
+ WininEfCoreEntityExtensionMappings.Configure();
+ }
+
+ public override void ConfigureServices(ServiceConfigurationContext context)
+ {
+ context.Services.AddAbpDbContext(options =>
+ {
+ /* Remove "includeAllEntities: true" to create
+ * default repositories only for aggregate roots */
+ options.AddDefaultRepositories(includeAllEntities: true);
+ });
+
+ Configure(options =>
+ {
+ /* The main point to change your DBMS.
+ * See also WininMigrationsDbContextFactory for EF Core tooling. */
+ options.UseSqlServer();
+ });
+
+ }
+}
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.EntityFrameworkCore/Faster.Zheng.Winin.EntityFrameworkCore.csproj b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.EntityFrameworkCore/Faster.Zheng.Winin.EntityFrameworkCore.csproj
new file mode 100644
index 0000000..bd33cec
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.EntityFrameworkCore/Faster.Zheng.Winin.EntityFrameworkCore.csproj
@@ -0,0 +1,31 @@
+
+
+
+
+
+ net7.0
+ enable
+ Faster.Zheng.Winin
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers
+
+
+
+
diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.EntityFrameworkCore/Migrations/20230614050503_Initial.Designer.cs b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.EntityFrameworkCore/Migrations/20230614050503_Initial.Designer.cs
new file mode 100644
index 0000000..69572f4
--- /dev/null
+++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.EntityFrameworkCore/Migrations/20230614050503_Initial.Designer.cs
@@ -0,0 +1,1870 @@
+//
+using System;
+using Faster.Zheng.Winin.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Volo.Abp.EntityFrameworkCore;
+
+#nullable disable
+
+namespace Faster.Zheng.Winin.Migrations
+{
+ [DbContext(typeof(WininDbContext))]
+ [Migration("20230614050503_Initial")]
+ partial class Initial
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer)
+ .HasAnnotation("ProductVersion", "7.0.1")
+ .HasAnnotation("Relational:MaxIdentifierLength", 128);
+
+ SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
+
+ modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ApplicationName")
+ .HasMaxLength(96)
+ .HasColumnType("nvarchar(96)")
+ .HasColumnName("ApplicationName");
+
+ b.Property("BrowserInfo")
+ .HasMaxLength(512)
+ .HasColumnType("nvarchar(512)")
+ .HasColumnName("BrowserInfo");
+
+ b.Property("ClientId")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)")
+ .HasColumnName("ClientId");
+
+ b.Property("ClientIpAddress")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)")
+ .HasColumnName("ClientIpAddress");
+
+ b.Property("ClientName")
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)")
+ .HasColumnName("ClientName");
+
+ b.Property("Comments")
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)")
+ .HasColumnName("Comments");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("nvarchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CorrelationId")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)")
+ .HasColumnName("CorrelationId");
+
+ b.Property("Exceptions")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ExecutionDuration")
+ .HasColumnType("int")
+ .HasColumnName("ExecutionDuration");
+
+ b.Property("ExecutionTime")
+ .HasColumnType("datetime2");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("HttpMethod")
+ .HasMaxLength(16)
+ .HasColumnType("nvarchar(16)")
+ .HasColumnName("HttpMethod");
+
+ b.Property("HttpStatusCode")
+ .HasColumnType("int")
+ .HasColumnName("HttpStatusCode");
+
+ b.Property("ImpersonatorTenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("ImpersonatorTenantId");
+
+ b.Property("ImpersonatorTenantName")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)")
+ .HasColumnName("ImpersonatorTenantName");
+
+ b.Property("ImpersonatorUserId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("ImpersonatorUserId");
+
+ b.Property("ImpersonatorUserName")
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)")
+ .HasColumnName("ImpersonatorUserName");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.Property("TenantName")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)")
+ .HasColumnName("TenantName");
+
+ b.Property("Url")
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)")
+ .HasColumnName("Url");
+
+ b.Property("UserId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("UserId");
+
+ b.Property("UserName")
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)")
+ .HasColumnName("UserName");
+
+ b.HasKey("Id");
+
+ b.HasIndex("TenantId", "ExecutionTime");
+
+ b.HasIndex("TenantId", "UserId", "ExecutionTime");
+
+ b.ToTable("AbpAuditLogs", (string)null);
+ });
+
+ modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("AuditLogId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("AuditLogId");
+
+ b.Property("ExecutionDuration")
+ .HasColumnType("int")
+ .HasColumnName("ExecutionDuration");
+
+ b.Property("ExecutionTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("ExecutionTime");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("MethodName")
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)")
+ .HasColumnName("MethodName");
+
+ b.Property("Parameters")
+ .HasMaxLength(2000)
+ .HasColumnType("nvarchar(2000)")
+ .HasColumnName("Parameters");
+
+ b.Property("ServiceName")
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)")
+ .HasColumnName("ServiceName");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("AuditLogId");
+
+ b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime");
+
+ b.ToTable("AbpAuditLogActions", (string)null);
+ });
+
+ modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("AuditLogId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("AuditLogId");
+
+ b.Property("ChangeTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("ChangeTime");
+
+ b.Property("ChangeType")
+ .HasColumnType("tinyint")
+ .HasColumnName("ChangeType");
+
+ b.Property("EntityId")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)")
+ .HasColumnName("EntityId");
+
+ b.Property("EntityTenantId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("EntityTypeFullName")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)")
+ .HasColumnName("EntityTypeFullName");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("AuditLogId");
+
+ b.HasIndex("TenantId", "EntityTypeFullName", "EntityId");
+
+ b.ToTable("AbpEntityChanges", (string)null);
+ });
+
+ modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("EntityChangeId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("NewValue")
+ .HasMaxLength(512)
+ .HasColumnType("nvarchar(512)")
+ .HasColumnName("NewValue");
+
+ b.Property("OriginalValue")
+ .HasMaxLength(512)
+ .HasColumnType("nvarchar(512)")
+ .HasColumnName("OriginalValue");
+
+ b.Property("PropertyName")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)")
+ .HasColumnName("PropertyName");
+
+ b.Property("PropertyTypeFullName")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)")
+ .HasColumnName("PropertyTypeFullName");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("EntityChangeId");
+
+ b.ToTable("AbpEntityPropertyChanges", (string)null);
+ });
+
+ modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("nvarchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("IsAbandoned")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(false);
+
+ b.Property("JobArgs")
+ .IsRequired()
+ .HasMaxLength(1048576)
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("JobName")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)");
+
+ b.Property("LastTryTime")
+ .HasColumnType("datetime2");
+
+ b.Property("NextTryTime")
+ .HasColumnType("datetime2");
+
+ b.Property("Priority")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("tinyint")
+ .HasDefaultValue((byte)15);
+
+ b.Property("TryCount")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("smallint")
+ .HasDefaultValue((short)0);
+
+ b.HasKey("Id");
+
+ b.HasIndex("IsAbandoned", "NextTryTime");
+
+ b.ToTable("AbpBackgroundJobs", (string)null);
+ });
+
+ modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureDefinitionRecord", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("AllowedProviders")
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
+
+ b.Property("DefaultValue")
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
+
+ b.Property("Description")
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
+
+ b.Property("DisplayName")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("GroupName")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)");
+
+ b.Property("IsAvailableToHost")
+ .HasColumnType("bit");
+
+ b.Property("IsVisibleToClients")
+ .HasColumnType("bit");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)");
+
+ b.Property("ParentName")
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)");
+
+ b.Property("ValueType")
+ .HasMaxLength(2048)
+ .HasColumnType("nvarchar(2048)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("GroupName");
+
+ b.HasIndex("Name")
+ .IsUnique();
+
+ b.ToTable("AbpFeatures", (string)null);
+ });
+
+ modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureGroupDefinitionRecord", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DisplayName")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Name")
+ .IsUnique();
+
+ b.ToTable("AbpFeatureGroups", (string)null);
+ });
+
+ modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)");
+
+ b.Property("ProviderKey")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("ProviderName")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("Value")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Name", "ProviderName", "ProviderKey")
+ .IsUnique()
+ .HasFilter("[ProviderName] IS NOT NULL AND [ProviderKey] IS NOT NULL");
+
+ b.ToTable("AbpFeatureValues", (string)null);
+ });
+
+ modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("nvarchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("Description")
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("IsStatic")
+ .HasColumnType("bit");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
+
+ b.Property("Regex")
+ .HasMaxLength(512)
+ .HasColumnType("nvarchar(512)");
+
+ b.Property("RegexDescription")
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)");
+
+ b.Property("Required")
+ .HasColumnType("bit");
+
+ b.Property("ValueType")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.ToTable("AbpClaimTypes", (string)null);
+ });
+
+ modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("SourceTenantId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("SourceUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TargetTenantId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TargetUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId")
+ .IsUnique()
+ .HasFilter("[SourceTenantId] IS NOT NULL AND [TargetTenantId] IS NOT NULL");
+
+ b.ToTable("AbpLinkUsers", (string)null);
+ });
+
+ modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("nvarchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("EntityVersion")
+ .HasColumnType("int");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("IsDefault")
+ .HasColumnType("bit")
+ .HasColumnName("IsDefault");
+
+ b.Property("IsPublic")
+ .HasColumnType("bit")
+ .HasColumnName("IsPublic");
+
+ b.Property("IsStatic")
+ .HasColumnType("bit")
+ .HasColumnName("IsStatic");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
+
+ b.Property("NormalizedName")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("NormalizedName");
+
+ b.ToTable("AbpRoles", (string)null);
+ });
+
+ modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ClaimType")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
+
+ b.Property("ClaimValue")
+ .HasMaxLength(1024)
+ .HasColumnType("nvarchar(1024)");
+
+ b.Property("RoleId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("RoleId");
+
+ b.ToTable("AbpRoleClaims", (string)null);
+ });
+
+ modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Action")
+ .HasMaxLength(96)
+ .HasColumnType("nvarchar(96)");
+
+ b.Property("ApplicationName")
+ .HasMaxLength(96)
+ .HasColumnType("nvarchar(96)");
+
+ b.Property("BrowserInfo")
+ .HasMaxLength(512)
+ .HasColumnType("nvarchar(512)");
+
+ b.Property("ClientId")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("ClientIpAddress")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("nvarchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CorrelationId")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("Identity")
+ .HasMaxLength(96)
+ .HasColumnType("nvarchar(96)");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.Property("TenantName")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("UserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("UserName")
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("TenantId", "Action");
+
+ b.HasIndex("TenantId", "ApplicationName");
+
+ b.HasIndex("TenantId", "Identity");
+
+ b.HasIndex("TenantId", "UserId");
+
+ b.ToTable("AbpSecurityLogs", (string)null);
+ });
+
+ modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("AccessFailedCount")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasDefaultValue(0)
+ .HasColumnName("AccessFailedCount");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("nvarchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("DeleterId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("DeleterId");
+
+ b.Property("DeletionTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("DeletionTime");
+
+ b.Property("Email")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)")
+ .HasColumnName("Email");
+
+ b.Property("EmailConfirmed")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(false)
+ .HasColumnName("EmailConfirmed");
+
+ b.Property("EntityVersion")
+ .HasColumnType("int");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("IsActive")
+ .HasColumnType("bit")
+ .HasColumnName("IsActive");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("IsExternal")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(false)
+ .HasColumnName("IsExternal");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("LastModifierId");
+
+ b.Property("LastPasswordChangeTime")
+ .HasColumnType("datetimeoffset");
+
+ b.Property("LockoutEnabled")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(false)
+ .HasColumnName("LockoutEnabled");
+
+ b.Property("LockoutEnd")
+ .HasColumnType("datetimeoffset");
+
+ b.Property("Name")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)")
+ .HasColumnName("Name");
+
+ b.Property("NormalizedEmail")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)")
+ .HasColumnName("NormalizedEmail");
+
+ b.Property("NormalizedUserName")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)")
+ .HasColumnName("NormalizedUserName");
+
+ b.Property("PasswordHash")
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)")
+ .HasColumnName("PasswordHash");
+
+ b.Property("PhoneNumber")
+ .HasMaxLength(16)
+ .HasColumnType("nvarchar(16)")
+ .HasColumnName("PhoneNumber");
+
+ b.Property("PhoneNumberConfirmed")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(false)
+ .HasColumnName("PhoneNumberConfirmed");
+
+ b.Property("SecurityStamp")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)")
+ .HasColumnName("SecurityStamp");
+
+ b.Property("ShouldChangePasswordOnNextLogin")
+ .HasColumnType("bit");
+
+ b.Property("Surname")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)")
+ .HasColumnName("Surname");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.Property("TwoFactorEnabled")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(false)
+ .HasColumnName("TwoFactorEnabled");
+
+ b.Property("UserName")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)")
+ .HasColumnName("UserName");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Email");
+
+ b.HasIndex("NormalizedEmail");
+
+ b.HasIndex("NormalizedUserName");
+
+ b.HasIndex("UserName");
+
+ b.ToTable("AbpUsers", (string)null);
+ });
+
+ modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ClaimType")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
+
+ b.Property("ClaimValue")
+ .HasMaxLength(1024)
+ .HasColumnType("nvarchar(1024)");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.Property("UserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.HasIndex("UserId");
+
+ b.ToTable("AbpUserClaims", (string)null);
+ });
+
+ modelBuilder.Entity("Volo.Abp.Identity.IdentityUserDelegation", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("EndTime")
+ .HasColumnType("datetime2");
+
+ b.Property("SourceUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("StartTime")
+ .HasColumnType("datetime2");
+
+ b.Property("TargetUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.HasKey("Id");
+
+ b.ToTable("AbpUserDelegations", (string)null);
+ });
+
+ modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b =>
+ {
+ b.Property("UserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("LoginProvider")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("ProviderDisplayName")
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)");
+
+ b.Property("ProviderKey")
+ .IsRequired()
+ .HasMaxLength(196)
+ .HasColumnType("nvarchar(196)");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.HasKey("UserId", "LoginProvider");
+
+ b.HasIndex("LoginProvider", "ProviderKey");
+
+ b.ToTable("AbpUserLogins", (string)null);
+ });
+
+ modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b =>
+ {
+ b.Property("OrganizationUnitId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("UserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.HasKey("OrganizationUnitId", "UserId");
+
+ b.HasIndex("UserId", "OrganizationUnitId");
+
+ b.ToTable("AbpUserOrganizationUnits", (string)null);
+ });
+
+ modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b =>
+ {
+ b.Property("UserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("RoleId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.HasKey("UserId", "RoleId");
+
+ b.HasIndex("RoleId", "UserId");
+
+ b.ToTable("AbpUserRoles", (string)null);
+ });
+
+ modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b =>
+ {
+ b.Property("UserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("LoginProvider")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("Name")
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.Property("Value")
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("UserId", "LoginProvider", "Name");
+
+ b.ToTable("AbpUserTokens", (string)null);
+ });
+
+ modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Code")
+ .IsRequired()
+ .HasMaxLength(95)
+ .HasColumnType("nvarchar(95)")
+ .HasColumnName("Code");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("nvarchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("DeleterId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("DeleterId");
+
+ b.Property("DeletionTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("DeletionTime");
+
+ b.Property("DisplayName")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)")
+ .HasColumnName("DisplayName");
+
+ b.Property("EntityVersion")
+ .HasColumnType("int");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("LastModifierId");
+
+ b.Property("ParentId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Code");
+
+ b.HasIndex("ParentId");
+
+ b.ToTable("AbpOrganizationUnits", (string)null);
+ });
+
+ modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b =>
+ {
+ b.Property("OrganizationUnitId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("RoleId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property