diff --git a/event-organizer/.gitattributes b/event-organizer/.gitattributes
new file mode 100644
index 0000000..c941e52
--- /dev/null
+++ b/event-organizer/.gitattributes
@@ -0,0 +1 @@
+**/wwwroot/libs/** linguist-vendored
diff --git a/event-organizer/.gitignore b/event-organizer/.gitignore
new file mode 100644
index 0000000..cfc1c07
--- /dev/null
+++ b/event-organizer/.gitignore
@@ -0,0 +1,260 @@
+## 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
+
+# EventHub
+src/EventHub.Web/Logs/*
+src/EventHub.Web.Host/Logs/*
+src/EventHub.IdentityServer/Logs/*
+src/EventHub.HttpApi.Host/Logs/*
+src/EventHub.HttpApi.HostWithIds/Logs/*
+src/EventHub.DbMigrator/Logs/*
diff --git a/event-organizer/.prettierrc b/event-organizer/.prettierrc
new file mode 100644
index 0000000..56af76b
--- /dev/null
+++ b/event-organizer/.prettierrc
@@ -0,0 +1,5 @@
+{
+ "singleQuote": true,
+ "useTabs": false,
+ "tabWidth": 4
+}
diff --git a/event-organizer/EventHub.sln b/event-organizer/EventHub.sln
new file mode 100644
index 0000000..8dc5209
--- /dev/null
+++ b/event-organizer/EventHub.sln
@@ -0,0 +1,137 @@
+
+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}") = "EventHub.Domain", "src\EventHub.Domain\EventHub.Domain.csproj", "{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventHub.Application", "src\EventHub.Application\EventHub.Application.csproj", "{1A94A50E-06DC-43C1-80B5-B662820EC3EB}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventHub.EntityFrameworkCore", "src\EventHub.EntityFrameworkCore\EventHub.EntityFrameworkCore.csproj", "{C956DD76-69C8-4A9C-83EA-D17DF83340FD}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventHub.Web", "src\EventHub.Web\EventHub.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}") = "EventHub.Application.Tests", "test\EventHub.Application.Tests\EventHub.Application.Tests.csproj", "{50B2631D-129C-47B3-A587-029CCD6099BC}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventHub.Web.Tests", "test\EventHub.Web.Tests\EventHub.Web.Tests.csproj", "{5F1B28C6-8D0C-4155-92D0-252F7EA5F674}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventHub.EntityFrameworkCore.DbMigrations", "src\EventHub.EntityFrameworkCore.DbMigrations\EventHub.EntityFrameworkCore.DbMigrations.csproj", "{0372FA84-C517-4EB3-9A9F-B9ACAC0CA5E0}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventHub.Domain.Shared", "src\EventHub.Domain.Shared\EventHub.Domain.Shared.csproj", "{42F719ED-8413-4895-B5B4-5AB56079BC66}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventHub.Application.Contracts", "src\EventHub.Application.Contracts\EventHub.Application.Contracts.csproj", "{520659C8-C734-4298-A3DA-B539DB9DFC0B}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventHub.HttpApi", "src\EventHub.HttpApi\EventHub.HttpApi.csproj", "{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventHub.HttpApi.Client", "src\EventHub.HttpApi.Client\EventHub.HttpApi.Client.csproj", "{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventHub.EntityFrameworkCore.Tests", "test\EventHub.EntityFrameworkCore.Tests\EventHub.EntityFrameworkCore.Tests.csproj", "{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventHub.TestBase", "test\EventHub.TestBase\EventHub.TestBase.csproj", "{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventHub.Domain.Tests", "test\EventHub.Domain.Tests\EventHub.Domain.Tests.csproj", "{E512F4D9-9375-480F-A2F6-A46509F9D824}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventHub.HttpApi.Client.ConsoleTestApp", "test\EventHub.HttpApi.Client.ConsoleTestApp\EventHub.HttpApi.Client.ConsoleTestApp.csproj", "{EF480016-9127-4916-8735-D2466BDBC582}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventHub.DbMigrator", "src\EventHub.DbMigrator\EventHub.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
+ {0372FA84-C517-4EB3-9A9F-B9ACAC0CA5E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0372FA84-C517-4EB3-9A9F-B9ACAC0CA5E0}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0372FA84-C517-4EB3-9A9F-B9ACAC0CA5E0}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {0372FA84-C517-4EB3-9A9F-B9ACAC0CA5E0}.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}
+ {0372FA84-C517-4EB3-9A9F-B9ACAC0CA5E0} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ {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 = {6AAFA1C6-603E-13FA-45E5-7910AA9F661D}
+ EndGlobalSection
+EndGlobal
diff --git a/event-organizer/EventHub.sln.DotSettings b/event-organizer/EventHub.sln.DotSettings
new file mode 100644
index 0000000..cb0b2c9
--- /dev/null
+++ b/event-organizer/EventHub.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/event-organizer/NuGet.Config b/event-organizer/NuGet.Config
new file mode 100644
index 0000000..be8a1ec
--- /dev/null
+++ b/event-organizer/NuGet.Config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/event-organizer/common.props b/event-organizer/common.props
new file mode 100644
index 0000000..fbef883
--- /dev/null
+++ b/event-organizer/common.props
@@ -0,0 +1,8 @@
+
+
+ latest
+ 1.0.0
+ $(NoWarn);CS1591;CS0436
+ app
+
+
\ No newline at end of file
diff --git a/event-organizer/src/EventHub.Application.Contracts/EventHub.Application.Contracts.csproj b/event-organizer/src/EventHub.Application.Contracts/EventHub.Application.Contracts.csproj
new file mode 100644
index 0000000..efca680
--- /dev/null
+++ b/event-organizer/src/EventHub.Application.Contracts/EventHub.Application.Contracts.csproj
@@ -0,0 +1,23 @@
+
+
+
+
+
+ netstandard2.0
+ EventHub
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/event-organizer/src/EventHub.Application.Contracts/EventHubApplicationContractsModule.cs b/event-organizer/src/EventHub.Application.Contracts/EventHubApplicationContractsModule.cs
new file mode 100644
index 0000000..5070d74
--- /dev/null
+++ b/event-organizer/src/EventHub.Application.Contracts/EventHubApplicationContractsModule.cs
@@ -0,0 +1,27 @@
+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.TenantManagement;
+
+namespace EventHub
+{
+ [DependsOn(
+ typeof(EventHubDomainSharedModule),
+ typeof(AbpAccountApplicationContractsModule),
+ typeof(AbpFeatureManagementApplicationContractsModule),
+ typeof(AbpIdentityApplicationContractsModule),
+ typeof(AbpPermissionManagementApplicationContractsModule),
+ typeof(AbpTenantManagementApplicationContractsModule),
+ typeof(AbpObjectExtendingModule)
+ )]
+ public class EventHubApplicationContractsModule : AbpModule
+ {
+ public override void PreConfigureServices(ServiceConfigurationContext context)
+ {
+ EventHubDtoExtensions.Configure();
+ }
+ }
+}
diff --git a/event-organizer/src/EventHub.Application.Contracts/EventHubDtoExtensions.cs b/event-organizer/src/EventHub.Application.Contracts/EventHubDtoExtensions.cs
new file mode 100644
index 0000000..48afe00
--- /dev/null
+++ b/event-organizer/src/EventHub.Application.Contracts/EventHubDtoExtensions.cs
@@ -0,0 +1,29 @@
+using Volo.Abp.Identity;
+using Volo.Abp.ObjectExtending;
+using Volo.Abp.Threading;
+
+namespace EventHub
+{
+ public static class EventHubDtoExtensions
+ {
+ 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
+ */
+ });
+ }
+ }
+}
\ No newline at end of file
diff --git a/event-organizer/src/EventHub.Application.Contracts/Permissions/EventHubPermissionDefinitionProvider.cs b/event-organizer/src/EventHub.Application.Contracts/Permissions/EventHubPermissionDefinitionProvider.cs
new file mode 100644
index 0000000..ab8c0b2
--- /dev/null
+++ b/event-organizer/src/EventHub.Application.Contracts/Permissions/EventHubPermissionDefinitionProvider.cs
@@ -0,0 +1,22 @@
+using EventHub.Localization;
+using Volo.Abp.Authorization.Permissions;
+using Volo.Abp.Localization;
+
+namespace EventHub.Permissions
+{
+ public class EventHubPermissionDefinitionProvider : PermissionDefinitionProvider
+ {
+ public override void Define(IPermissionDefinitionContext context)
+ {
+ var myGroup = context.AddGroup(EventHubPermissions.GroupName);
+
+ //Define your own permissions here. Example:
+ //myGroup.AddPermission(EventHubPermissions.MyPermission1, L("Permission:MyPermission1"));
+ }
+
+ private static LocalizableString L(string name)
+ {
+ return LocalizableString.Create(name);
+ }
+ }
+}
diff --git a/event-organizer/src/EventHub.Application.Contracts/Permissions/EventHubPermissions.cs b/event-organizer/src/EventHub.Application.Contracts/Permissions/EventHubPermissions.cs
new file mode 100644
index 0000000..4e8fff3
--- /dev/null
+++ b/event-organizer/src/EventHub.Application.Contracts/Permissions/EventHubPermissions.cs
@@ -0,0 +1,10 @@
+namespace EventHub.Permissions
+{
+ public static class EventHubPermissions
+ {
+ public const string GroupName = "EventHub";
+
+ //Add your own permission names. Example:
+ //public const string MyPermission1 = GroupName + ".MyPermission1";
+ }
+}
\ No newline at end of file
diff --git a/event-organizer/src/EventHub.Application/EventHub.Application.csproj b/event-organizer/src/EventHub.Application/EventHub.Application.csproj
new file mode 100644
index 0000000..79d4828
--- /dev/null
+++ b/event-organizer/src/EventHub.Application/EventHub.Application.csproj
@@ -0,0 +1,23 @@
+
+
+
+
+
+ net5.0
+ EventHub
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/event-organizer/src/EventHub.Application/EventHubAppService.cs b/event-organizer/src/EventHub.Application/EventHubAppService.cs
new file mode 100644
index 0000000..c31468d
--- /dev/null
+++ b/event-organizer/src/EventHub.Application/EventHubAppService.cs
@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using EventHub.Localization;
+using Volo.Abp.Application.Services;
+
+namespace EventHub
+{
+ /* Inherit your application services from this class.
+ */
+ public abstract class EventHubAppService : ApplicationService
+ {
+ protected EventHubAppService()
+ {
+ LocalizationResource = typeof(EventHubResource);
+ }
+ }
+}
diff --git a/event-organizer/src/EventHub.Application/EventHubApplicationAutoMapperProfile.cs b/event-organizer/src/EventHub.Application/EventHubApplicationAutoMapperProfile.cs
new file mode 100644
index 0000000..b856862
--- /dev/null
+++ b/event-organizer/src/EventHub.Application/EventHubApplicationAutoMapperProfile.cs
@@ -0,0 +1,14 @@
+using AutoMapper;
+
+namespace EventHub
+{
+ public class EventHubApplicationAutoMapperProfile : Profile
+ {
+ public EventHubApplicationAutoMapperProfile()
+ {
+ /* 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/event-organizer/src/EventHub.Application/EventHubApplicationModule.cs b/event-organizer/src/EventHub.Application/EventHubApplicationModule.cs
new file mode 100644
index 0000000..a76e74b
--- /dev/null
+++ b/event-organizer/src/EventHub.Application/EventHubApplicationModule.cs
@@ -0,0 +1,30 @@
+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.TenantManagement;
+
+namespace EventHub
+{
+ [DependsOn(
+ typeof(EventHubDomainModule),
+ typeof(AbpAccountApplicationModule),
+ typeof(EventHubApplicationContractsModule),
+ typeof(AbpIdentityApplicationModule),
+ typeof(AbpPermissionManagementApplicationModule),
+ typeof(AbpTenantManagementApplicationModule),
+ typeof(AbpFeatureManagementApplicationModule)
+ )]
+ public class EventHubApplicationModule : AbpModule
+ {
+ public override void ConfigureServices(ServiceConfigurationContext context)
+ {
+ Configure(options =>
+ {
+ options.AddMaps();
+ });
+ }
+ }
+}
diff --git a/event-organizer/src/EventHub.Application/Properties/AssemblyInfo.cs b/event-organizer/src/EventHub.Application/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..123c29d
--- /dev/null
+++ b/event-organizer/src/EventHub.Application/Properties/AssemblyInfo.cs
@@ -0,0 +1,2 @@
+using System.Runtime.CompilerServices;
+[assembly:InternalsVisibleToAttribute("EventHub.Application.Tests")]
diff --git a/event-organizer/src/EventHub.DbMigrator/DbMigratorHostedService.cs b/event-organizer/src/EventHub.DbMigrator/DbMigratorHostedService.cs
new file mode 100644
index 0000000..6a50fd6
--- /dev/null
+++ b/event-organizer/src/EventHub.DbMigrator/DbMigratorHostedService.cs
@@ -0,0 +1,43 @@
+using System.Threading;
+using System.Threading.Tasks;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Hosting;
+using EventHub.Data;
+using Serilog;
+using Volo.Abp;
+
+namespace EventHub.DbMigrator
+{
+ public class DbMigratorHostedService : IHostedService
+ {
+ private readonly IHostApplicationLifetime _hostApplicationLifetime;
+
+ public DbMigratorHostedService(IHostApplicationLifetime hostApplicationLifetime)
+ {
+ _hostApplicationLifetime = hostApplicationLifetime;
+ }
+
+ public async Task StartAsync(CancellationToken cancellationToken)
+ {
+ using (var application = AbpApplicationFactory.Create(options =>
+ {
+ options.UseAutofac();
+ options.Services.AddLogging(c => c.AddSerilog());
+ }))
+ {
+ application.Initialize();
+
+ await application
+ .ServiceProvider
+ .GetRequiredService()
+ .MigrateAsync();
+
+ application.Shutdown();
+
+ _hostApplicationLifetime.StopApplication();
+ }
+ }
+
+ public Task StopAsync(CancellationToken cancellationToken) => Task.CompletedTask;
+ }
+}
diff --git a/event-organizer/src/EventHub.DbMigrator/EventHub.DbMigrator.csproj b/event-organizer/src/EventHub.DbMigrator/EventHub.DbMigrator.csproj
new file mode 100644
index 0000000..4d8e9c4
--- /dev/null
+++ b/event-organizer/src/EventHub.DbMigrator/EventHub.DbMigrator.csproj
@@ -0,0 +1,35 @@
+
+
+
+
+
+ Exe
+ net5.0
+
+
+
+
+
+
+
+
+ PreserveNewest
+ Always
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/event-organizer/src/EventHub.DbMigrator/EventHubDbMigratorModule.cs b/event-organizer/src/EventHub.DbMigrator/EventHubDbMigratorModule.cs
new file mode 100644
index 0000000..4bc4f5a
--- /dev/null
+++ b/event-organizer/src/EventHub.DbMigrator/EventHubDbMigratorModule.cs
@@ -0,0 +1,20 @@
+using EventHub.EntityFrameworkCore;
+using Volo.Abp.Autofac;
+using Volo.Abp.BackgroundJobs;
+using Volo.Abp.Modularity;
+
+namespace EventHub.DbMigrator
+{
+ [DependsOn(
+ typeof(AbpAutofacModule),
+ typeof(EventHubEntityFrameworkCoreDbMigrationsModule),
+ typeof(EventHubApplicationContractsModule)
+ )]
+ public class EventHubDbMigratorModule : AbpModule
+ {
+ public override void ConfigureServices(ServiceConfigurationContext context)
+ {
+ Configure(options => options.IsJobExecutionEnabled = false);
+ }
+ }
+}
diff --git a/event-organizer/src/EventHub.DbMigrator/Program.cs b/event-organizer/src/EventHub.DbMigrator/Program.cs
new file mode 100644
index 0000000..e91a537
--- /dev/null
+++ b/event-organizer/src/EventHub.DbMigrator/Program.cs
@@ -0,0 +1,40 @@
+using System.IO;
+using System.Threading.Tasks;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Hosting;
+using Microsoft.Extensions.Logging;
+using Serilog;
+using Serilog.Events;
+
+namespace EventHub.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("EventHub", LogEventLevel.Debug)
+#else
+ .MinimumLevel.Override("EventHub", 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)
+ .ConfigureLogging((context, logging) => logging.ClearProviders())
+ .ConfigureServices((hostContext, services) =>
+ {
+ services.AddHostedService();
+ });
+ }
+}
diff --git a/event-organizer/src/EventHub.DbMigrator/appsettings.json b/event-organizer/src/EventHub.DbMigrator/appsettings.json
new file mode 100644
index 0000000..594b632
--- /dev/null
+++ b/event-organizer/src/EventHub.DbMigrator/appsettings.json
@@ -0,0 +1,24 @@
+{
+ "ConnectionStrings": {
+ "Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=EventHub;Trusted_Connection=True"
+ },
+ "IdentityServer": {
+ "Clients": {
+ "EventHub_Web": {
+ "ClientId": "EventHub_Web",
+ "ClientSecret": "1q2w3e*",
+ "RootUrl": "https://localhost:44361"
+ },
+ "EventHub_App": {
+ "ClientId": "EventHub_App",
+ "ClientSecret": "1q2w3e*",
+ "RootUrl": "http://localhost:4200"
+ },
+ "EventHub_Swagger": {
+ "ClientId": "EventHub_Swagger",
+ "ClientSecret": "1q2w3e*",
+ "RootUrl": "https://localhost:44311"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/event-organizer/src/EventHub.Domain.Shared/EventHub.Domain.Shared.csproj b/event-organizer/src/EventHub.Domain.Shared/EventHub.Domain.Shared.csproj
new file mode 100644
index 0000000..b089258
--- /dev/null
+++ b/event-organizer/src/EventHub.Domain.Shared/EventHub.Domain.Shared.csproj
@@ -0,0 +1,31 @@
+
+
+
+
+
+ netstandard2.0
+ EventHub
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/event-organizer/src/EventHub.Domain.Shared/EventHubDomainErrorCodes.cs b/event-organizer/src/EventHub.Domain.Shared/EventHubDomainErrorCodes.cs
new file mode 100644
index 0000000..af7a1fc
--- /dev/null
+++ b/event-organizer/src/EventHub.Domain.Shared/EventHubDomainErrorCodes.cs
@@ -0,0 +1,7 @@
+namespace EventHub
+{
+ public static class EventHubDomainErrorCodes
+ {
+ /* You can add your business exception error codes here, as constants */
+ }
+}
diff --git a/event-organizer/src/EventHub.Domain.Shared/EventHubDomainSharedModule.cs b/event-organizer/src/EventHub.Domain.Shared/EventHubDomainSharedModule.cs
new file mode 100644
index 0000000..3680417
--- /dev/null
+++ b/event-organizer/src/EventHub.Domain.Shared/EventHubDomainSharedModule.cs
@@ -0,0 +1,59 @@
+using EventHub.Localization;
+using Volo.Abp.AuditLogging;
+using Volo.Abp.BackgroundJobs;
+using Volo.Abp.FeatureManagement;
+using Volo.Abp.Identity;
+using Volo.Abp.IdentityServer;
+using Volo.Abp.Localization;
+using Volo.Abp.Localization.ExceptionHandling;
+using Volo.Abp.Modularity;
+using Volo.Abp.PermissionManagement;
+using Volo.Abp.SettingManagement;
+using Volo.Abp.TenantManagement;
+using Volo.Abp.Validation.Localization;
+using Volo.Abp.VirtualFileSystem;
+
+namespace EventHub
+{
+ [DependsOn(
+ typeof(AbpAuditLoggingDomainSharedModule),
+ typeof(AbpBackgroundJobsDomainSharedModule),
+ typeof(AbpFeatureManagementDomainSharedModule),
+ typeof(AbpIdentityDomainSharedModule),
+ typeof(AbpIdentityServerDomainSharedModule),
+ typeof(AbpPermissionManagementDomainSharedModule),
+ typeof(AbpSettingManagementDomainSharedModule),
+ typeof(AbpTenantManagementDomainSharedModule)
+ )]
+ public class EventHubDomainSharedModule : AbpModule
+ {
+ public override void PreConfigureServices(ServiceConfigurationContext context)
+ {
+ EventHubGlobalFeatureConfigurator.Configure();
+ EventHubModuleExtensionConfigurator.Configure();
+ }
+
+ public override void ConfigureServices(ServiceConfigurationContext context)
+ {
+ Configure(options =>
+ {
+ options.FileSets.AddEmbedded();
+ });
+
+ Configure(options =>
+ {
+ options.Resources
+ .Add("en")
+ .AddBaseTypes(typeof(AbpValidationResource))
+ .AddVirtualJson("/Localization/EventHub");
+
+ options.DefaultResourceType = typeof(EventHubResource);
+ });
+
+ Configure(options =>
+ {
+ options.MapCodeNamespace("EventHub", typeof(EventHubResource));
+ });
+ }
+ }
+}
diff --git a/event-organizer/src/EventHub.Domain.Shared/EventHubGlobalFeatureConfigurator.cs b/event-organizer/src/EventHub.Domain.Shared/EventHubGlobalFeatureConfigurator.cs
new file mode 100644
index 0000000..29e82d9
--- /dev/null
+++ b/event-organizer/src/EventHub.Domain.Shared/EventHubGlobalFeatureConfigurator.cs
@@ -0,0 +1,23 @@
+using Volo.Abp.Threading;
+
+namespace EventHub
+{
+ public static class EventHubGlobalFeatureConfigurator
+ {
+ 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/event-organizer/src/EventHub.Domain.Shared/EventHubModuleExtensionConfigurator.cs b/event-organizer/src/EventHub.Domain.Shared/EventHubModuleExtensionConfigurator.cs
new file mode 100644
index 0000000..a6cc6ca
--- /dev/null
+++ b/event-organizer/src/EventHub.Domain.Shared/EventHubModuleExtensionConfigurator.cs
@@ -0,0 +1,72 @@
+using System.ComponentModel.DataAnnotations;
+using Volo.Abp.Identity;
+using Volo.Abp.ObjectExtending;
+using Volo.Abp.Threading;
+
+namespace EventHub
+{
+ public static class EventHubModuleExtensionConfigurator
+ {
+ 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});
+
+ //...other configurations for this property
+ }
+ );
+ });
+ });
+
+ * See the documentation for more:
+ * https://docs.abp.io/en/latest/Module-Entity-Extensions
+ */
+ }
+ }
+}
diff --git a/event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/ar.json b/event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/ar.json
new file mode 100644
index 0000000..05cb96a
--- /dev/null
+++ b/event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/ar.json
@@ -0,0 +1,8 @@
+{
+ "culture": "ar",
+ "texts": {
+ "Menu:Home": "الرئيسية",
+ "Welcome": "مرحبا",
+ "LongWelcomeMessage": "مرحبا بكم في التطبيق. هذا مشروع بدء تشغيل يعتمد على إطار عمل ABP. لمزيد من المعلومات ، يرجى زيارة abp.io."
+ }
+}
\ No newline at end of file
diff --git a/event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/cs.json b/event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/cs.json
new file mode 100644
index 0000000..5a0bbf6
--- /dev/null
+++ b/event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/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/event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/de-DE.json b/event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/de-DE.json
new file mode 100644
index 0000000..aca4528
--- /dev/null
+++ b/event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/de-DE.json
@@ -0,0 +1,8 @@
+{
+ "culture": "de-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/event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/en-GB.json b/event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/en-GB.json
new file mode 100644
index 0000000..d2ca079
--- /dev/null
+++ b/event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/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/event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/en.json b/event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/en.json
new file mode 100644
index 0000000..d2a6a98
--- /dev/null
+++ b/event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/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/event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/es.json b/event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/es.json
new file mode 100644
index 0000000..31b4b59
--- /dev/null
+++ b/event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/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/event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/fr.json b/event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/fr.json
new file mode 100644
index 0000000..e76eac0
--- /dev/null
+++ b/event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/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/event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/hu.json b/event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/hu.json
new file mode 100644
index 0000000..c7b6a33
--- /dev/null
+++ b/event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/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/event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/nl.json b/event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/nl.json
new file mode 100644
index 0000000..9ba8da4
--- /dev/null
+++ b/event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/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/event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/pl-PL.json b/event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/pl-PL.json
new file mode 100644
index 0000000..33412f3
--- /dev/null
+++ b/event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/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/event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/pt-BR.json b/event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/pt-BR.json
new file mode 100644
index 0000000..8c818a0
--- /dev/null
+++ b/event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/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/event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/ru.json b/event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/ru.json
new file mode 100644
index 0000000..8464e44
--- /dev/null
+++ b/event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/ru.json
@@ -0,0 +1,8 @@
+{
+ "culture": "ru",
+ "texts": {
+ "Menu:Home": "Главная",
+ "Welcome": "Добро пожаловать",
+ "LongWelcomeMessage": "Добро пожаловать в приложение. Этот запущенный проект основан на фреймворке ABP. Для получения дополнительной информации посетите сайт abp.io."
+ }
+}
diff --git a/event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/sl.json b/event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/sl.json
new file mode 100644
index 0000000..a066ef2
--- /dev/null
+++ b/event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/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/event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/tr.json b/event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/tr.json
new file mode 100644
index 0000000..5bf83ee
--- /dev/null
+++ b/event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/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/event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/vi.json b/event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/vi.json
new file mode 100644
index 0000000..c115a35
--- /dev/null
+++ b/event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/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/event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/zh-Hans.json b/event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/zh-Hans.json
new file mode 100644
index 0000000..23790bd
--- /dev/null
+++ b/event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/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/event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/zh-Hant.json b/event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/zh-Hant.json
new file mode 100644
index 0000000..31e0ab5
--- /dev/null
+++ b/event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/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/event-organizer/src/EventHub.Domain.Shared/Localization/EventHubResource.cs b/event-organizer/src/EventHub.Domain.Shared/Localization/EventHubResource.cs
new file mode 100644
index 0000000..3b40e9c
--- /dev/null
+++ b/event-organizer/src/EventHub.Domain.Shared/Localization/EventHubResource.cs
@@ -0,0 +1,10 @@
+using Volo.Abp.Localization;
+
+namespace EventHub.Localization
+{
+ [LocalizationResourceName("EventHub")]
+ public class EventHubResource
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/event-organizer/src/EventHub.Domain.Shared/MultiTenancy/MultiTenancyConsts.cs b/event-organizer/src/EventHub.Domain.Shared/MultiTenancy/MultiTenancyConsts.cs
new file mode 100644
index 0000000..d2979fc
--- /dev/null
+++ b/event-organizer/src/EventHub.Domain.Shared/MultiTenancy/MultiTenancyConsts.cs
@@ -0,0 +1,11 @@
+namespace EventHub.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/event-organizer/src/EventHub.Domain/Data/EventHubDbMigrationService.cs b/event-organizer/src/EventHub.Domain/Data/EventHubDbMigrationService.cs
new file mode 100644
index 0000000..b173dc6
--- /dev/null
+++ b/event-organizer/src/EventHub.Domain/Data/EventHubDbMigrationService.cs
@@ -0,0 +1,182 @@
+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.MultiTenancy;
+using Volo.Abp.TenantManagement;
+
+namespace EventHub.Data
+{
+ public class EventHubDbMigrationService : ITransientDependency
+ {
+ public ILogger Logger { get; set; }
+
+ private readonly IDataSeeder _dataSeeder;
+ private readonly IEnumerable _dbSchemaMigrators;
+ private readonly ITenantRepository _tenantRepository;
+ private readonly ICurrentTenant _currentTenant;
+
+ public EventHubDbMigrationService(
+ IDataSeeder dataSeeder,
+ IEnumerable dbSchemaMigrators,
+ ITenantRepository tenantRepository,
+ ICurrentTenant currentTenant)
+ {
+ _dataSeeder = dataSeeder;
+ _dbSchemaMigrators = dbSchemaMigrators;
+ _tenantRepository = tenantRepository;
+ _currentTenant = currentTenant;
+
+ Logger = NullLogger.Instance;
+ }
+
+ public async Task MigrateAsync()
+ {
+ try
+ {
+ if (!await MigrationsFolderExists())
+ {
+ await AddInitialMigration();
+ return;
+ }
+ }
+ catch (Exception e)
+ {
+ Logger.LogWarning("Couldn't determinate if any migrations exist : " + e.Message);
+ }
+
+ 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(tenant?.Id);
+ }
+
+ private async Task MigrationsFolderExists()
+ {
+ var dbMigrationsProjectFolder = GetDbMigrationsProjectFolderPath();
+
+ return Directory.Exists(Path.Combine(dbMigrationsProjectFolder, "migrations"));
+ }
+
+ private async Task 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 {GetDbMigrationsProjectFolderPath()}\""
+ );
+
+ try
+ {
+ Process.Start(procStartInfo);
+ }
+ catch (Exception)
+ {
+ throw new Exception("Couldn't run ABP CLI...");
+ }
+ }
+
+ private static string GetDbMigrationsProjectFolderPath()
+ {
+ 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(".DbMigrations"));
+ }
+
+ private static string GetSolutionDirectoryPath()
+ {
+ var currentDirectory = new DirectoryInfo(Directory.GetCurrentDirectory());
+
+ while (Directory.GetParent(currentDirectory.FullName) != null)
+ {
+ currentDirectory = Directory.GetParent(currentDirectory.FullName);
+
+ if (Directory.GetFiles(currentDirectory.FullName).FirstOrDefault(f => f.EndsWith(".sln")) != null)
+ {
+ return currentDirectory.FullName;
+ }
+ }
+
+ return null;
+ }
+ }
+}
diff --git a/event-organizer/src/EventHub.Domain/Data/IEventHubDbSchemaMigrator.cs b/event-organizer/src/EventHub.Domain/Data/IEventHubDbSchemaMigrator.cs
new file mode 100644
index 0000000..33463c1
--- /dev/null
+++ b/event-organizer/src/EventHub.Domain/Data/IEventHubDbSchemaMigrator.cs
@@ -0,0 +1,9 @@
+using System.Threading.Tasks;
+
+namespace EventHub.Data
+{
+ public interface IEventHubDbSchemaMigrator
+ {
+ Task MigrateAsync();
+ }
+}
diff --git a/event-organizer/src/EventHub.Domain/Data/NullEventHubDbSchemaMigrator.cs b/event-organizer/src/EventHub.Domain/Data/NullEventHubDbSchemaMigrator.cs
new file mode 100644
index 0000000..80f0f6a
--- /dev/null
+++ b/event-organizer/src/EventHub.Domain/Data/NullEventHubDbSchemaMigrator.cs
@@ -0,0 +1,16 @@
+using System.Threading.Tasks;
+using Volo.Abp.DependencyInjection;
+
+namespace EventHub.Data
+{
+ /* This is used if database provider does't define
+ * IEventHubDbSchemaMigrator implementation.
+ */
+ public class NullEventHubDbSchemaMigrator : IEventHubDbSchemaMigrator, ITransientDependency
+ {
+ public Task MigrateAsync()
+ {
+ return Task.CompletedTask;
+ }
+ }
+}
\ No newline at end of file
diff --git a/event-organizer/src/EventHub.Domain/EventHub.Domain.csproj b/event-organizer/src/EventHub.Domain/EventHub.Domain.csproj
new file mode 100644
index 0000000..6095fd5
--- /dev/null
+++ b/event-organizer/src/EventHub.Domain/EventHub.Domain.csproj
@@ -0,0 +1,27 @@
+
+
+
+
+
+ net5.0
+ EventHub
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/event-organizer/src/EventHub.Domain/EventHubConsts.cs b/event-organizer/src/EventHub.Domain/EventHubConsts.cs
new file mode 100644
index 0000000..8306a3f
--- /dev/null
+++ b/event-organizer/src/EventHub.Domain/EventHubConsts.cs
@@ -0,0 +1,9 @@
+namespace EventHub
+{
+ public static class EventHubConsts
+ {
+ public const string DbTablePrefix = "App";
+
+ public const string DbSchema = null;
+ }
+}
diff --git a/event-organizer/src/EventHub.Domain/EventHubDomainModule.cs b/event-organizer/src/EventHub.Domain/EventHubDomainModule.cs
new file mode 100644
index 0000000..cfb2d72
--- /dev/null
+++ b/event-organizer/src/EventHub.Domain/EventHubDomainModule.cs
@@ -0,0 +1,46 @@
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.DependencyInjection.Extensions;
+using EventHub.MultiTenancy;
+using Volo.Abp.AuditLogging;
+using Volo.Abp.BackgroundJobs;
+using Volo.Abp.Emailing;
+using Volo.Abp.FeatureManagement;
+using Volo.Abp.Identity;
+using Volo.Abp.IdentityServer;
+using Volo.Abp.Modularity;
+using Volo.Abp.MultiTenancy;
+using Volo.Abp.PermissionManagement.Identity;
+using Volo.Abp.PermissionManagement.IdentityServer;
+using Volo.Abp.SettingManagement;
+using Volo.Abp.TenantManagement;
+
+namespace EventHub
+{
+ [DependsOn(
+ typeof(EventHubDomainSharedModule),
+ typeof(AbpAuditLoggingDomainModule),
+ typeof(AbpBackgroundJobsDomainModule),
+ typeof(AbpFeatureManagementDomainModule),
+ typeof(AbpIdentityDomainModule),
+ typeof(AbpPermissionManagementDomainIdentityModule),
+ typeof(AbpIdentityServerDomainModule),
+ typeof(AbpPermissionManagementDomainIdentityServerModule),
+ typeof(AbpSettingManagementDomainModule),
+ typeof(AbpTenantManagementDomainModule),
+ typeof(AbpEmailingModule)
+ )]
+ public class EventHubDomainModule : AbpModule
+ {
+ public override void ConfigureServices(ServiceConfigurationContext context)
+ {
+ Configure(options =>
+ {
+ options.IsEnabled = MultiTenancyConsts.IsEnabled;
+ });
+
+#if DEBUG
+ context.Services.Replace(ServiceDescriptor.Singleton());
+#endif
+ }
+ }
+}
diff --git a/event-organizer/src/EventHub.Domain/IdentityServer/IdentityServerDataSeedContributor.cs b/event-organizer/src/EventHub.Domain/IdentityServer/IdentityServerDataSeedContributor.cs
new file mode 100644
index 0000000..58fec54
--- /dev/null
+++ b/event-organizer/src/EventHub.Domain/IdentityServer/IdentityServerDataSeedContributor.cs
@@ -0,0 +1,324 @@
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using IdentityServer4.Models;
+using Microsoft.Extensions.Configuration;
+using Volo.Abp.Authorization.Permissions;
+using Volo.Abp.Data;
+using Volo.Abp.DependencyInjection;
+using Volo.Abp.Guids;
+using Volo.Abp.IdentityServer.ApiResources;
+using Volo.Abp.IdentityServer.ApiScopes;
+using Volo.Abp.IdentityServer.Clients;
+using Volo.Abp.IdentityServer.IdentityResources;
+using Volo.Abp.MultiTenancy;
+using Volo.Abp.PermissionManagement;
+using Volo.Abp.Uow;
+using ApiResource = Volo.Abp.IdentityServer.ApiResources.ApiResource;
+using ApiScope = Volo.Abp.IdentityServer.ApiScopes.ApiScope;
+using Client = Volo.Abp.IdentityServer.Clients.Client;
+
+namespace EventHub.IdentityServer
+{
+ public class IdentityServerDataSeedContributor : IDataSeedContributor, ITransientDependency
+ {
+ private readonly IApiResourceRepository _apiResourceRepository;
+ private readonly IApiScopeRepository _apiScopeRepository;
+ private readonly IClientRepository _clientRepository;
+ private readonly IIdentityResourceDataSeeder _identityResourceDataSeeder;
+ private readonly IGuidGenerator _guidGenerator;
+ private readonly IPermissionDataSeeder _permissionDataSeeder;
+ private readonly IConfiguration _configuration;
+ private readonly ICurrentTenant _currentTenant;
+
+ public IdentityServerDataSeedContributor(
+ IClientRepository clientRepository,
+ IApiResourceRepository apiResourceRepository,
+ IApiScopeRepository apiScopeRepository,
+ IIdentityResourceDataSeeder identityResourceDataSeeder,
+ IGuidGenerator guidGenerator,
+ IPermissionDataSeeder permissionDataSeeder,
+ IConfiguration configuration,
+ ICurrentTenant currentTenant)
+ {
+ _clientRepository = clientRepository;
+ _apiResourceRepository = apiResourceRepository;
+ _apiScopeRepository = apiScopeRepository;
+ _identityResourceDataSeeder = identityResourceDataSeeder;
+ _guidGenerator = guidGenerator;
+ _permissionDataSeeder = permissionDataSeeder;
+ _configuration = configuration;
+ _currentTenant = currentTenant;
+ }
+
+ [UnitOfWork]
+ public virtual async Task SeedAsync(DataSeedContext context)
+ {
+ using (_currentTenant.Change(context?.TenantId))
+ {
+ await _identityResourceDataSeeder.CreateStandardResourcesAsync();
+ await CreateApiResourcesAsync();
+ await CreateApiScopesAsync();
+ await CreateClientsAsync();
+ }
+ }
+
+ private async Task CreateApiScopesAsync()
+ {
+ await CreateApiScopeAsync("EventHub");
+ }
+
+ private async Task CreateApiResourcesAsync()
+ {
+ var commonApiUserClaims = new[]
+ {
+ "email",
+ "email_verified",
+ "name",
+ "phone_number",
+ "phone_number_verified",
+ "role"
+ };
+
+ await CreateApiResourceAsync("EventHub", commonApiUserClaims);
+ }
+
+ private async Task CreateApiResourceAsync(string name, IEnumerable claims)
+ {
+ var apiResource = await _apiResourceRepository.FindByNameAsync(name);
+ if (apiResource == null)
+ {
+ apiResource = await _apiResourceRepository.InsertAsync(
+ new ApiResource(
+ _guidGenerator.Create(),
+ name,
+ name + " API"
+ ),
+ autoSave: true
+ );
+ }
+
+ foreach (var claim in claims)
+ {
+ if (apiResource.FindClaim(claim) == null)
+ {
+ apiResource.AddUserClaim(claim);
+ }
+ }
+
+ return await _apiResourceRepository.UpdateAsync(apiResource);
+ }
+
+ private async Task CreateApiScopeAsync(string name)
+ {
+ var apiScope = await _apiScopeRepository.GetByNameAsync(name);
+ if (apiScope == null)
+ {
+ apiScope = await _apiScopeRepository.InsertAsync(
+ new ApiScope(
+ _guidGenerator.Create(),
+ name,
+ name + " API"
+ ),
+ autoSave: true
+ );
+ }
+
+ return apiScope;
+ }
+
+ private async Task CreateClientsAsync()
+ {
+ var commonScopes = new[]
+ {
+ "email",
+ "openid",
+ "profile",
+ "role",
+ "phone",
+ "address",
+ "EventHub"
+ };
+
+ var configurationSection = _configuration.GetSection("IdentityServer:Clients");
+
+ //Web Client
+ var webClientId = configurationSection["EventHub_Web:ClientId"];
+ if (!webClientId.IsNullOrWhiteSpace())
+ {
+ var webClientRootUrl = configurationSection["EventHub_Web:RootUrl"].EnsureEndsWith('/');
+
+ /* EventHub_Web client is only needed if you created a tiered
+ * solution. Otherwise, you can delete this client. */
+
+ await CreateClientAsync(
+ name: webClientId,
+ scopes: commonScopes,
+ grantTypes: new[] { "hybrid" },
+ secret: (configurationSection["EventHub_Web:ClientSecret"] ?? "1q2w3e*").Sha256(),
+ redirectUri: $"{webClientRootUrl}signin-oidc",
+ postLogoutRedirectUri: $"{webClientRootUrl}signout-callback-oidc",
+ frontChannelLogoutUri: $"{webClientRootUrl}Account/FrontChannelLogout",
+ corsOrigins: new[] { webClientRootUrl.RemovePostFix("/") }
+ );
+ }
+
+ //Console Test / Angular Client
+ var consoleAndAngularClientId = configurationSection["EventHub_App:ClientId"];
+ if (!consoleAndAngularClientId.IsNullOrWhiteSpace())
+ {
+ var webClientRootUrl = configurationSection["EventHub_App:RootUrl"]?.TrimEnd('/');
+
+ await CreateClientAsync(
+ name: consoleAndAngularClientId,
+ scopes: commonScopes,
+ grantTypes: new[] { "password", "client_credentials", "authorization_code" },
+ secret: (configurationSection["EventHub_App:ClientSecret"] ?? "1q2w3e*").Sha256(),
+ requireClientSecret: false,
+ redirectUri: webClientRootUrl,
+ postLogoutRedirectUri: webClientRootUrl,
+ corsOrigins: new[] { webClientRootUrl.RemovePostFix("/") }
+ );
+ }
+
+ // Blazor Client
+ var blazorClientId = configurationSection["EventHub_Blazor:ClientId"];
+ if (!blazorClientId.IsNullOrWhiteSpace())
+ {
+ var blazorRootUrl = configurationSection["EventHub_Blazor:RootUrl"].TrimEnd('/');
+
+ await CreateClientAsync(
+ name: blazorClientId,
+ scopes: commonScopes,
+ grantTypes: new[] { "authorization_code" },
+ secret: configurationSection["EventHub_Blazor:ClientSecret"]?.Sha256(),
+ requireClientSecret: false,
+ redirectUri: $"{blazorRootUrl}/authentication/login-callback",
+ postLogoutRedirectUri: $"{blazorRootUrl}/authentication/logout-callback",
+ corsOrigins: new[] { blazorRootUrl.RemovePostFix("/") }
+ );
+ }
+
+ // Swagger Client
+ var swaggerClientId = configurationSection["EventHub_Swagger:ClientId"];
+ if (!swaggerClientId.IsNullOrWhiteSpace())
+ {
+ var swaggerRootUrl = configurationSection["EventHub_Swagger:RootUrl"].TrimEnd('/');
+
+ await CreateClientAsync(
+ name: swaggerClientId,
+ scopes: commonScopes,
+ grantTypes: new[] { "authorization_code" },
+ secret: configurationSection["EventHub_Swagger:ClientSecret"]?.Sha256(),
+ requireClientSecret: false,
+ redirectUri: $"{swaggerRootUrl}/swagger/oauth2-redirect.html",
+ corsOrigins: new[] { swaggerRootUrl.RemovePostFix("/") }
+ );
+ }
+ }
+
+ private async Task CreateClientAsync(
+ string name,
+ IEnumerable scopes,
+ IEnumerable grantTypes,
+ string secret = null,
+ string redirectUri = null,
+ string postLogoutRedirectUri = null,
+ string frontChannelLogoutUri = null,
+ bool requireClientSecret = true,
+ bool requirePkce = false,
+ IEnumerable permissions = null,
+ IEnumerable corsOrigins = null)
+ {
+ var client = await _clientRepository.FindByClientIdAsync(name);
+ if (client == null)
+ {
+ client = await _clientRepository.InsertAsync(
+ new Client(
+ _guidGenerator.Create(),
+ name
+ )
+ {
+ ClientName = name,
+ ProtocolType = "oidc",
+ Description = name,
+ AlwaysIncludeUserClaimsInIdToken = true,
+ AllowOfflineAccess = true,
+ AbsoluteRefreshTokenLifetime = 31536000, //365 days
+ AccessTokenLifetime = 31536000, //365 days
+ AuthorizationCodeLifetime = 300,
+ IdentityTokenLifetime = 300,
+ RequireConsent = false,
+ FrontChannelLogoutUri = frontChannelLogoutUri,
+ RequireClientSecret = requireClientSecret,
+ RequirePkce = requirePkce
+ },
+ autoSave: true
+ );
+ }
+
+ foreach (var scope in scopes)
+ {
+ if (client.FindScope(scope) == null)
+ {
+ client.AddScope(scope);
+ }
+ }
+
+ foreach (var grantType in grantTypes)
+ {
+ if (client.FindGrantType(grantType) == null)
+ {
+ client.AddGrantType(grantType);
+ }
+ }
+
+ if (!secret.IsNullOrEmpty())
+ {
+ if (client.FindSecret(secret) == null)
+ {
+ client.AddSecret(secret);
+ }
+ }
+
+ if (redirectUri != null)
+ {
+ if (client.FindRedirectUri(redirectUri) == null)
+ {
+ client.AddRedirectUri(redirectUri);
+ }
+ }
+
+ if (postLogoutRedirectUri != null)
+ {
+ if (client.FindPostLogoutRedirectUri(postLogoutRedirectUri) == null)
+ {
+ client.AddPostLogoutRedirectUri(postLogoutRedirectUri);
+ }
+ }
+
+ if (permissions != null)
+ {
+ await _permissionDataSeeder.SeedAsync(
+ ClientPermissionValueProvider.ProviderName,
+ name,
+ permissions,
+ null
+ );
+ }
+
+ if (corsOrigins != null)
+ {
+ foreach (var origin in corsOrigins)
+ {
+ if (!origin.IsNullOrWhiteSpace() && client.FindCorsOrigin(origin) == null)
+ {
+ client.AddCorsOrigin(origin);
+ }
+ }
+ }
+
+ return await _clientRepository.UpdateAsync(client);
+ }
+ }
+}
diff --git a/event-organizer/src/EventHub.Domain/Properties/AssemblyInfo.cs b/event-organizer/src/EventHub.Domain/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..025db80
--- /dev/null
+++ b/event-organizer/src/EventHub.Domain/Properties/AssemblyInfo.cs
@@ -0,0 +1,3 @@
+using System.Runtime.CompilerServices;
+[assembly:InternalsVisibleToAttribute("EventHub.Domain.Tests")]
+[assembly:InternalsVisibleToAttribute("EventHub.TestBase")]
diff --git a/event-organizer/src/EventHub.Domain/Settings/EventHubSettingDefinitionProvider.cs b/event-organizer/src/EventHub.Domain/Settings/EventHubSettingDefinitionProvider.cs
new file mode 100644
index 0000000..cd950ff
--- /dev/null
+++ b/event-organizer/src/EventHub.Domain/Settings/EventHubSettingDefinitionProvider.cs
@@ -0,0 +1,13 @@
+using Volo.Abp.Settings;
+
+namespace EventHub.Settings
+{
+ public class EventHubSettingDefinitionProvider : SettingDefinitionProvider
+ {
+ public override void Define(ISettingDefinitionContext context)
+ {
+ //Define your own settings here. Example:
+ //context.Add(new SettingDefinition(EventHubSettings.MySetting1));
+ }
+ }
+}
diff --git a/event-organizer/src/EventHub.Domain/Settings/EventHubSettings.cs b/event-organizer/src/EventHub.Domain/Settings/EventHubSettings.cs
new file mode 100644
index 0000000..8dcef36
--- /dev/null
+++ b/event-organizer/src/EventHub.Domain/Settings/EventHubSettings.cs
@@ -0,0 +1,10 @@
+namespace EventHub.Settings
+{
+ public static class EventHubSettings
+ {
+ private const string Prefix = "EventHub";
+
+ //Add your own setting names here. Example:
+ //public const string MySetting1 = Prefix + ".MySetting1";
+ }
+}
\ No newline at end of file
diff --git a/event-organizer/src/EventHub.Domain/Users/AppUser.cs b/event-organizer/src/EventHub.Domain/Users/AppUser.cs
new file mode 100644
index 0000000..2310232
--- /dev/null
+++ b/event-organizer/src/EventHub.Domain/Users/AppUser.cs
@@ -0,0 +1,63 @@
+using System;
+using Volo.Abp.Domain.Entities.Auditing;
+using Volo.Abp.Users;
+
+namespace EventHub.Users
+{
+ /* This entity shares the same table/collection ("AbpUsers" by default) with the
+ * IdentityUser entity of the Identity module.
+ *
+ * - You can define your custom properties into this class.
+ * - You never create or delete this entity, because it is Identity module's job.
+ * - You can query users from database with this entity.
+ * - You can update values of your custom properties.
+ */
+ public class AppUser : FullAuditedAggregateRoot, IUser
+ {
+ #region Base properties
+
+ /* These properties are shared with the IdentityUser entity of the Identity module.
+ * Do not change these properties through this class. Instead, use Identity module
+ * services (like IdentityUserManager) to change them.
+ * So, this properties are designed as read only!
+ */
+
+ public virtual Guid? TenantId { get; private set; }
+
+ public virtual string UserName { get; private set; }
+
+ public virtual string Name { get; private set; }
+
+ public virtual string Surname { get; private set; }
+
+ public virtual string Email { get; private set; }
+
+ public virtual bool EmailConfirmed { get; private set; }
+
+ public virtual string PhoneNumber { get; private set; }
+
+ public virtual bool PhoneNumberConfirmed { get; private set; }
+
+ #endregion
+
+ /* Add your own properties here. Example:
+ *
+ * public string MyProperty { get; set; }
+ *
+ * If you add a property and using the EF Core, remember these;
+ *
+ * 1. Update EventHubDbContext.OnModelCreating
+ * to configure the mapping for your new property
+ * 2. Update EventHubEfCoreEntityExtensionMappings to extend the IdentityUser entity
+ * and add your new property to the migration.
+ * 3. Use the Add-Migration to add a new database migration.
+ * 4. Run the .DbMigrator project (or use the Update-Database command) to apply
+ * schema change to the database.
+ */
+
+ private AppUser()
+ {
+
+ }
+ }
+}
diff --git a/event-organizer/src/EventHub.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/EntityFrameworkCoreEventHubDbSchemaMigrator.cs b/event-organizer/src/EventHub.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/EntityFrameworkCoreEventHubDbSchemaMigrator.cs
new file mode 100644
index 0000000..da7beb4
--- /dev/null
+++ b/event-organizer/src/EventHub.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/EntityFrameworkCoreEventHubDbSchemaMigrator.cs
@@ -0,0 +1,35 @@
+using System;
+using System.Threading.Tasks;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.Extensions.DependencyInjection;
+using EventHub.Data;
+using Volo.Abp.DependencyInjection;
+
+namespace EventHub.EntityFrameworkCore
+{
+ public class EntityFrameworkCoreEventHubDbSchemaMigrator
+ : IEventHubDbSchemaMigrator, ITransientDependency
+ {
+ private readonly IServiceProvider _serviceProvider;
+
+ public EntityFrameworkCoreEventHubDbSchemaMigrator(
+ IServiceProvider serviceProvider)
+ {
+ _serviceProvider = serviceProvider;
+ }
+
+ public async Task MigrateAsync()
+ {
+ /* We intentionally resolving the EventHubMigrationsDbContext
+ * 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();
+ }
+ }
+}
\ No newline at end of file
diff --git a/event-organizer/src/EventHub.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/EventHubEntityFrameworkCoreDbMigrationsModule.cs b/event-organizer/src/EventHub.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/EventHubEntityFrameworkCoreDbMigrationsModule.cs
new file mode 100644
index 0000000..65d9f49
--- /dev/null
+++ b/event-organizer/src/EventHub.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/EventHubEntityFrameworkCoreDbMigrationsModule.cs
@@ -0,0 +1,16 @@
+using Microsoft.Extensions.DependencyInjection;
+using Volo.Abp.Modularity;
+
+namespace EventHub.EntityFrameworkCore
+{
+ [DependsOn(
+ typeof(EventHubEntityFrameworkCoreModule)
+ )]
+ public class EventHubEntityFrameworkCoreDbMigrationsModule : AbpModule
+ {
+ public override void ConfigureServices(ServiceConfigurationContext context)
+ {
+ context.Services.AddAbpDbContext();
+ }
+ }
+}
diff --git a/event-organizer/src/EventHub.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/EventHubMigrationsDbContext.cs b/event-organizer/src/EventHub.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/EventHubMigrationsDbContext.cs
new file mode 100644
index 0000000..cf8ae2b
--- /dev/null
+++ b/event-organizer/src/EventHub.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/EventHubMigrationsDbContext.cs
@@ -0,0 +1,48 @@
+using Microsoft.EntityFrameworkCore;
+using Volo.Abp.AuditLogging.EntityFrameworkCore;
+using Volo.Abp.BackgroundJobs.EntityFrameworkCore;
+using Volo.Abp.EntityFrameworkCore;
+using Volo.Abp.FeatureManagement.EntityFrameworkCore;
+using Volo.Abp.Identity;
+using Volo.Abp.Identity.EntityFrameworkCore;
+using Volo.Abp.IdentityServer.EntityFrameworkCore;
+using Volo.Abp.PermissionManagement.EntityFrameworkCore;
+using Volo.Abp.SettingManagement.EntityFrameworkCore;
+using Volo.Abp.TenantManagement.EntityFrameworkCore;
+
+namespace EventHub.EntityFrameworkCore
+{
+ /* This DbContext is only used for database migrations.
+ * It is not used on runtime. See EventHubDbContext for the runtime DbContext.
+ * It is a unified model that includes configuration for
+ * all used modules and your application.
+ */
+ public class EventHubMigrationsDbContext : AbpDbContext
+ {
+ public EventHubMigrationsDbContext(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.ConfigureIdentityServer();
+ builder.ConfigureFeatureManagement();
+ builder.ConfigureTenantManagement();
+
+ /* Configure your own tables/entities inside the ConfigureEventHub method */
+
+ builder.ConfigureEventHub();
+ }
+ }
+}
\ No newline at end of file
diff --git a/event-organizer/src/EventHub.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/EventHubMigrationsDbContextFactory.cs b/event-organizer/src/EventHub.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/EventHubMigrationsDbContextFactory.cs
new file mode 100644
index 0000000..7981cc1
--- /dev/null
+++ b/event-organizer/src/EventHub.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/EventHubMigrationsDbContextFactory.cs
@@ -0,0 +1,33 @@
+using System.IO;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Design;
+using Microsoft.Extensions.Configuration;
+
+namespace EventHub.EntityFrameworkCore
+{
+ /* This class is needed for EF Core console commands
+ * (like Add-Migration and Update-Database commands) */
+ public class EventHubMigrationsDbContextFactory : IDesignTimeDbContextFactory
+ {
+ public EventHubMigrationsDbContext CreateDbContext(string[] args)
+ {
+ EventHubEfCoreEntityExtensionMappings.Configure();
+
+ var configuration = BuildConfiguration();
+
+ var builder = new DbContextOptionsBuilder()
+ .UseSqlServer(configuration.GetConnectionString("Default"));
+
+ return new EventHubMigrationsDbContext(builder.Options);
+ }
+
+ private static IConfigurationRoot BuildConfiguration()
+ {
+ var builder = new ConfigurationBuilder()
+ .SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), "../EventHub.DbMigrator/"))
+ .AddJsonFile("appsettings.json", optional: false);
+
+ return builder.Build();
+ }
+ }
+}
diff --git a/event-organizer/src/EventHub.EntityFrameworkCore.DbMigrations/EventHub.EntityFrameworkCore.DbMigrations.csproj b/event-organizer/src/EventHub.EntityFrameworkCore.DbMigrations/EventHub.EntityFrameworkCore.DbMigrations.csproj
new file mode 100644
index 0000000..811c40c
--- /dev/null
+++ b/event-organizer/src/EventHub.EntityFrameworkCore.DbMigrations/EventHub.EntityFrameworkCore.DbMigrations.csproj
@@ -0,0 +1,18 @@
+
+
+
+
+
+ net5.0
+ EventHub
+
+
+
+
+
+
+
+
+
+
+
diff --git a/event-organizer/src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/20201028014149_Initial.Designer.cs b/event-organizer/src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/20201028014149_Initial.Designer.cs
new file mode 100644
index 0000000..395fc60
--- /dev/null
+++ b/event-organizer/src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/20201028014149_Initial.Designer.cs
@@ -0,0 +1,2307 @@
+//
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using EventHub.EntityFrameworkCore;
+using Volo.Abp.EntityFrameworkCore;
+
+namespace EventHub.Migrations
+{
+ [DbContext(typeof(EventHubMigrationsDbContext))]
+ [Migration("20201028014149_Initial")]
+ partial class Initial
+ {
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .UseIdentityColumns()
+ .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer)
+ .HasAnnotation("Relational:MaxIdentifierLength", 128)
+ .HasAnnotation("ProductVersion", "5.0.0-rc.2.20475.6");
+
+ 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")
+ .HasMaxLength(4000)
+ .HasColumnType("nvarchar(4000)")
+ .HasColumnName("Exceptions");
+
+ 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("ImpersonatorUserId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("ImpersonatorUserId");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.Property("TenantName")
+ .HasColumnType("nvarchar(max)");
+
+ 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");
+ });
+
+ 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");
+ });
+
+ 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");
+ });
+
+ 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");
+ });
+
+ 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");
+ });
+
+ 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");
+
+ b.ToTable("AbpFeatureValues");
+ });
+
+ modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .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");
+ });
+
+ modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .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");
+ });
+
+ modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("nvarchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ 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");
+ });
+
+ 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");
+ });
+
+ modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .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");
+ });
+
+ modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .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("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ 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("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("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");
+ });
+
+ 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");
+ });
+
+ 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");
+ });
+
+ 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");
+ });
+
+ 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");
+ });
+
+ 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");
+ });
+
+ modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .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("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");
+ });
+
+ 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("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.HasKey("OrganizationUnitId", "RoleId");
+
+ b.HasIndex("RoleId", "OrganizationUnitId");
+
+ b.ToTable("AbpOrganizationUnitRoles");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("AllowedAccessTokenSigningAlgorithms")
+ .HasMaxLength(100)
+ .HasColumnType("nvarchar(100)");
+
+ 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("Description")
+ .HasMaxLength(1000)
+ .HasColumnType("nvarchar(1000)");
+
+ b.Property("DisplayName")
+ .HasMaxLength(200)
+ .HasColumnType("nvarchar(200)");
+
+ b.Property("Enabled")
+ .HasColumnType("bit");
+
+ 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("Name")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("nvarchar(200)");
+
+ b.Property("ShowInDiscoveryDocument")
+ .HasColumnType("bit");
+
+ b.HasKey("Id");
+
+ b.ToTable("IdentityServerApiResources");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b =>
+ {
+ b.Property("ApiResourceId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Type")
+ .HasMaxLength(200)
+ .HasColumnType("nvarchar(200)");
+
+ b.HasKey("ApiResourceId", "Type");
+
+ b.ToTable("IdentityServerApiResourceClaims");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b =>
+ {
+ b.Property("ApiResourceId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Key")
+ .HasMaxLength(250)
+ .HasColumnType("nvarchar(250)");
+
+ b.Property("Value")
+ .HasMaxLength(2000)
+ .HasColumnType("nvarchar(2000)");
+
+ b.HasKey("ApiResourceId", "Key", "Value");
+
+ b.ToTable("IdentityServerApiResourceProperties");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceScope", b =>
+ {
+ b.Property("ApiResourceId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Scope")
+ .HasMaxLength(200)
+ .HasColumnType("nvarchar(200)");
+
+ b.HasKey("ApiResourceId", "Scope");
+
+ b.ToTable("IdentityServerApiResourceScopes");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceSecret", b =>
+ {
+ b.Property("ApiResourceId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Type")
+ .HasMaxLength(250)
+ .HasColumnType("nvarchar(250)");
+
+ b.Property("Value")
+ .HasMaxLength(4000)
+ .HasColumnType("nvarchar(4000)");
+
+ b.Property("Description")
+ .HasMaxLength(1000)
+ .HasColumnType("nvarchar(1000)");
+
+ b.Property("Expiration")
+ .HasColumnType("datetime2");
+
+ b.HasKey("ApiResourceId", "Type", "Value");
+
+ b.ToTable("IdentityServerApiResourceSecrets");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScope", 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("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("DeleterId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("DeleterId");
+
+ b.Property("DeletionTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("DeletionTime");
+
+ b.Property("Description")
+ .HasMaxLength(1000)
+ .HasColumnType("nvarchar(1000)");
+
+ b.Property("DisplayName")
+ .HasMaxLength(200)
+ .HasColumnType("nvarchar(200)");
+
+ b.Property("Emphasize")
+ .HasColumnType("bit");
+
+ b.Property("Enabled")
+ .HasColumnType("bit");
+
+ 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