forked from tsai/eShopOnAbp
72 changed files with 2984 additions and 15 deletions
@ -0,0 +1,116 @@ |
|||
|
|||
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}") = "EShopOnAbp.AdministrationService.Domain", "src\EShopOnAbp.AdministrationService.Domain\EShopOnAbp.AdministrationService.Domain.csproj", "{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.AdministrationService.Application", "src\EShopOnAbp.AdministrationService.Application\EShopOnAbp.AdministrationService.Application.csproj", "{1A94A50E-06DC-43C1-80B5-B662820EC3EB}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.AdministrationService.EntityFrameworkCore", "src\EShopOnAbp.AdministrationService.EntityFrameworkCore\EShopOnAbp.AdministrationService.EntityFrameworkCore.csproj", "{C956DD76-69C8-4A9C-83EA-D17DF83340FD}" |
|||
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}") = "EShopOnAbp.AdministrationService.Application.Tests", "test\EShopOnAbp.AdministrationService.Application.Tests\EShopOnAbp.AdministrationService.Application.Tests.csproj", "{50B2631D-129C-47B3-A587-029CCD6099BC}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.AdministrationService.Domain.Shared", "src\EShopOnAbp.AdministrationService.Domain.Shared\EShopOnAbp.AdministrationService.Domain.Shared.csproj", "{42F719ED-8413-4895-B5B4-5AB56079BC66}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.AdministrationService.Application.Contracts", "src\EShopOnAbp.AdministrationService.Application.Contracts\EShopOnAbp.AdministrationService.Application.Contracts.csproj", "{520659C8-C734-4298-A3DA-B539DB9DFC0B}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.AdministrationService.HttpApi", "src\EShopOnAbp.AdministrationService.HttpApi\EShopOnAbp.AdministrationService.HttpApi.csproj", "{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.AdministrationService.HttpApi.Client", "src\EShopOnAbp.AdministrationService.HttpApi.Client\EShopOnAbp.AdministrationService.HttpApi.Client.csproj", "{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.AdministrationService.EntityFrameworkCore.Tests", "test\EShopOnAbp.AdministrationService.EntityFrameworkCore.Tests\EShopOnAbp.AdministrationService.EntityFrameworkCore.Tests.csproj", "{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.AdministrationService.TestBase", "test\EShopOnAbp.AdministrationService.TestBase\EShopOnAbp.AdministrationService.TestBase.csproj", "{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.AdministrationService.Domain.Tests", "test\EShopOnAbp.AdministrationService.Domain.Tests\EShopOnAbp.AdministrationService.Domain.Tests.csproj", "{E512F4D9-9375-480F-A2F6-A46509F9D824}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.AdministrationService.HttpApi.Client.ConsoleTestApp", "test\EShopOnAbp.AdministrationService.HttpApi.Client.ConsoleTestApp\EShopOnAbp.AdministrationService.HttpApi.Client.ConsoleTestApp.csproj", "{EF480016-9127-4916-8735-D2466BDBC582}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.AdministrationService.HttpApi.Host", "src\EShopOnAbp.AdministrationService.HttpApi.Host\EShopOnAbp.AdministrationService.HttpApi.Host.csproj", "{748584B1-BA69-4F6A-81AA-F4BDE6BCE29D}" |
|||
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 |
|||
{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 |
|||
{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 |
|||
{748584B1-BA69-4F6A-81AA-F4BDE6BCE29D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{748584B1-BA69-4F6A-81AA-F4BDE6BCE29D}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{748584B1-BA69-4F6A-81AA-F4BDE6BCE29D}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{748584B1-BA69-4F6A-81AA-F4BDE6BCE29D}.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} |
|||
{50B2631D-129C-47B3-A587-029CCD6099BC} = {04DBDB01-70F4-4E06-B468-8F87850B22BE} |
|||
{42F719ED-8413-4895-B5B4-5AB56079BC66} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} |
|||
{520659C8-C734-4298-A3DA-B539DB9DFC0B} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} |
|||
{4164BDF7-F527-4E85-9CE6-E3C2D7426A27} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} |
|||
{3B5A0094-670D-4BB1-BFDD-61B88A8773DC} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} |
|||
{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81} = {04DBDB01-70F4-4E06-B468-8F87850B22BE} |
|||
{91853F21-9CD9-4132-BC29-A7D5D84FFFE7} = {04DBDB01-70F4-4E06-B468-8F87850B22BE} |
|||
{E512F4D9-9375-480F-A2F6-A46509F9D824} = {04DBDB01-70F4-4E06-B468-8F87850B22BE} |
|||
{EF480016-9127-4916-8735-D2466BDBC582} = {04DBDB01-70F4-4E06-B468-8F87850B22BE} |
|||
{748584B1-BA69-4F6A-81AA-F4BDE6BCE29D} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} |
|||
EndGlobalSection |
|||
GlobalSection(ExtensibilityGlobals) = postSolution |
|||
SolutionGuid = {6AAFA1C6-603E-13FA-45E5-7910AA9F661D} |
|||
EndGlobalSection |
|||
EndGlobal |
|||
@ -0,0 +1,23 @@ |
|||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation"> |
|||
<s:Boolean x:Key="/Default/CodeEditing/Intellisense/CodeCompletion/IntelliSenseCompletingCharacters/CSharpCompletingCharacters/UpgradedFromVSSettings/@EntryValue">True</s:Boolean> |
|||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceDoWhileStatementBraces/@EntryIndexedValue">WARNING</s:String> |
|||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceFixedStatementBraces/@EntryIndexedValue">WARNING</s:String> |
|||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceForeachStatementBraces/@EntryIndexedValue">WARNING</s:String> |
|||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceForStatementBraces/@EntryIndexedValue">WARNING</s:String> |
|||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceIfStatementBraces/@EntryIndexedValue">WARNING</s:String> |
|||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceLockStatementBraces/@EntryIndexedValue">WARNING</s:String> |
|||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceUsingStatementBraces/@EntryIndexedValue">WARNING</s:String> |
|||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceWhileStatementBraces/@EntryIndexedValue">WARNING</s:String> |
|||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_FOR/@EntryValue">Required</s:String> |
|||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_FOREACH/@EntryValue">Required</s:String> |
|||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_IFELSE/@EntryValue">Required</s:String> |
|||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_WHILE/@EntryValue">Required</s:String> |
|||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_REDUNDANT/@EntryValue">False</s:Boolean> |
|||
<s:Boolean x:Key="/Default/CodeStyle/Generate/=Implementations/@KeyIndexDefined">True</s:Boolean> |
|||
<s:String x:Key="/Default/CodeStyle/Generate/=Implementations/Options/=Async/@EntryIndexedValue">False</s:String> |
|||
<s:String x:Key="/Default/CodeStyle/Generate/=Implementations/Options/=Mutable/@EntryIndexedValue">False</s:String> |
|||
<s:Boolean x:Key="/Default/CodeStyle/Generate/=Overrides/@KeyIndexDefined">True</s:Boolean> |
|||
<s:String x:Key="/Default/CodeStyle/Generate/=Overrides/Options/=Async/@EntryIndexedValue">False</s:String> |
|||
<s:String x:Key="/Default/CodeStyle/Generate/=Overrides/Options/=Mutable/@EntryIndexedValue">False</s:String> |
|||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=SQL/@EntryIndexedValue">SQL</s:String> |
|||
</wpf:ResourceDictionary> |
|||
@ -0,0 +1,116 @@ |
|||
|
|||
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}") = "EShopOnAbp.AdministrationService.Domain", "src\EShopOnAbp.AdministrationService.Domain\EShopOnAbp.AdministrationService.Domain.csproj", "{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.AdministrationService.Application", "src\EShopOnAbp.AdministrationService.Application\EShopOnAbp.AdministrationService.Application.csproj", "{1A94A50E-06DC-43C1-80B5-B662820EC3EB}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.AdministrationService.EntityFrameworkCore", "src\EShopOnAbp.AdministrationService.EntityFrameworkCore\EShopOnAbp.AdministrationService.EntityFrameworkCore.csproj", "{C956DD76-69C8-4A9C-83EA-D17DF83340FD}" |
|||
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}") = "EShopOnAbp.AdministrationService.Application.Tests", "test\EShopOnAbp.AdministrationService.Application.Tests\EShopOnAbp.AdministrationService.Application.Tests.csproj", "{50B2631D-129C-47B3-A587-029CCD6099BC}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.AdministrationService.Domain.Shared", "src\EShopOnAbp.AdministrationService.Domain.Shared\EShopOnAbp.AdministrationService.Domain.Shared.csproj", "{42F719ED-8413-4895-B5B4-5AB56079BC66}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.AdministrationService.Application.Contracts", "src\EShopOnAbp.AdministrationService.Application.Contracts\EShopOnAbp.AdministrationService.Application.Contracts.csproj", "{520659C8-C734-4298-A3DA-B539DB9DFC0B}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.AdministrationService.HttpApi", "src\EShopOnAbp.AdministrationService.HttpApi\EShopOnAbp.AdministrationService.HttpApi.csproj", "{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.AdministrationService.HttpApi.Client", "src\EShopOnAbp.AdministrationService.HttpApi.Client\EShopOnAbp.AdministrationService.HttpApi.Client.csproj", "{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.AdministrationService.EntityFrameworkCore.Tests", "test\EShopOnAbp.AdministrationService.EntityFrameworkCore.Tests\EShopOnAbp.AdministrationService.EntityFrameworkCore.Tests.csproj", "{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.AdministrationService.TestBase", "test\EShopOnAbp.AdministrationService.TestBase\EShopOnAbp.AdministrationService.TestBase.csproj", "{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.AdministrationService.Domain.Tests", "test\EShopOnAbp.AdministrationService.Domain.Tests\EShopOnAbp.AdministrationService.Domain.Tests.csproj", "{E512F4D9-9375-480F-A2F6-A46509F9D824}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.AdministrationService.HttpApi.Client.ConsoleTestApp", "test\EShopOnAbp.AdministrationService.HttpApi.Client.ConsoleTestApp\EShopOnAbp.AdministrationService.HttpApi.Client.ConsoleTestApp.csproj", "{EF480016-9127-4916-8735-D2466BDBC582}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.AdministrationService.HttpApi.Host", "src\EShopOnAbp.AdministrationService.HttpApi.Host\EShopOnAbp.AdministrationService.HttpApi.Host.csproj", "{748584B1-BA69-4F6A-81AA-F4BDE6BCE29D}" |
|||
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 |
|||
{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 |
|||
{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 |
|||
{748584B1-BA69-4F6A-81AA-F4BDE6BCE29D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{748584B1-BA69-4F6A-81AA-F4BDE6BCE29D}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{748584B1-BA69-4F6A-81AA-F4BDE6BCE29D}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{748584B1-BA69-4F6A-81AA-F4BDE6BCE29D}.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} |
|||
{50B2631D-129C-47B3-A587-029CCD6099BC} = {04DBDB01-70F4-4E06-B468-8F87850B22BE} |
|||
{42F719ED-8413-4895-B5B4-5AB56079BC66} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} |
|||
{520659C8-C734-4298-A3DA-B539DB9DFC0B} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} |
|||
{4164BDF7-F527-4E85-9CE6-E3C2D7426A27} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} |
|||
{3B5A0094-670D-4BB1-BFDD-61B88A8773DC} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} |
|||
{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81} = {04DBDB01-70F4-4E06-B468-8F87850B22BE} |
|||
{91853F21-9CD9-4132-BC29-A7D5D84FFFE7} = {04DBDB01-70F4-4E06-B468-8F87850B22BE} |
|||
{E512F4D9-9375-480F-A2F6-A46509F9D824} = {04DBDB01-70F4-4E06-B468-8F87850B22BE} |
|||
{EF480016-9127-4916-8735-D2466BDBC582} = {04DBDB01-70F4-4E06-B468-8F87850B22BE} |
|||
{748584B1-BA69-4F6A-81AA-F4BDE6BCE29D} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} |
|||
EndGlobalSection |
|||
GlobalSection(ExtensibilityGlobals) = postSolution |
|||
SolutionGuid = {6AAFA1C6-603E-13FA-45E5-7910AA9F661D} |
|||
EndGlobalSection |
|||
EndGlobal |
|||
@ -0,0 +1,20 @@ |
|||
using Volo.Abp.FeatureManagement; |
|||
using Volo.Abp.Modularity; |
|||
using Volo.Abp.PermissionManagement; |
|||
using Volo.Abp.SettingManagement; |
|||
|
|||
namespace EShopOnAbp.AdministrationService |
|||
{ |
|||
[DependsOn( |
|||
typeof(AdministrationServiceDomainSharedModule), |
|||
typeof(AbpPermissionManagementApplicationContractsModule), |
|||
typeof(AbpFeatureManagementApplicationContractsModule), |
|||
typeof(AbpSettingManagementApplicationContractsModule) |
|||
)] |
|||
public class AdministrationServiceApplicationContractsModule : AbpModule |
|||
{ |
|||
public override void PreConfigureServices(ServiceConfigurationContext context) |
|||
{ |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
namespace EShopOnAbp.AdministrationService |
|||
{ |
|||
public class AdministrationServiceRemoteServiceConsts |
|||
{ |
|||
public const string RemoteServiceName = "AdministrationService"; |
|||
} |
|||
} |
|||
@ -0,0 +1,18 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk"> |
|||
|
|||
<PropertyGroup> |
|||
<TargetFramework>netstandard2.0</TargetFramework> |
|||
<RootNamespace>EShopOnAbp.AdministrationService</RootNamespace> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="..\EShopOnAbp.AdministrationService.Domain.Shared\EShopOnAbp.AdministrationService.Domain.Shared.csproj" /> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<PackageReference Include="Volo.Abp.PermissionManagement.Application.Contracts" Version="4.3.3" /> |
|||
<PackageReference Include="Volo.Abp.FeatureManagement.Application.Contracts" Version="4.3.3" /> |
|||
<PackageReference Include="Volo.Abp.SettingManagement.Application.Contracts" Version="4.3.3" /> |
|||
</ItemGroup> |
|||
|
|||
</Project> |
|||
@ -0,0 +1,18 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
using EShopOnAbp.AdministrationService.Localization; |
|||
using Volo.Abp.Application.Services; |
|||
|
|||
namespace EShopOnAbp.AdministrationService |
|||
{ |
|||
/* Inherit your application services from this class. |
|||
*/ |
|||
public abstract class AdministrationServiceAppService : ApplicationService |
|||
{ |
|||
protected AdministrationServiceAppService() |
|||
{ |
|||
LocalizationResource = typeof(AdministrationServiceResource); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,29 @@ |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Volo.Abp.AutoMapper; |
|||
using Volo.Abp.FeatureManagement; |
|||
using Volo.Abp.Modularity; |
|||
using Volo.Abp.PermissionManagement; |
|||
using Volo.Abp.SettingManagement; |
|||
|
|||
namespace EShopOnAbp.AdministrationService |
|||
{ |
|||
[DependsOn( |
|||
typeof(AdministrationServiceDomainModule), |
|||
typeof(AdministrationServiceApplicationContractsModule), |
|||
typeof(AbpPermissionManagementApplicationModule), |
|||
typeof(AbpFeatureManagementApplicationModule), |
|||
typeof(AbpSettingManagementApplicationModule) |
|||
)] |
|||
public class AdministrationServiceApplicationModule : AbpModule |
|||
{ |
|||
public override void ConfigureServices(ServiceConfigurationContext context) |
|||
{ |
|||
context.Services.AddAutoMapperObjectMapper<AdministrationServiceApplicationModule>(); |
|||
|
|||
Configure<AbpAutoMapperOptions>(options => |
|||
{ |
|||
options.AddMaps<AdministrationServiceApplicationModule>(validate: true); |
|||
}); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,19 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk"> |
|||
|
|||
<PropertyGroup> |
|||
<TargetFramework>netstandard2.0</TargetFramework> |
|||
<RootNamespace>EShopOnAbp.AdministrationService</RootNamespace> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="..\EShopOnAbp.AdministrationService.Domain\EShopOnAbp.AdministrationService.Domain.csproj" /> |
|||
<ProjectReference Include="..\EShopOnAbp.AdministrationService.Application.Contracts\EShopOnAbp.AdministrationService.Application.Contracts.csproj" /> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<PackageReference Include="Volo.Abp.PermissionManagement.Application" Version="4.3.3" /> |
|||
<PackageReference Include="Volo.Abp.FeatureManagement.Application" Version="4.3.3" /> |
|||
<PackageReference Include="Volo.Abp.SettingManagement.Application" Version="4.3.3" /> |
|||
</ItemGroup> |
|||
|
|||
</Project> |
|||
@ -0,0 +1,7 @@ |
|||
namespace EShopOnAbp.AdministrationService |
|||
{ |
|||
public static class AdministrationServiceDomainErrorCodes |
|||
{ |
|||
/* You can add your business exception error codes here, as constants */ |
|||
} |
|||
} |
|||
@ -0,0 +1,45 @@ |
|||
using EShopOnAbp.AdministrationService.Localization; |
|||
using Volo.Abp.AuditLogging; |
|||
using Volo.Abp.FeatureManagement; |
|||
using Volo.Abp.Localization; |
|||
using Volo.Abp.Localization.ExceptionHandling; |
|||
using Volo.Abp.Modularity; |
|||
using Volo.Abp.PermissionManagement; |
|||
using Volo.Abp.SettingManagement; |
|||
using Volo.Abp.Validation.Localization; |
|||
using Volo.Abp.VirtualFileSystem; |
|||
|
|||
namespace EShopOnAbp.AdministrationService |
|||
{ |
|||
[DependsOn( |
|||
typeof(AbpPermissionManagementDomainSharedModule), |
|||
typeof(AbpFeatureManagementDomainSharedModule), |
|||
typeof(AbpSettingManagementDomainSharedModule), |
|||
typeof(AbpAuditLoggingDomainSharedModule) |
|||
)] |
|||
public class AdministrationServiceDomainSharedModule : AbpModule |
|||
{ |
|||
public override void ConfigureServices(ServiceConfigurationContext context) |
|||
{ |
|||
Configure<AbpVirtualFileSystemOptions>(options => |
|||
{ |
|||
options.FileSets.AddEmbedded<AdministrationServiceDomainSharedModule>(); |
|||
}); |
|||
|
|||
Configure<AbpLocalizationOptions>(options => |
|||
{ |
|||
options.Resources |
|||
.Add<AdministrationServiceResource>("en") |
|||
.AddBaseTypes(typeof(AbpValidationResource)) |
|||
.AddVirtualJson("/Localization/AdministrationService"); |
|||
|
|||
options.DefaultResourceType = typeof(AdministrationServiceResource); |
|||
}); |
|||
|
|||
Configure<AbpExceptionLocalizationOptions>(options => |
|||
{ |
|||
options.MapCodeNamespace("AdministrationService", typeof(AdministrationServiceResource)); |
|||
}); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,25 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk"> |
|||
|
|||
<PropertyGroup> |
|||
<TargetFramework>netstandard2.0</TargetFramework> |
|||
<RootNamespace>EShopOnAbp.AdministrationService</RootNamespace> |
|||
<GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="5.0.*" /> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<PackageReference Include="Volo.Abp.PermissionManagement.Domain.Shared" Version="4.3.3" /> |
|||
<PackageReference Include="Volo.Abp.FeatureManagement.Domain.Shared" Version="4.3.3" /> |
|||
<PackageReference Include="Volo.Abp.SettingManagement.Domain.Shared" Version="4.3.3" /> |
|||
<PackageReference Include="Volo.Abp.AuditLogging.Domain.Shared" Version="4.3.3" /> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<EmbeddedResource Include="Localization\AdministrationService\*.json" /> |
|||
<Content Remove="Localization\AdministrationService\*.json" /> |
|||
</ItemGroup> |
|||
|
|||
</Project> |
|||
@ -0,0 +1,8 @@ |
|||
{ |
|||
"culture": "ar", |
|||
"texts": { |
|||
"Menu:Home": "الرئيسية", |
|||
"Welcome": "مرحبا", |
|||
"LongWelcomeMessage": "مرحبا بكم في التطبيق. هذا مشروع بدء تشغيل يعتمد على إطار عمل ABP. لمزيد من المعلومات ، يرجى زيارة abp.io." |
|||
} |
|||
} |
|||
@ -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." |
|||
} |
|||
} |
|||
@ -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." |
|||
} |
|||
} |
|||
@ -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." |
|||
} |
|||
} |
|||
@ -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." |
|||
} |
|||
} |
|||
@ -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." |
|||
} |
|||
} |
|||
@ -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." |
|||
} |
|||
} |
|||
@ -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." |
|||
} |
|||
} |
|||
@ -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." |
|||
} |
|||
} |
|||
@ -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." |
|||
} |
|||
} |
|||
@ -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." |
|||
} |
|||
} |
|||
@ -0,0 +1,8 @@ |
|||
{ |
|||
"culture": "ru", |
|||
"texts": { |
|||
"Menu:Home": "Главная", |
|||
"Welcome": "Добро пожаловать", |
|||
"LongWelcomeMessage": "Добро пожаловать в приложение. Этот запущенный проект основан на фреймворке ABP. Для получения дополнительной информации посетите сайт abp.io." |
|||
} |
|||
} |
|||
@ -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." |
|||
} |
|||
} |
|||
@ -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." |
|||
} |
|||
} |
|||
@ -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." |
|||
} |
|||
} |
|||
@ -0,0 +1,8 @@ |
|||
{ |
|||
"culture": "zh-Hans", |
|||
"texts": { |
|||
"Menu:Home": "首页", |
|||
"Welcome": "欢迎", |
|||
"LongWelcomeMessage": "欢迎来到该应用程序. 这是一个基于ABP框架的启动项目. 有关更多信息, 请访问 abp.io." |
|||
} |
|||
} |
|||
@ -0,0 +1,8 @@ |
|||
{ |
|||
"culture": "zh-Hant", |
|||
"texts": { |
|||
"Menu:Home": "首頁", |
|||
"Welcome": "歡迎", |
|||
"LongWelcomeMessage": "歡迎來到此應用程式. 這是一個基於ABP框架的起始專案. 有關更多訊息, 請瀏覽 abp.io." |
|||
} |
|||
} |
|||
@ -0,0 +1,10 @@ |
|||
using Volo.Abp.Localization; |
|||
|
|||
namespace EShopOnAbp.AdministrationService.Localization |
|||
{ |
|||
[LocalizationResourceName("AdministrationService")] |
|||
public class AdministrationServiceResource |
|||
{ |
|||
|
|||
} |
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
namespace EShopOnAbp.AdministrationService |
|||
{ |
|||
public static class AdministrationServiceDbProperties |
|||
{ |
|||
public static string DbTablePrefix { get; set; } = string.Empty; |
|||
|
|||
public static string DbSchema { get; set; } = null; |
|||
|
|||
public const string ConnectionStringName = "AdministrationService"; |
|||
} |
|||
} |
|||
@ -0,0 +1,32 @@ |
|||
using Volo.Abp.AuditLogging; |
|||
using Volo.Abp.FeatureManagement; |
|||
using Volo.Abp.Localization; |
|||
using Volo.Abp.Modularity; |
|||
using Volo.Abp.PermissionManagement; |
|||
using Volo.Abp.SettingManagement; |
|||
|
|||
namespace EShopOnAbp.AdministrationService |
|||
{ |
|||
[DependsOn( |
|||
typeof(AdministrationServiceDomainSharedModule), |
|||
typeof(AbpPermissionManagementDomainModule), |
|||
typeof(AbpFeatureManagementDomainModule), |
|||
typeof(AbpSettingManagementDomainModule), |
|||
typeof(AbpAuditLoggingDomainModule) |
|||
)] |
|||
public class AdministrationServiceDomainModule : AbpModule |
|||
{ |
|||
public override void ConfigureServices(ServiceConfigurationContext context) |
|||
{ |
|||
Configure<AbpLocalizationOptions>(options => |
|||
{ |
|||
options.Languages.Add(new LanguageInfo("en", "en", "English", "gb")); |
|||
options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe", "tr")); |
|||
options.Languages.Add(new LanguageInfo("sl", "sl", "Slovenščina", "si")); |
|||
options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文", "cn")); |
|||
options.Languages.Add(new LanguageInfo("de-DE", "de-DE", "Deutsche", "de")); |
|||
options.Languages.Add(new LanguageInfo("es", "es", "Español", "es")); |
|||
}); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,19 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk"> |
|||
|
|||
<PropertyGroup> |
|||
<TargetFramework>netstandard2.0</TargetFramework> |
|||
<RootNamespace>EShopOnAbp.AdministrationService</RootNamespace> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="..\EShopOnAbp.AdministrationService.Domain.Shared\EShopOnAbp.AdministrationService.Domain.Shared.csproj" /> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<PackageReference Include="Volo.Abp.PermissionManagement.Domain" Version="4.3.3" /> |
|||
<PackageReference Include="Volo.Abp.FeatureManagement.Domain" Version="4.3.3" /> |
|||
<PackageReference Include="Volo.Abp.SettingManagement.Domain" Version="4.3.3" /> |
|||
<PackageReference Include="Volo.Abp.AuditLogging.Domain" Version="4.3.3" /> |
|||
</ItemGroup> |
|||
|
|||
</Project> |
|||
@ -0,0 +1,25 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk"> |
|||
|
|||
<PropertyGroup> |
|||
<TargetFramework>net5.0</TargetFramework> |
|||
<RootNamespace>EShopOnAbp.AdministrationService</RootNamespace> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.*"> |
|||
<PrivateAssets>all</PrivateAssets> |
|||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> |
|||
</PackageReference> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="..\EShopOnAbp.AdministrationService.Domain\EShopOnAbp.AdministrationService.Domain.csproj" /> |
|||
<PackageReference Include="Volo.Abp.EntityFrameworkCore.SqlServer" Version="4.3.3" /> |
|||
<PackageReference Include="Volo.Abp.PermissionManagement.EntityFrameworkCore" Version="4.3.3" /> |
|||
<PackageReference Include="Volo.Abp.SettingManagement.EntityFrameworkCore" Version="4.3.3" /> |
|||
<PackageReference Include="Volo.Abp.AuditLogging.EntityFrameworkCore" Version="4.3.3" /> |
|||
<PackageReference Include="Volo.Abp.FeatureManagement.EntityFrameworkCore" Version="4.3.3" /> |
|||
<PackageReference Include="Volo.Abp.BlobStoring.Database.EntityFrameworkCore" Version="4.3.3" /> |
|||
</ItemGroup> |
|||
|
|||
</Project> |
|||
@ -0,0 +1,60 @@ |
|||
using Microsoft.EntityFrameworkCore; |
|||
using Volo.Abp.AuditLogging; |
|||
using Volo.Abp.AuditLogging.EntityFrameworkCore; |
|||
using Volo.Abp.BlobStoring.Database; |
|||
using Volo.Abp.BlobStoring.Database.EntityFrameworkCore; |
|||
using Volo.Abp.Data; |
|||
using Volo.Abp.EntityFrameworkCore; |
|||
using Volo.Abp.EntityFrameworkCore.Modeling; |
|||
using Volo.Abp.FeatureManagement; |
|||
using Volo.Abp.FeatureManagement.EntityFrameworkCore; |
|||
using Volo.Abp.PermissionManagement; |
|||
using Volo.Abp.PermissionManagement.EntityFrameworkCore; |
|||
using Volo.Abp.SettingManagement; |
|||
using Volo.Abp.SettingManagement.EntityFrameworkCore; |
|||
|
|||
namespace EShopOnAbp.AdministrationService.EntityFrameworkCore |
|||
{ |
|||
/* This is your actual DbContext used on runtime. |
|||
* It includes only your entities. |
|||
* It does not include entities of the used modules, because each module has already |
|||
* its own DbContext class. If you want to share some database tables with the used modules, |
|||
* just create a structure like done for AppUser. |
|||
* |
|||
* Don't use this DbContext for database migrations since it does not contain tables of the |
|||
* used modules (as explained above). See AdministrationServiceMigrationsDbContext for migrations. |
|||
*/ |
|||
[ConnectionStringName(AdministrationServiceDbProperties.ConnectionStringName)] |
|||
public class AdministrationServiceDbContext |
|||
: AbpDbContext<AdministrationServiceDbContext>, |
|||
IPermissionManagementDbContext, |
|||
ISettingManagementDbContext, |
|||
IFeatureManagementDbContext, |
|||
IAuditLoggingDbContext, |
|||
IBlobStoringDbContext |
|||
{ |
|||
public AdministrationServiceDbContext(DbContextOptions<AdministrationServiceDbContext> options) |
|||
: base(options) |
|||
{ |
|||
|
|||
} |
|||
|
|||
public DbSet<PermissionGrant> PermissionGrants { get; } |
|||
public DbSet<Setting> Settings { get; } |
|||
public DbSet<FeatureValue> FeatureValues { get; } |
|||
public DbSet<AuditLog> AuditLogs { get; } |
|||
public DbSet<DatabaseBlobContainer> BlobContainers { get; } |
|||
public DbSet<DatabaseBlob> Blobs { get; } |
|||
|
|||
protected override void OnModelCreating(ModelBuilder builder) |
|||
{ |
|||
base.OnModelCreating(builder); |
|||
|
|||
builder.ConfigurePermissionManagement(); |
|||
builder.ConfigureSettingManagement(); |
|||
builder.ConfigureFeatureManagement(); |
|||
builder.ConfigureAuditLogging(); |
|||
builder.ConfigureBlobStoring(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,41 @@ |
|||
using Microsoft.EntityFrameworkCore; |
|||
using Microsoft.EntityFrameworkCore.Design; |
|||
using Microsoft.Extensions.Configuration; |
|||
using System.IO; |
|||
|
|||
namespace EShopOnAbp.AdministrationService.EntityFrameworkCore |
|||
{ |
|||
public class AdministrationServiceDbContextFactory : IDesignTimeDbContextFactory<AdministrationServiceDbContext> |
|||
{ |
|||
public AdministrationServiceDbContext CreateDbContext(string[] args) |
|||
{ |
|||
var builder = new DbContextOptionsBuilder<AdministrationServiceDbContext>() |
|||
.UseSqlServer(GetConnectionStringFromConfiguration(), b => |
|||
{ |
|||
b.MigrationsHistoryTable("__AdministrationService_Migrations"); |
|||
}); |
|||
|
|||
return new AdministrationServiceDbContext(builder.Options); |
|||
} |
|||
|
|||
private static string GetConnectionStringFromConfiguration() |
|||
{ |
|||
return BuildConfiguration() |
|||
.GetConnectionString(AdministrationServiceDbProperties.ConnectionStringName); |
|||
} |
|||
|
|||
private static IConfigurationRoot BuildConfiguration() |
|||
{ |
|||
var builder = new ConfigurationBuilder() |
|||
.SetBasePath( |
|||
Path.Combine( |
|||
Directory.GetCurrentDirectory(), |
|||
$"..{Path.DirectorySeparatorChar}EShopOnAbp.AdministrationService.HttpApi.Host" |
|||
) |
|||
) |
|||
.AddJsonFile("appsettings.json", optional: false); |
|||
|
|||
return builder.Build(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,49 @@ |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Volo.Abp.AuditLogging.EntityFrameworkCore; |
|||
using Volo.Abp.BlobStoring.Database.EntityFrameworkCore; |
|||
using Volo.Abp.EntityFrameworkCore; |
|||
using Volo.Abp.EntityFrameworkCore.SqlServer; |
|||
using Volo.Abp.FeatureManagement.EntityFrameworkCore; |
|||
using Volo.Abp.Modularity; |
|||
using Volo.Abp.PermissionManagement.EntityFrameworkCore; |
|||
using Volo.Abp.SettingManagement.EntityFrameworkCore; |
|||
|
|||
namespace EShopOnAbp.AdministrationService.EntityFrameworkCore |
|||
{ |
|||
[DependsOn( |
|||
typeof(AdministrationServiceDomainModule), |
|||
typeof(AbpEntityFrameworkCoreSqlServerModule), |
|||
typeof(AbpPermissionManagementEntityFrameworkCoreModule), |
|||
typeof(AbpSettingManagementEntityFrameworkCoreModule), |
|||
typeof(AbpAuditLoggingEntityFrameworkCoreModule), |
|||
typeof(AbpFeatureManagementEntityFrameworkCoreModule), |
|||
typeof(BlobStoringDatabaseEntityFrameworkCoreModule) |
|||
)] |
|||
public class AdministrationServiceEntityFrameworkCoreModule : AbpModule |
|||
{ |
|||
public override void ConfigureServices(ServiceConfigurationContext context) |
|||
{ |
|||
context.Services.AddAbpDbContext<AdministrationServiceDbContext>(options => |
|||
{ |
|||
options.ReplaceDbContext<IPermissionManagementDbContext>(); |
|||
options.ReplaceDbContext<ISettingManagementDbContext>(); |
|||
options.ReplaceDbContext<IFeatureManagementDbContext>(); |
|||
options.ReplaceDbContext<IAuditLoggingDbContext>(); |
|||
options.ReplaceDbContext<IBlobStoringDbContext>(); |
|||
|
|||
options.AddDefaultRepositories(includeAllEntities: true); |
|||
}); |
|||
|
|||
Configure<AbpDbContextOptions>(options => |
|||
{ |
|||
options.Configure<AdministrationServiceDbContext>(c => |
|||
{ |
|||
c.UseSqlServer(b => |
|||
{ |
|||
b.MigrationsHistoryTable("__AdministrationService_Migrations"); |
|||
}); |
|||
}); |
|||
}); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,486 @@ |
|||
// <auto-generated />
|
|||
using System; |
|||
using EShopOnAbp.AdministrationService.EntityFrameworkCore; |
|||
using Microsoft.EntityFrameworkCore; |
|||
using Microsoft.EntityFrameworkCore.Infrastructure; |
|||
using Microsoft.EntityFrameworkCore.Metadata; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; |
|||
using Volo.Abp.EntityFrameworkCore; |
|||
|
|||
namespace EShopOnAbp.AdministrationService.Migrations |
|||
{ |
|||
[DbContext(typeof(AdministrationServiceDbContext))] |
|||
[Migration("20210629102834_Initial")] |
|||
partial class Initial |
|||
{ |
|||
protected override void BuildTargetModel(ModelBuilder modelBuilder) |
|||
{ |
|||
#pragma warning disable 612, 618
|
|||
modelBuilder |
|||
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) |
|||
.HasAnnotation("Relational:MaxIdentifierLength", 128) |
|||
.HasAnnotation("ProductVersion", "5.0.7") |
|||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("ApplicationName") |
|||
.HasMaxLength(96) |
|||
.HasColumnType("nvarchar(96)") |
|||
.HasColumnName("ApplicationName"); |
|||
|
|||
b.Property<string>("BrowserInfo") |
|||
.HasMaxLength(512) |
|||
.HasColumnType("nvarchar(512)") |
|||
.HasColumnName("BrowserInfo"); |
|||
|
|||
b.Property<string>("ClientId") |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)") |
|||
.HasColumnName("ClientId"); |
|||
|
|||
b.Property<string>("ClientIpAddress") |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)") |
|||
.HasColumnName("ClientIpAddress"); |
|||
|
|||
b.Property<string>("ClientName") |
|||
.HasMaxLength(128) |
|||
.HasColumnType("nvarchar(128)") |
|||
.HasColumnName("ClientName"); |
|||
|
|||
b.Property<string>("Comments") |
|||
.HasMaxLength(256) |
|||
.HasColumnType("nvarchar(256)") |
|||
.HasColumnName("Comments"); |
|||
|
|||
b.Property<string>("ConcurrencyStamp") |
|||
.IsConcurrencyToken() |
|||
.HasMaxLength(40) |
|||
.HasColumnType("nvarchar(40)") |
|||
.HasColumnName("ConcurrencyStamp"); |
|||
|
|||
b.Property<string>("CorrelationId") |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)") |
|||
.HasColumnName("CorrelationId"); |
|||
|
|||
b.Property<string>("Exceptions") |
|||
.HasMaxLength(4000) |
|||
.HasColumnType("nvarchar(4000)") |
|||
.HasColumnName("Exceptions"); |
|||
|
|||
b.Property<int>("ExecutionDuration") |
|||
.HasColumnType("int") |
|||
.HasColumnName("ExecutionDuration"); |
|||
|
|||
b.Property<DateTime>("ExecutionTime") |
|||
.HasColumnType("datetime2"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnType("nvarchar(max)") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<string>("HttpMethod") |
|||
.HasMaxLength(16) |
|||
.HasColumnType("nvarchar(16)") |
|||
.HasColumnName("HttpMethod"); |
|||
|
|||
b.Property<int?>("HttpStatusCode") |
|||
.HasColumnType("int") |
|||
.HasColumnName("HttpStatusCode"); |
|||
|
|||
b.Property<Guid?>("ImpersonatorTenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("ImpersonatorTenantId"); |
|||
|
|||
b.Property<Guid?>("ImpersonatorUserId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("ImpersonatorUserId"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.Property<string>("TenantName") |
|||
.HasColumnType("nvarchar(max)"); |
|||
|
|||
b.Property<string>("Url") |
|||
.HasMaxLength(256) |
|||
.HasColumnType("nvarchar(256)") |
|||
.HasColumnName("Url"); |
|||
|
|||
b.Property<Guid?>("UserId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("UserId"); |
|||
|
|||
b.Property<string>("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<Guid>("Id") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<Guid>("AuditLogId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("AuditLogId"); |
|||
|
|||
b.Property<int>("ExecutionDuration") |
|||
.HasColumnType("int") |
|||
.HasColumnName("ExecutionDuration"); |
|||
|
|||
b.Property<DateTime>("ExecutionTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("ExecutionTime"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnType("nvarchar(max)") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<string>("MethodName") |
|||
.HasMaxLength(128) |
|||
.HasColumnType("nvarchar(128)") |
|||
.HasColumnName("MethodName"); |
|||
|
|||
b.Property<string>("Parameters") |
|||
.HasMaxLength(2000) |
|||
.HasColumnType("nvarchar(2000)") |
|||
.HasColumnName("Parameters"); |
|||
|
|||
b.Property<string>("ServiceName") |
|||
.HasMaxLength(256) |
|||
.HasColumnType("nvarchar(256)") |
|||
.HasColumnName("ServiceName"); |
|||
|
|||
b.Property<Guid?>("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<Guid>("Id") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<Guid>("AuditLogId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("AuditLogId"); |
|||
|
|||
b.Property<DateTime>("ChangeTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("ChangeTime"); |
|||
|
|||
b.Property<byte>("ChangeType") |
|||
.HasColumnType("tinyint") |
|||
.HasColumnName("ChangeType"); |
|||
|
|||
b.Property<string>("EntityId") |
|||
.IsRequired() |
|||
.HasMaxLength(128) |
|||
.HasColumnType("nvarchar(128)") |
|||
.HasColumnName("EntityId"); |
|||
|
|||
b.Property<Guid?>("EntityTenantId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("EntityTypeFullName") |
|||
.IsRequired() |
|||
.HasMaxLength(128) |
|||
.HasColumnType("nvarchar(128)") |
|||
.HasColumnName("EntityTypeFullName"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnType("nvarchar(max)") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<Guid?>("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<Guid>("Id") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<Guid>("EntityChangeId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("NewValue") |
|||
.HasMaxLength(512) |
|||
.HasColumnType("nvarchar(512)") |
|||
.HasColumnName("NewValue"); |
|||
|
|||
b.Property<string>("OriginalValue") |
|||
.HasMaxLength(512) |
|||
.HasColumnType("nvarchar(512)") |
|||
.HasColumnName("OriginalValue"); |
|||
|
|||
b.Property<string>("PropertyName") |
|||
.IsRequired() |
|||
.HasMaxLength(128) |
|||
.HasColumnType("nvarchar(128)") |
|||
.HasColumnName("PropertyName"); |
|||
|
|||
b.Property<string>("PropertyTypeFullName") |
|||
.IsRequired() |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)") |
|||
.HasColumnName("PropertyTypeFullName"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("EntityChangeId"); |
|||
|
|||
b.ToTable("AbpEntityPropertyChanges"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.BlobStoring.Database.DatabaseBlob", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("ConcurrencyStamp") |
|||
.IsConcurrencyToken() |
|||
.HasMaxLength(40) |
|||
.HasColumnType("nvarchar(40)") |
|||
.HasColumnName("ConcurrencyStamp"); |
|||
|
|||
b.Property<Guid>("ContainerId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<byte[]>("Content") |
|||
.HasMaxLength(2147483647) |
|||
.HasColumnType("varbinary(max)"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnType("nvarchar(max)") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<string>("Name") |
|||
.IsRequired() |
|||
.HasMaxLength(256) |
|||
.HasColumnType("nvarchar(256)"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("ContainerId"); |
|||
|
|||
b.HasIndex("TenantId", "ContainerId", "Name"); |
|||
|
|||
b.ToTable("AbpBlobs"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.BlobStoring.Database.DatabaseBlobContainer", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("ConcurrencyStamp") |
|||
.IsConcurrencyToken() |
|||
.HasMaxLength(40) |
|||
.HasColumnType("nvarchar(40)") |
|||
.HasColumnName("ConcurrencyStamp"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnType("nvarchar(max)") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<string>("Name") |
|||
.IsRequired() |
|||
.HasMaxLength(128) |
|||
.HasColumnType("nvarchar(128)"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("TenantId", "Name"); |
|||
|
|||
b.ToTable("AbpBlobContainers"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("Name") |
|||
.IsRequired() |
|||
.HasMaxLength(128) |
|||
.HasColumnType("nvarchar(128)"); |
|||
|
|||
b.Property<string>("ProviderKey") |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<string>("ProviderName") |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<string>("Value") |
|||
.IsRequired() |
|||
.HasMaxLength(128) |
|||
.HasColumnType("nvarchar(128)"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("Name", "ProviderName", "ProviderKey"); |
|||
|
|||
b.ToTable("AbpFeatureValues"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("Name") |
|||
.IsRequired() |
|||
.HasMaxLength(128) |
|||
.HasColumnType("nvarchar(128)"); |
|||
|
|||
b.Property<string>("ProviderKey") |
|||
.IsRequired() |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<string>("ProviderName") |
|||
.IsRequired() |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("Name", "ProviderName", "ProviderKey"); |
|||
|
|||
b.ToTable("AbpPermissionGrants"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("Name") |
|||
.IsRequired() |
|||
.HasMaxLength(128) |
|||
.HasColumnType("nvarchar(128)"); |
|||
|
|||
b.Property<string>("ProviderKey") |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<string>("ProviderName") |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<string>("Value") |
|||
.IsRequired() |
|||
.HasMaxLength(2048) |
|||
.HasColumnType("nvarchar(2048)"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("Name", "ProviderName", "ProviderKey"); |
|||
|
|||
b.ToTable("AbpSettings"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => |
|||
{ |
|||
b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) |
|||
.WithMany("Actions") |
|||
.HasForeignKey("AuditLogId") |
|||
.OnDelete(DeleteBehavior.Cascade) |
|||
.IsRequired(); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => |
|||
{ |
|||
b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) |
|||
.WithMany("EntityChanges") |
|||
.HasForeignKey("AuditLogId") |
|||
.OnDelete(DeleteBehavior.Cascade) |
|||
.IsRequired(); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => |
|||
{ |
|||
b.HasOne("Volo.Abp.AuditLogging.EntityChange", null) |
|||
.WithMany("PropertyChanges") |
|||
.HasForeignKey("EntityChangeId") |
|||
.OnDelete(DeleteBehavior.Cascade) |
|||
.IsRequired(); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.BlobStoring.Database.DatabaseBlob", b => |
|||
{ |
|||
b.HasOne("Volo.Abp.BlobStoring.Database.DatabaseBlobContainer", null) |
|||
.WithMany() |
|||
.HasForeignKey("ContainerId") |
|||
.OnDelete(DeleteBehavior.Cascade) |
|||
.IsRequired(); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => |
|||
{ |
|||
b.Navigation("Actions"); |
|||
|
|||
b.Navigation("EntityChanges"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => |
|||
{ |
|||
b.Navigation("PropertyChanges"); |
|||
}); |
|||
#pragma warning restore 612, 618
|
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,294 @@ |
|||
using System; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
namespace EShopOnAbp.AdministrationService.Migrations |
|||
{ |
|||
public partial class Initial : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.CreateTable( |
|||
name: "AbpAuditLogs", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
ApplicationName = table.Column<string>(type: "nvarchar(96)", maxLength: 96, nullable: true), |
|||
UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
UserName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
TenantName = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
ImpersonatorUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
ImpersonatorTenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
ExecutionTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|||
ExecutionDuration = table.Column<int>(type: "int", nullable: false), |
|||
ClientIpAddress = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
|||
ClientName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true), |
|||
ClientId = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
|||
CorrelationId = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
|||
BrowserInfo = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true), |
|||
HttpMethod = table.Column<string>(type: "nvarchar(16)", maxLength: 16, nullable: true), |
|||
Url = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true), |
|||
Exceptions = table.Column<string>(type: "nvarchar(4000)", maxLength: 4000, nullable: true), |
|||
Comments = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true), |
|||
HttpStatusCode = table.Column<int>(type: "int", nullable: true), |
|||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpAuditLogs", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "AbpBlobContainers", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false), |
|||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpBlobContainers", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "AbpFeatureValues", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false), |
|||
Value = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false), |
|||
ProviderName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
|||
ProviderKey = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpFeatureValues", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "AbpPermissionGrants", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false), |
|||
ProviderName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|||
ProviderKey = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpPermissionGrants", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "AbpSettings", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false), |
|||
Value = table.Column<string>(type: "nvarchar(2048)", maxLength: 2048, nullable: false), |
|||
ProviderName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
|||
ProviderKey = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpSettings", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "AbpAuditLogActions", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
AuditLogId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
ServiceName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true), |
|||
MethodName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true), |
|||
Parameters = table.Column<string>(type: "nvarchar(2000)", maxLength: 2000, nullable: true), |
|||
ExecutionTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|||
ExecutionDuration = table.Column<int>(type: "int", nullable: false), |
|||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpAuditLogActions", x => x.Id); |
|||
table.ForeignKey( |
|||
name: "FK_AbpAuditLogActions_AbpAuditLogs_AuditLogId", |
|||
column: x => x.AuditLogId, |
|||
principalTable: "AbpAuditLogs", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "AbpEntityChanges", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
AuditLogId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
ChangeTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|||
ChangeType = table.Column<byte>(type: "tinyint", nullable: false), |
|||
EntityTenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
EntityId = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false), |
|||
EntityTypeFullName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false), |
|||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpEntityChanges", x => x.Id); |
|||
table.ForeignKey( |
|||
name: "FK_AbpEntityChanges_AbpAuditLogs_AuditLogId", |
|||
column: x => x.AuditLogId, |
|||
principalTable: "AbpAuditLogs", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "AbpBlobs", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
ContainerId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
Name = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false), |
|||
Content = table.Column<byte[]>(type: "varbinary(max)", maxLength: 2147483647, nullable: true), |
|||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpBlobs", x => x.Id); |
|||
table.ForeignKey( |
|||
name: "FK_AbpBlobs_AbpBlobContainers_ContainerId", |
|||
column: x => x.ContainerId, |
|||
principalTable: "AbpBlobContainers", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "AbpEntityPropertyChanges", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
EntityChangeId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
NewValue = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true), |
|||
OriginalValue = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true), |
|||
PropertyName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false), |
|||
PropertyTypeFullName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpEntityPropertyChanges", x => x.Id); |
|||
table.ForeignKey( |
|||
name: "FK_AbpEntityPropertyChanges_AbpEntityChanges_EntityChangeId", |
|||
column: x => x.EntityChangeId, |
|||
principalTable: "AbpEntityChanges", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpAuditLogActions_AuditLogId", |
|||
table: "AbpAuditLogActions", |
|||
column: "AuditLogId"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpAuditLogActions_TenantId_ServiceName_MethodName_ExecutionTime", |
|||
table: "AbpAuditLogActions", |
|||
columns: new[] { "TenantId", "ServiceName", "MethodName", "ExecutionTime" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpAuditLogs_TenantId_ExecutionTime", |
|||
table: "AbpAuditLogs", |
|||
columns: new[] { "TenantId", "ExecutionTime" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpAuditLogs_TenantId_UserId_ExecutionTime", |
|||
table: "AbpAuditLogs", |
|||
columns: new[] { "TenantId", "UserId", "ExecutionTime" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpBlobContainers_TenantId_Name", |
|||
table: "AbpBlobContainers", |
|||
columns: new[] { "TenantId", "Name" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpBlobs_ContainerId", |
|||
table: "AbpBlobs", |
|||
column: "ContainerId"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpBlobs_TenantId_ContainerId_Name", |
|||
table: "AbpBlobs", |
|||
columns: new[] { "TenantId", "ContainerId", "Name" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpEntityChanges_AuditLogId", |
|||
table: "AbpEntityChanges", |
|||
column: "AuditLogId"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpEntityChanges_TenantId_EntityTypeFullName_EntityId", |
|||
table: "AbpEntityChanges", |
|||
columns: new[] { "TenantId", "EntityTypeFullName", "EntityId" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpEntityPropertyChanges_EntityChangeId", |
|||
table: "AbpEntityPropertyChanges", |
|||
column: "EntityChangeId"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpFeatureValues_Name_ProviderName_ProviderKey", |
|||
table: "AbpFeatureValues", |
|||
columns: new[] { "Name", "ProviderName", "ProviderKey" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpPermissionGrants_Name_ProviderName_ProviderKey", |
|||
table: "AbpPermissionGrants", |
|||
columns: new[] { "Name", "ProviderName", "ProviderKey" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpSettings_Name_ProviderName_ProviderKey", |
|||
table: "AbpSettings", |
|||
columns: new[] { "Name", "ProviderName", "ProviderKey" }); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropTable( |
|||
name: "AbpAuditLogActions"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpBlobs"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpEntityPropertyChanges"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpFeatureValues"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpPermissionGrants"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpSettings"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpBlobContainers"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpEntityChanges"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpAuditLogs"); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,484 @@ |
|||
// <auto-generated />
|
|||
using System; |
|||
using EShopOnAbp.AdministrationService.EntityFrameworkCore; |
|||
using Microsoft.EntityFrameworkCore; |
|||
using Microsoft.EntityFrameworkCore.Infrastructure; |
|||
using Microsoft.EntityFrameworkCore.Metadata; |
|||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; |
|||
using Volo.Abp.EntityFrameworkCore; |
|||
|
|||
namespace EShopOnAbp.AdministrationService.Migrations |
|||
{ |
|||
[DbContext(typeof(AdministrationServiceDbContext))] |
|||
partial class AdministrationServiceDbContextModelSnapshot : ModelSnapshot |
|||
{ |
|||
protected override void BuildModel(ModelBuilder modelBuilder) |
|||
{ |
|||
#pragma warning disable 612, 618
|
|||
modelBuilder |
|||
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) |
|||
.HasAnnotation("Relational:MaxIdentifierLength", 128) |
|||
.HasAnnotation("ProductVersion", "5.0.7") |
|||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("ApplicationName") |
|||
.HasMaxLength(96) |
|||
.HasColumnType("nvarchar(96)") |
|||
.HasColumnName("ApplicationName"); |
|||
|
|||
b.Property<string>("BrowserInfo") |
|||
.HasMaxLength(512) |
|||
.HasColumnType("nvarchar(512)") |
|||
.HasColumnName("BrowserInfo"); |
|||
|
|||
b.Property<string>("ClientId") |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)") |
|||
.HasColumnName("ClientId"); |
|||
|
|||
b.Property<string>("ClientIpAddress") |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)") |
|||
.HasColumnName("ClientIpAddress"); |
|||
|
|||
b.Property<string>("ClientName") |
|||
.HasMaxLength(128) |
|||
.HasColumnType("nvarchar(128)") |
|||
.HasColumnName("ClientName"); |
|||
|
|||
b.Property<string>("Comments") |
|||
.HasMaxLength(256) |
|||
.HasColumnType("nvarchar(256)") |
|||
.HasColumnName("Comments"); |
|||
|
|||
b.Property<string>("ConcurrencyStamp") |
|||
.IsConcurrencyToken() |
|||
.HasMaxLength(40) |
|||
.HasColumnType("nvarchar(40)") |
|||
.HasColumnName("ConcurrencyStamp"); |
|||
|
|||
b.Property<string>("CorrelationId") |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)") |
|||
.HasColumnName("CorrelationId"); |
|||
|
|||
b.Property<string>("Exceptions") |
|||
.HasMaxLength(4000) |
|||
.HasColumnType("nvarchar(4000)") |
|||
.HasColumnName("Exceptions"); |
|||
|
|||
b.Property<int>("ExecutionDuration") |
|||
.HasColumnType("int") |
|||
.HasColumnName("ExecutionDuration"); |
|||
|
|||
b.Property<DateTime>("ExecutionTime") |
|||
.HasColumnType("datetime2"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnType("nvarchar(max)") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<string>("HttpMethod") |
|||
.HasMaxLength(16) |
|||
.HasColumnType("nvarchar(16)") |
|||
.HasColumnName("HttpMethod"); |
|||
|
|||
b.Property<int?>("HttpStatusCode") |
|||
.HasColumnType("int") |
|||
.HasColumnName("HttpStatusCode"); |
|||
|
|||
b.Property<Guid?>("ImpersonatorTenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("ImpersonatorTenantId"); |
|||
|
|||
b.Property<Guid?>("ImpersonatorUserId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("ImpersonatorUserId"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.Property<string>("TenantName") |
|||
.HasColumnType("nvarchar(max)"); |
|||
|
|||
b.Property<string>("Url") |
|||
.HasMaxLength(256) |
|||
.HasColumnType("nvarchar(256)") |
|||
.HasColumnName("Url"); |
|||
|
|||
b.Property<Guid?>("UserId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("UserId"); |
|||
|
|||
b.Property<string>("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<Guid>("Id") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<Guid>("AuditLogId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("AuditLogId"); |
|||
|
|||
b.Property<int>("ExecutionDuration") |
|||
.HasColumnType("int") |
|||
.HasColumnName("ExecutionDuration"); |
|||
|
|||
b.Property<DateTime>("ExecutionTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("ExecutionTime"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnType("nvarchar(max)") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<string>("MethodName") |
|||
.HasMaxLength(128) |
|||
.HasColumnType("nvarchar(128)") |
|||
.HasColumnName("MethodName"); |
|||
|
|||
b.Property<string>("Parameters") |
|||
.HasMaxLength(2000) |
|||
.HasColumnType("nvarchar(2000)") |
|||
.HasColumnName("Parameters"); |
|||
|
|||
b.Property<string>("ServiceName") |
|||
.HasMaxLength(256) |
|||
.HasColumnType("nvarchar(256)") |
|||
.HasColumnName("ServiceName"); |
|||
|
|||
b.Property<Guid?>("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<Guid>("Id") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<Guid>("AuditLogId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("AuditLogId"); |
|||
|
|||
b.Property<DateTime>("ChangeTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("ChangeTime"); |
|||
|
|||
b.Property<byte>("ChangeType") |
|||
.HasColumnType("tinyint") |
|||
.HasColumnName("ChangeType"); |
|||
|
|||
b.Property<string>("EntityId") |
|||
.IsRequired() |
|||
.HasMaxLength(128) |
|||
.HasColumnType("nvarchar(128)") |
|||
.HasColumnName("EntityId"); |
|||
|
|||
b.Property<Guid?>("EntityTenantId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("EntityTypeFullName") |
|||
.IsRequired() |
|||
.HasMaxLength(128) |
|||
.HasColumnType("nvarchar(128)") |
|||
.HasColumnName("EntityTypeFullName"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnType("nvarchar(max)") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<Guid?>("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<Guid>("Id") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<Guid>("EntityChangeId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("NewValue") |
|||
.HasMaxLength(512) |
|||
.HasColumnType("nvarchar(512)") |
|||
.HasColumnName("NewValue"); |
|||
|
|||
b.Property<string>("OriginalValue") |
|||
.HasMaxLength(512) |
|||
.HasColumnType("nvarchar(512)") |
|||
.HasColumnName("OriginalValue"); |
|||
|
|||
b.Property<string>("PropertyName") |
|||
.IsRequired() |
|||
.HasMaxLength(128) |
|||
.HasColumnType("nvarchar(128)") |
|||
.HasColumnName("PropertyName"); |
|||
|
|||
b.Property<string>("PropertyTypeFullName") |
|||
.IsRequired() |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)") |
|||
.HasColumnName("PropertyTypeFullName"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("EntityChangeId"); |
|||
|
|||
b.ToTable("AbpEntityPropertyChanges"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.BlobStoring.Database.DatabaseBlob", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("ConcurrencyStamp") |
|||
.IsConcurrencyToken() |
|||
.HasMaxLength(40) |
|||
.HasColumnType("nvarchar(40)") |
|||
.HasColumnName("ConcurrencyStamp"); |
|||
|
|||
b.Property<Guid>("ContainerId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<byte[]>("Content") |
|||
.HasMaxLength(2147483647) |
|||
.HasColumnType("varbinary(max)"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnType("nvarchar(max)") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<string>("Name") |
|||
.IsRequired() |
|||
.HasMaxLength(256) |
|||
.HasColumnType("nvarchar(256)"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("ContainerId"); |
|||
|
|||
b.HasIndex("TenantId", "ContainerId", "Name"); |
|||
|
|||
b.ToTable("AbpBlobs"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.BlobStoring.Database.DatabaseBlobContainer", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("ConcurrencyStamp") |
|||
.IsConcurrencyToken() |
|||
.HasMaxLength(40) |
|||
.HasColumnType("nvarchar(40)") |
|||
.HasColumnName("ConcurrencyStamp"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnType("nvarchar(max)") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<string>("Name") |
|||
.IsRequired() |
|||
.HasMaxLength(128) |
|||
.HasColumnType("nvarchar(128)"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("TenantId", "Name"); |
|||
|
|||
b.ToTable("AbpBlobContainers"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("Name") |
|||
.IsRequired() |
|||
.HasMaxLength(128) |
|||
.HasColumnType("nvarchar(128)"); |
|||
|
|||
b.Property<string>("ProviderKey") |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<string>("ProviderName") |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<string>("Value") |
|||
.IsRequired() |
|||
.HasMaxLength(128) |
|||
.HasColumnType("nvarchar(128)"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("Name", "ProviderName", "ProviderKey"); |
|||
|
|||
b.ToTable("AbpFeatureValues"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("Name") |
|||
.IsRequired() |
|||
.HasMaxLength(128) |
|||
.HasColumnType("nvarchar(128)"); |
|||
|
|||
b.Property<string>("ProviderKey") |
|||
.IsRequired() |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<string>("ProviderName") |
|||
.IsRequired() |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("Name", "ProviderName", "ProviderKey"); |
|||
|
|||
b.ToTable("AbpPermissionGrants"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("Name") |
|||
.IsRequired() |
|||
.HasMaxLength(128) |
|||
.HasColumnType("nvarchar(128)"); |
|||
|
|||
b.Property<string>("ProviderKey") |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<string>("ProviderName") |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<string>("Value") |
|||
.IsRequired() |
|||
.HasMaxLength(2048) |
|||
.HasColumnType("nvarchar(2048)"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("Name", "ProviderName", "ProviderKey"); |
|||
|
|||
b.ToTable("AbpSettings"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => |
|||
{ |
|||
b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) |
|||
.WithMany("Actions") |
|||
.HasForeignKey("AuditLogId") |
|||
.OnDelete(DeleteBehavior.Cascade) |
|||
.IsRequired(); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => |
|||
{ |
|||
b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) |
|||
.WithMany("EntityChanges") |
|||
.HasForeignKey("AuditLogId") |
|||
.OnDelete(DeleteBehavior.Cascade) |
|||
.IsRequired(); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => |
|||
{ |
|||
b.HasOne("Volo.Abp.AuditLogging.EntityChange", null) |
|||
.WithMany("PropertyChanges") |
|||
.HasForeignKey("EntityChangeId") |
|||
.OnDelete(DeleteBehavior.Cascade) |
|||
.IsRequired(); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.BlobStoring.Database.DatabaseBlob", b => |
|||
{ |
|||
b.HasOne("Volo.Abp.BlobStoring.Database.DatabaseBlobContainer", null) |
|||
.WithMany() |
|||
.HasForeignKey("ContainerId") |
|||
.OnDelete(DeleteBehavior.Cascade) |
|||
.IsRequired(); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => |
|||
{ |
|||
b.Navigation("Actions"); |
|||
|
|||
b.Navigation("EntityChanges"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => |
|||
{ |
|||
b.Navigation("PropertyChanges"); |
|||
}); |
|||
#pragma warning restore 612, 618
|
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,25 @@ |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Volo.Abp.FeatureManagement; |
|||
using Volo.Abp.Modularity; |
|||
using Volo.Abp.PermissionManagement; |
|||
using Volo.Abp.SettingManagement; |
|||
|
|||
namespace EShopOnAbp.AdministrationService |
|||
{ |
|||
[DependsOn( |
|||
typeof(AdministrationServiceApplicationContractsModule), |
|||
typeof(AbpPermissionManagementHttpApiClientModule), |
|||
typeof(AbpFeatureManagementHttpApiClientModule), |
|||
typeof(AbpSettingManagementHttpApiClientModule) |
|||
)] |
|||
public class AdministrationServiceHttpApiClientModule : AbpModule |
|||
{ |
|||
public override void ConfigureServices(ServiceConfigurationContext context) |
|||
{ |
|||
context.Services.AddHttpClientProxies( |
|||
typeof(AdministrationServiceApplicationContractsModule).Assembly, |
|||
AdministrationServiceRemoteServiceConsts.RemoteServiceName |
|||
); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,18 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk"> |
|||
|
|||
<PropertyGroup> |
|||
<TargetFramework>netstandard2.0</TargetFramework> |
|||
<RootNamespace>EShopOnAbp.AdministrationService</RootNamespace> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="..\EShopOnAbp.AdministrationService.Application.Contracts\EShopOnAbp.AdministrationService.Application.Contracts.csproj" /> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<PackageReference Include="Volo.Abp.PermissionManagement.HttpApi.Client" Version="4.3.3" /> |
|||
<PackageReference Include="Volo.Abp.FeatureManagement.HttpApi.Client" Version="4.3.3" /> |
|||
<PackageReference Include="Volo.Abp.SettingManagement.HttpApi.Client" Version="4.3.3" /> |
|||
</ItemGroup> |
|||
|
|||
</Project> |
|||
@ -0,0 +1,91 @@ |
|||
using EShopOnAbp.AdministrationService.DbMigrations; |
|||
using EShopOnAbp.AdministrationService.EntityFrameworkCore; |
|||
using EShopOnAbp.SaasService; |
|||
using EShopOnAbp.Shared.Hosting.Microservices; |
|||
using Microsoft.AspNetCore.Builder; |
|||
using Microsoft.AspNetCore.Cors; |
|||
using Microsoft.Extensions.Configuration; |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Microsoft.Extensions.Hosting; |
|||
using Microsoft.OpenApi.Models; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.IO; |
|||
using System.Linq; |
|||
using System.Net.Http; |
|||
using Volo.Abp; |
|||
using Volo.Abp.Account; |
|||
using Volo.Abp.AspNetCore.Mvc; |
|||
using Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy; |
|||
using Volo.Abp.Http.Client.IdentityModel.Web; |
|||
using Volo.Abp.Localization; |
|||
using Volo.Abp.Modularity; |
|||
using Volo.Abp.Threading; |
|||
using Volo.Abp.UI.Navigation.Urls; |
|||
using Volo.Abp.VirtualFileSystem; |
|||
|
|||
namespace EShopOnAbp.AdministrationService |
|||
{ |
|||
[DependsOn( |
|||
typeof(AdministrationServiceHttpApiModule), |
|||
typeof(AdministrationServiceApplicationModule), |
|||
typeof(AdministrationServiceEntityFrameworkCoreModule), |
|||
typeof(EShopOnAbpSharedHostingMicroservicesModule), |
|||
typeof(AbpAccountApplicationContractsModule), |
|||
typeof(AbpHttpClientIdentityModelWebModule), |
|||
typeof(AbpAspNetCoreMvcUiMultiTenancyModule), |
|||
typeof(SaasServiceApplicationContractsModule) |
|||
)] |
|||
public class AdministrationServiceHttpApiHostModule : AbpModule |
|||
{ |
|||
public override void ConfigureServices(ServiceConfigurationContext context) |
|||
{ |
|||
JwtBearerConfigurationHelper.Configure(context, "AdministrationService"); |
|||
SwaggerConfigurationHelper.Configure(context, "Administration Service API"); |
|||
} |
|||
public override void OnApplicationInitialization(ApplicationInitializationContext context) |
|||
{ |
|||
var app = context.GetApplicationBuilder(); |
|||
var env = context.GetEnvironment(); |
|||
|
|||
if (env.IsDevelopment()) |
|||
{ |
|||
app.UseDeveloperExceptionPage(); |
|||
} |
|||
|
|||
app.UseCorrelationId(); |
|||
app.UseAbpRequestLocalization(); |
|||
app.UseStaticFiles(); |
|||
app.UseRouting(); |
|||
//app.UseHttpMetrics();
|
|||
app.UseAuthentication(); |
|||
app.UseAbpClaimsMap(); |
|||
app.UseMultiTenancy(); |
|||
app.UseAuthorization(); |
|||
app.UseSwagger(); |
|||
app.UseSwaggerUI(options => |
|||
{ |
|||
options.SwaggerEndpoint("/swagger/v1/swagger.json", "Administration Service API"); |
|||
}); |
|||
app.UseAbpSerilogEnrichers(); |
|||
app.UseAuditing(); |
|||
app.UseUnitOfWork(); |
|||
app.UseConfiguredEndpoints(endpoints => |
|||
{ |
|||
//endpoints.MapMetrics();
|
|||
}); |
|||
} |
|||
|
|||
public override void OnPostApplicationInitialization(ApplicationInitializationContext context) |
|||
{ |
|||
using (var scope = context.ServiceProvider.CreateScope()) |
|||
{ |
|||
AsyncHelper.RunSync( |
|||
() => scope.ServiceProvider |
|||
.GetRequiredService<AdministrationServiceDatabaseMigrationChecker>() |
|||
.CheckAsync() |
|||
); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,13 @@ |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Volo.Abp.AspNetCore.Mvc; |
|||
|
|||
namespace EShopOnAbp.AdministrationService.Controllers |
|||
{ |
|||
public class HomeController : AbpController |
|||
{ |
|||
public ActionResult Index() |
|||
{ |
|||
return Redirect("~/swagger"); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,27 @@ |
|||
using EShopOnAbp.AdministrationService.EntityFrameworkCore; |
|||
using EShopOnAbp.Shared.Hosting.Microservices.DbMigrations; |
|||
using System; |
|||
using Volo.Abp.EventBus.Distributed; |
|||
using Volo.Abp.MultiTenancy; |
|||
using Volo.Abp.Uow; |
|||
|
|||
namespace EShopOnAbp.AdministrationService.DbMigrations |
|||
{ |
|||
public class AdministrationServiceDatabaseMigrationChecker : PendingMigrationsCheckerBase<AdministrationServiceDbContext> |
|||
{ |
|||
public AdministrationServiceDatabaseMigrationChecker( |
|||
IUnitOfWorkManager unitOfWorkManager, |
|||
IServiceProvider serviceProvider, |
|||
ICurrentTenant currentTenant, |
|||
IDistributedEventBus distributedEventBus) |
|||
: base( |
|||
unitOfWorkManager, |
|||
serviceProvider, |
|||
currentTenant, |
|||
distributedEventBus, |
|||
AdministrationServiceDbProperties.ConnectionStringName) |
|||
{ |
|||
|
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,112 @@ |
|||
using EShopOnAbp.AdministrationService.EntityFrameworkCore; |
|||
using EShopOnAbp.Shared.Hosting.Microservices.DbMigrations; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.Authorization.Permissions; |
|||
using Volo.Abp.Data; |
|||
using Volo.Abp.EventBus.Distributed; |
|||
using Volo.Abp.MultiTenancy; |
|||
using Volo.Abp.PermissionManagement; |
|||
using Volo.Abp.TenantManagement; |
|||
using Volo.Abp.Uow; |
|||
|
|||
namespace EShopOnAbp.AdministrationService.DbMigrations |
|||
{ |
|||
public class AdministrationServiceDatabaseMigrationEventHandler |
|||
: DatabaseMigrationEventHandlerBase<AdministrationServiceDbContext>, |
|||
IDistributedEventHandler<TenantCreatedEto>, |
|||
IDistributedEventHandler<ApplyDatabaseMigrationsEto> |
|||
{ |
|||
private readonly IPermissionDefinitionManager _permissionDefinitionManager; |
|||
private readonly IPermissionDataSeeder _permissionDataSeeder; |
|||
|
|||
public AdministrationServiceDatabaseMigrationEventHandler( |
|||
ICurrentTenant currentTenant, |
|||
IUnitOfWorkManager unitOfWorkManager, |
|||
ITenantStore tenantStore, |
|||
IPermissionDefinitionManager permissionDefinitionManager, |
|||
IPermissionDataSeeder permissionDataSeeder, |
|||
ITenantRepository tenantRepository, |
|||
IDistributedEventBus distributedEventBus |
|||
) : base( |
|||
currentTenant, |
|||
unitOfWorkManager, |
|||
tenantStore, |
|||
tenantRepository, |
|||
distributedEventBus, |
|||
AdministrationServiceDbProperties.ConnectionStringName) |
|||
{ |
|||
_permissionDefinitionManager = permissionDefinitionManager; |
|||
_permissionDataSeeder = permissionDataSeeder; |
|||
} |
|||
|
|||
public async Task HandleEventAsync(ApplyDatabaseMigrationsEto eventData) |
|||
{ |
|||
if (eventData.DatabaseName != DatabaseName) |
|||
{ |
|||
return; |
|||
} |
|||
|
|||
try |
|||
{ |
|||
var schemaMigrated = await MigrateDatabaseSchemaAsync(eventData.TenantId); |
|||
await SeedDataAsync(eventData.TenantId); |
|||
|
|||
if (eventData.TenantId == null && schemaMigrated) |
|||
{ |
|||
/* Migrate tenant databases after host migration */ |
|||
await QueueTenantMigrationsAsync(); |
|||
} |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
await HandleErrorOnApplyDatabaseMigrationAsync(eventData, ex); |
|||
} |
|||
} |
|||
|
|||
public async Task HandleEventAsync(TenantCreatedEto eventData) |
|||
{ |
|||
try |
|||
{ |
|||
await MigrateDatabaseSchemaAsync(eventData.Id); |
|||
await SeedDataAsync(eventData.Id); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
await HandleErrorTenantCreatedAsync(eventData, ex); |
|||
} |
|||
} |
|||
|
|||
private async Task SeedDataAsync(Guid? tenantId) |
|||
{ |
|||
using (CurrentTenant.Change(tenantId)) |
|||
{ |
|||
using (var uow = UnitOfWorkManager.Begin(requiresNew: true, isTransactional: true)) |
|||
{ |
|||
var multiTenancySide = tenantId == null |
|||
? MultiTenancySides.Host |
|||
: MultiTenancySides.Tenant; |
|||
|
|||
var permissionNames = _permissionDefinitionManager |
|||
.GetPermissions() |
|||
.Where(p => p.MultiTenancySide.HasFlag(multiTenancySide)) |
|||
.Where(p => !p.Providers.Any() || p.Providers.Contains(RolePermissionValueProvider.ProviderName)) |
|||
.Select(p => p.Name) |
|||
.ToArray(); |
|||
|
|||
await _permissionDataSeeder.SeedAsync( |
|||
RolePermissionValueProvider.ProviderName, |
|||
"admin", |
|||
permissionNames, |
|||
tenantId |
|||
); |
|||
|
|||
await uow.CompleteAsync(); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,40 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk.Web"> |
|||
|
|||
<PropertyGroup> |
|||
<TargetFramework>net5.0</TargetFramework> |
|||
<RootNamespace>EShopOnAbp.AdministrationService</RootNamespace> |
|||
<PreserveCompilationReferences>true</PreserveCompilationReferences> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.*"> |
|||
<PrivateAssets>all</PrivateAssets> |
|||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> |
|||
</PackageReference> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<PackageReference Include="Volo.Abp.Http.Client.IdentityModel.Web" Version="4.3.3" /> |
|||
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy" Version="4.3.3" /> |
|||
<PackageReference Include="Volo.Abp.Account.Application.Contracts" Version="4.3.3" /> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="..\EShopOnAbp.AdministrationService.EntityFrameworkCore\EShopOnAbp.AdministrationService.EntityFrameworkCore.csproj" /> |
|||
<ProjectReference Include="..\EShopOnAbp.AdministrationService.Application\EShopOnAbp.AdministrationService.Application.csproj" /> |
|||
<ProjectReference Include="..\EShopOnAbp.AdministrationService.HttpApi\EShopOnAbp.AdministrationService.HttpApi.csproj" /> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="..\..\..\..\shared\EShopOnAbp.Shared.Hosting.Microservices\EShopOnAbp.Shared.Hosting.Microservices.csproj" /> |
|||
<ProjectReference Include="..\..\..\saas\src\EShopOnAbp.SaasService.Application.Contracts\EShopOnAbp.SaasService.Application.Contracts.csproj" /> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<Compile Remove="Logs\**" /> |
|||
<Content Remove="Logs\**" /> |
|||
<EmbeddedResource Remove="Logs\**" /> |
|||
<None Remove="Logs\**" /> |
|||
</ItemGroup> |
|||
|
|||
</Project> |
|||
@ -0,0 +1,47 @@ |
|||
using System; |
|||
using System.Threading.Tasks; |
|||
using EShopOnAbp.Shared.Hosting.AspNetCore; |
|||
using Microsoft.AspNetCore.Hosting; |
|||
using Microsoft.Extensions.Configuration; |
|||
using Microsoft.Extensions.Hosting; |
|||
using Serilog; |
|||
using Serilog.Events; |
|||
|
|||
namespace EShopOnAbp.AdministrationService |
|||
{ |
|||
public class Program |
|||
{ |
|||
public static async Task<int> Main(string[] args) |
|||
{ |
|||
var assemblyName = typeof(Program).Assembly.GetName().Name; |
|||
|
|||
SerilogConfigurationHelper.Configure(assemblyName); |
|||
|
|||
try |
|||
{ |
|||
Log.Information($"Starting {assemblyName}."); |
|||
await CreateHostBuilder(args).Build().RunAsync(); |
|||
return 0; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
Log.Fatal(ex, $"{assemblyName} terminated unexpectedly!"); |
|||
return 1; |
|||
} |
|||
finally |
|||
{ |
|||
Log.CloseAndFlush(); |
|||
} |
|||
} |
|||
|
|||
internal static IHostBuilder CreateHostBuilder(string[] args) => |
|||
Host.CreateDefaultBuilder(args) |
|||
.ConfigureAppConfiguration(build => |
|||
{ |
|||
build.AddJsonFile("appsettings.secrets.json", optional: true); |
|||
}) |
|||
.ConfigureWebHostDefaults(webBuilder => { webBuilder.UseStartup<Startup>(); }) |
|||
.UseAutofac() |
|||
.UseSerilog(); |
|||
} |
|||
} |
|||
@ -0,0 +1,27 @@ |
|||
{ |
|||
"iisSettings": { |
|||
"windowsAuthentication": false, |
|||
"anonymousAuthentication": true, |
|||
"iisExpress": { |
|||
"applicationUrl": "https://localhost:44353", |
|||
"sslPort": 44353 |
|||
} |
|||
}, |
|||
"profiles": { |
|||
"IIS Express": { |
|||
"commandName": "IISExpress", |
|||
"launchBrowser": true, |
|||
"environmentVariables": { |
|||
"ASPNETCORE_ENVIRONMENT": "Development" |
|||
} |
|||
}, |
|||
"EShopOnAbp.AdministrationService.HttpApi.Host": { |
|||
"commandName": "Project", |
|||
"launchBrowser": true, |
|||
"applicationUrl": "https://localhost:44353", |
|||
"environmentVariables": { |
|||
"ASPNETCORE_ENVIRONMENT": "Development" |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,20 @@ |
|||
using Microsoft.AspNetCore.Builder; |
|||
using Microsoft.AspNetCore.Hosting; |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Microsoft.Extensions.Logging; |
|||
|
|||
namespace EShopOnAbp.AdministrationService |
|||
{ |
|||
public class Startup |
|||
{ |
|||
public void ConfigureServices(IServiceCollection services) |
|||
{ |
|||
services.AddApplication<AdministrationServiceHttpApiHostModule>(); |
|||
} |
|||
|
|||
public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory) |
|||
{ |
|||
app.InitializeApplication(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,2 @@ |
|||
{ |
|||
} |
|||
@ -0,0 +1,56 @@ |
|||
{ |
|||
"App": { |
|||
"SelfUrl": "https://localhost:44353" |
|||
}, |
|||
"AuthServer": { |
|||
"Authority": "https://localhost:44330", |
|||
"RequireHttpsMetadata": "true" |
|||
}, |
|||
"RemoteServices": { |
|||
"Default": { |
|||
"BaseUrl": "https://localhost:44302/", |
|||
"UseCurrentAccessToken": "false" |
|||
} |
|||
}, |
|||
"IdentityClients": { |
|||
"Default": { |
|||
"GrantType": "client_credentials", |
|||
"ClientId": "EShopOnAbp_AdministrationService", |
|||
"ClientSecret": "1q2w3e*", |
|||
"Authority": "https://localhost:44330", |
|||
"Scope": "IdentityService" |
|||
} |
|||
}, |
|||
"Logging": { |
|||
"LogLevel": { |
|||
"Default": "Information", |
|||
"Microsoft": "Warning", |
|||
"Microsoft.Hosting.Lifetime": "Information" |
|||
} |
|||
}, |
|||
"AllowedHosts": "*", |
|||
"ConnectionStrings": { |
|||
"SaasService": "Server=localhost,1434;Database=EShopOnAbp_Saas;User Id=sa;password=myPassw0rd;MultipleActiveResultSets=true", |
|||
"AdministrationService": "Server=localhost,1434;Database=EShopOnAbp_Administration;User Id=sa;password=myPassw0rd;MultipleActiveResultSets=true" |
|||
}, |
|||
"StringEncryption": { |
|||
"DefaultPassPhrase": "gsKnGZ041HLL4IM8" |
|||
}, |
|||
"Redis": { |
|||
"Configuration": "localhost:6379" |
|||
}, |
|||
"RabbitMQ": { |
|||
"Connections": { |
|||
"Default": { |
|||
"HostName": "localhost" |
|||
} |
|||
}, |
|||
"EventBus": { |
|||
"ClientName": "EShopOnAbp_AdministrationService", |
|||
"ExchangeName": "EShopOnAbp" |
|||
} |
|||
}, |
|||
"ElasticSearch": { |
|||
"Url": "http://localhost:9200" |
|||
} |
|||
} |
|||
@ -0,0 +1,18 @@ |
|||
using Volo.Abp.FeatureManagement; |
|||
using Volo.Abp.Modularity; |
|||
using Volo.Abp.PermissionManagement.HttpApi; |
|||
using Volo.Abp.SettingManagement; |
|||
|
|||
namespace EShopOnAbp.AdministrationService |
|||
{ |
|||
[DependsOn( |
|||
typeof(AdministrationServiceApplicationContractsModule), |
|||
typeof(AbpPermissionManagementHttpApiModule), |
|||
typeof(AbpFeatureManagementHttpApiModule), |
|||
typeof(AbpSettingManagementHttpApiModule) |
|||
)] |
|||
public class AdministrationServiceHttpApiModule : AbpModule |
|||
{ |
|||
|
|||
} |
|||
} |
|||
@ -0,0 +1,18 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk"> |
|||
|
|||
<PropertyGroup> |
|||
<TargetFramework>net5.0</TargetFramework> |
|||
<RootNamespace>EShopOnAbp.AdministrationService</RootNamespace> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="..\EShopOnAbp.AdministrationService.Application.Contracts\EShopOnAbp.AdministrationService.Application.Contracts.csproj" /> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<PackageReference Include="Volo.Abp.PermissionManagement.HttpApi" Version="4.3.3" /> |
|||
<PackageReference Include="Volo.Abp.FeatureManagement.HttpApi" Version="4.3.3" /> |
|||
<PackageReference Include="Volo.Abp.SettingManagement.HttpApi" Version="4.3.3" /> |
|||
</ItemGroup> |
|||
|
|||
</Project> |
|||
@ -0,0 +1,7 @@ |
|||
namespace EShopOnAbp.AdministrationService |
|||
{ |
|||
public abstract class AdministrationServiceApplicationTestBase : AdministrationServiceTestBase<AdministrationServiceApplicationTestModule> |
|||
{ |
|||
|
|||
} |
|||
} |
|||
@ -0,0 +1,13 @@ |
|||
using Volo.Abp.Modularity; |
|||
|
|||
namespace EShopOnAbp.AdministrationService |
|||
{ |
|||
[DependsOn( |
|||
typeof(AdministrationServiceApplicationModule), |
|||
typeof(AdministrationServiceDomainTestModule) |
|||
)] |
|||
public class AdministrationServiceApplicationTestModule : AbpModule |
|||
{ |
|||
|
|||
} |
|||
} |
|||
@ -0,0 +1,17 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk"> |
|||
|
|||
<PropertyGroup> |
|||
<TargetFramework>net5.0</TargetFramework> |
|||
<RootNamespace>EShopOnAbp.AdministrationService</RootNamespace> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="..\..\src\EShopOnAbp.AdministrationService.Application\EShopOnAbp.AdministrationService.Application.csproj" /> |
|||
<ProjectReference Include="..\EShopOnAbp.AdministrationService.Domain.Tests\EShopOnAbp.AdministrationService.Domain.Tests.csproj" /> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.1" /> |
|||
</ItemGroup> |
|||
|
|||
</Project> |
|||
@ -0,0 +1,7 @@ |
|||
namespace EShopOnAbp.AdministrationService |
|||
{ |
|||
public abstract class AdministrationServiceDomainTestBase : AdministrationServiceTestBase<AdministrationServiceDomainTestModule> |
|||
{ |
|||
|
|||
} |
|||
} |
|||
@ -0,0 +1,13 @@ |
|||
using EShopOnAbp.AdministrationService.EntityFrameworkCore; |
|||
using Volo.Abp.Modularity; |
|||
|
|||
namespace EShopOnAbp.AdministrationService |
|||
{ |
|||
[DependsOn( |
|||
typeof(AdministrationServiceEntityFrameworkCoreTestModule) |
|||
)] |
|||
public class AdministrationServiceDomainTestModule : AbpModule |
|||
{ |
|||
|
|||
} |
|||
} |
|||
@ -0,0 +1,16 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk"> |
|||
|
|||
<PropertyGroup> |
|||
<TargetFramework>net5.0</TargetFramework> |
|||
<RootNamespace>EShopOnAbp.AdministrationService</RootNamespace> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="..\EShopOnAbp.AdministrationService.EntityFrameworkCore.Tests\EShopOnAbp.AdministrationService.EntityFrameworkCore.Tests.csproj" /> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.1" /> |
|||
</ItemGroup> |
|||
|
|||
</Project> |
|||
@ -0,0 +1,17 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk"> |
|||
|
|||
<PropertyGroup> |
|||
<TargetFramework>net5.0</TargetFramework> |
|||
<RootNamespace>EShopOnAbp.AdministrationService</RootNamespace> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="..\EShopOnAbp.AdministrationService.TestBase\EShopOnAbp.AdministrationService.TestBase.csproj" /> |
|||
<PackageReference Include="Volo.Abp.EntityFrameworkCore.Sqlite" Version="4.3.3" /> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.1" /> |
|||
</ItemGroup> |
|||
|
|||
</Project> |
|||
@ -0,0 +1,9 @@ |
|||
using Volo.Abp; |
|||
|
|||
namespace EShopOnAbp.AdministrationService.EntityFrameworkCore |
|||
{ |
|||
public abstract class AdministrationServiceEntityFrameworkCoreTestBase : AdministrationServiceTestBase<AdministrationServiceEntityFrameworkCoreTestModule> |
|||
{ |
|||
|
|||
} |
|||
} |
|||
@ -0,0 +1,62 @@ |
|||
using Microsoft.Data.Sqlite; |
|||
using Microsoft.EntityFrameworkCore; |
|||
using Microsoft.EntityFrameworkCore.Infrastructure; |
|||
using Microsoft.EntityFrameworkCore.Storage; |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Volo.Abp; |
|||
using Volo.Abp.EntityFrameworkCore; |
|||
using Volo.Abp.EntityFrameworkCore.Sqlite; |
|||
using Volo.Abp.Modularity; |
|||
|
|||
namespace EShopOnAbp.AdministrationService.EntityFrameworkCore |
|||
{ |
|||
[DependsOn( |
|||
typeof(AdministrationServiceEntityFrameworkCoreDbMigrationsModule), |
|||
typeof(AdministrationServiceTestBaseModule), |
|||
typeof(AbpEntityFrameworkCoreSqliteModule) |
|||
)] |
|||
public class AdministrationServiceEntityFrameworkCoreTestModule : AbpModule |
|||
{ |
|||
private SqliteConnection _sqliteConnection; |
|||
|
|||
public override void ConfigureServices(ServiceConfigurationContext context) |
|||
{ |
|||
ConfigureInMemorySqlite(context.Services); |
|||
} |
|||
|
|||
private void ConfigureInMemorySqlite(IServiceCollection services) |
|||
{ |
|||
_sqliteConnection = CreateDatabaseAndGetConnection(); |
|||
|
|||
services.Configure<AbpDbContextOptions>(options => |
|||
{ |
|||
options.Configure(context => |
|||
{ |
|||
context.DbContextOptions.UseSqlite(_sqliteConnection); |
|||
}); |
|||
}); |
|||
} |
|||
|
|||
public override void OnApplicationShutdown(ApplicationShutdownContext context) |
|||
{ |
|||
_sqliteConnection.Dispose(); |
|||
} |
|||
|
|||
private static SqliteConnection CreateDatabaseAndGetConnection() |
|||
{ |
|||
var connection = new SqliteConnection("Data Source=:memory:"); |
|||
connection.Open(); |
|||
|
|||
var options = new DbContextOptionsBuilder<AdministrationServiceMigrationsDbContext>() |
|||
.UseSqlite(connection) |
|||
.Options; |
|||
|
|||
using (var context = new AdministrationServiceMigrationsDbContext(options)) |
|||
{ |
|||
context.GetService<IRelationalDatabaseCreator>().CreateTables(); |
|||
} |
|||
|
|||
return connection; |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,61 @@ |
|||
using System; |
|||
using System.Threading.Tasks; |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Volo.Abp; |
|||
using Volo.Abp.Modularity; |
|||
using Volo.Abp.Uow; |
|||
using Volo.Abp.Testing; |
|||
|
|||
namespace EShopOnAbp.AdministrationService |
|||
{ |
|||
/* All test classes are derived from this class, directly or indirectly. |
|||
*/ |
|||
public abstract class AdministrationServiceTestBase<TStartupModule> : AbpIntegratedTest<TStartupModule> |
|||
where TStartupModule : IAbpModule |
|||
{ |
|||
protected override void SetAbpApplicationCreationOptions(AbpApplicationCreationOptions options) |
|||
{ |
|||
options.UseAutofac(); |
|||
} |
|||
|
|||
protected virtual Task WithUnitOfWorkAsync(Func<Task> func) |
|||
{ |
|||
return WithUnitOfWorkAsync(new AbpUnitOfWorkOptions(), func); |
|||
} |
|||
|
|||
protected virtual async Task WithUnitOfWorkAsync(AbpUnitOfWorkOptions options, Func<Task> action) |
|||
{ |
|||
using (var scope = ServiceProvider.CreateScope()) |
|||
{ |
|||
var uowManager = scope.ServiceProvider.GetRequiredService<IUnitOfWorkManager>(); |
|||
|
|||
using (var uow = uowManager.Begin(options)) |
|||
{ |
|||
await action(); |
|||
|
|||
await uow.CompleteAsync(); |
|||
} |
|||
} |
|||
} |
|||
|
|||
protected virtual Task<TResult> WithUnitOfWorkAsync<TResult>(Func<Task<TResult>> func) |
|||
{ |
|||
return WithUnitOfWorkAsync(new AbpUnitOfWorkOptions(), func); |
|||
} |
|||
|
|||
protected virtual async Task<TResult> WithUnitOfWorkAsync<TResult>(AbpUnitOfWorkOptions options, Func<Task<TResult>> func) |
|||
{ |
|||
using (var scope = ServiceProvider.CreateScope()) |
|||
{ |
|||
var uowManager = scope.ServiceProvider.GetRequiredService<IUnitOfWorkManager>(); |
|||
|
|||
using (var uow = uowManager.Begin(options)) |
|||
{ |
|||
var result = await func(); |
|||
await uow.CompleteAsync(); |
|||
return result; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,62 @@ |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Volo.Abp; |
|||
using Volo.Abp.Authorization; |
|||
using Volo.Abp.Autofac; |
|||
using Volo.Abp.BackgroundJobs; |
|||
using Volo.Abp.Data; |
|||
using Volo.Abp.IdentityServer; |
|||
using Volo.Abp.Modularity; |
|||
using Volo.Abp.Threading; |
|||
|
|||
namespace EShopOnAbp.AdministrationService |
|||
{ |
|||
[DependsOn( |
|||
typeof(AbpAutofacModule), |
|||
typeof(AbpTestBaseModule), |
|||
typeof(AbpAuthorizationModule), |
|||
typeof(AdministrationServiceDomainModule) |
|||
)] |
|||
public class AdministrationServiceTestBaseModule : AbpModule |
|||
{ |
|||
public override void PreConfigureServices(ServiceConfigurationContext context) |
|||
{ |
|||
PreConfigure<AbpIdentityServerBuilderOptions>(options => |
|||
{ |
|||
options.AddDeveloperSigningCredential = false; |
|||
}); |
|||
|
|||
PreConfigure<IIdentityServerBuilder>(identityServerBuilder => |
|||
{ |
|||
identityServerBuilder.AddDeveloperSigningCredential(false, System.Guid.NewGuid().ToString()); |
|||
}); |
|||
} |
|||
|
|||
public override void ConfigureServices(ServiceConfigurationContext context) |
|||
{ |
|||
Configure<AbpBackgroundJobOptions>(options => |
|||
{ |
|||
options.IsJobExecutionEnabled = false; |
|||
}); |
|||
|
|||
context.Services.AddAlwaysAllowAuthorization(); |
|||
} |
|||
|
|||
public override void OnApplicationInitialization(ApplicationInitializationContext context) |
|||
{ |
|||
SeedTestData(context); |
|||
} |
|||
|
|||
private static void SeedTestData(ApplicationInitializationContext context) |
|||
{ |
|||
AsyncHelper.RunSync(async () => |
|||
{ |
|||
using (var scope = context.ServiceProvider.CreateScope()) |
|||
{ |
|||
await scope.ServiceProvider |
|||
.GetRequiredService<IDataSeeder>() |
|||
.SeedAsync(); |
|||
} |
|||
}); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,16 @@ |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.Data; |
|||
using Volo.Abp.DependencyInjection; |
|||
|
|||
namespace EShopOnAbp.AdministrationService |
|||
{ |
|||
public class AdministrationServiceTestDataSeedContributor : IDataSeedContributor, ITransientDependency |
|||
{ |
|||
public Task SeedAsync(DataSeedContext context) |
|||
{ |
|||
/* Seed additional test data... */ |
|||
|
|||
return Task.CompletedTask; |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,23 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk"> |
|||
<PropertyGroup> |
|||
<TargetFramework>net5.0</TargetFramework> |
|||
<RootNamespace>EShopOnAbp.AdministrationService</RootNamespace> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
<PackageReference Include="Volo.Abp.TestBase" Version="4.3.3" /> |
|||
<PackageReference Include="Volo.Abp.Autofac" Version="4.3.3" /> |
|||
<PackageReference Include="Volo.Abp.Authorization" Version="4.3.3" /> |
|||
<ProjectReference Include="..\..\src\EShopOnAbp.AdministrationService.Domain\EShopOnAbp.AdministrationService.Domain.csproj" /> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.1" /> |
|||
<PackageReference Include="NSubstitute" Version="4.2.2" /> |
|||
<PackageReference Include="Shouldly" Version="4.0.3" /> |
|||
<PackageReference Include="xunit" Version="2.4.1" /> |
|||
<PackageReference Include="xunit.extensibility.execution" Version="2.4.1" /> |
|||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" /> |
|||
</ItemGroup> |
|||
|
|||
</Project> |
|||
@ -0,0 +1,43 @@ |
|||
using System.Collections.Generic; |
|||
using System.Security.Claims; |
|||
using Volo.Abp.DependencyInjection; |
|||
using Volo.Abp.Security.Claims; |
|||
|
|||
namespace EShopOnAbp.AdministrationService.Security |
|||
{ |
|||
[Dependency(ReplaceServices = true)] |
|||
public class FakeCurrentPrincipalAccessor : ThreadCurrentPrincipalAccessor |
|||
{ |
|||
protected override ClaimsPrincipal GetClaimsPrincipal() |
|||
{ |
|||
return GetPrincipal(); |
|||
} |
|||
|
|||
private ClaimsPrincipal _principal; |
|||
|
|||
private ClaimsPrincipal GetPrincipal() |
|||
{ |
|||
if (_principal == null) |
|||
{ |
|||
lock (this) |
|||
{ |
|||
if (_principal == null) |
|||
{ |
|||
_principal = new ClaimsPrincipal( |
|||
new ClaimsIdentity( |
|||
new List<Claim> |
|||
{ |
|||
new Claim(AbpClaimTypes.UserId,"2e701e62-0953-4dd3-910b-dc6cc93ccb0d"), |
|||
new Claim(AbpClaimTypes.UserName,"admin"), |
|||
new Claim(AbpClaimTypes.Email,"admin@abp.io") |
|||
} |
|||
) |
|||
); |
|||
} |
|||
} |
|||
} |
|||
|
|||
return _principal; |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue