diff --git a/EShop.sln b/EShop.sln index f003f77d..6ad35584 100644 --- a/EShop.sln +++ b/EShop.sln @@ -341,6 +341,44 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyAbp.EShop.Plugins.Coupo EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyAbp.EShop.Orders.Plugins.Coupons", "plugins\Coupons\src\EasyAbp.EShop.Orders.Plugins.Coupons\EasyAbp.EShop.Orders.Plugins.Coupons.csproj", "{3C385657-8365-470F-9F4F-30F31F9FCA42}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Booking", "Booking", "{CE945F1D-6636-47D5-A619-C16C4E14CF8C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{A8C4583C-034E-47AF-B7EC-1A34EE288E2F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyAbp.EShop.Plugins.Booking.Application", "plugins\Booking\src\EasyAbp.EShop.Plugins.Booking.Application\EasyAbp.EShop.Plugins.Booking.Application.csproj", "{10C98582-61EB-49B9-9E6B-83E90CA3795D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyAbp.EShop.Plugins.Booking.Application.Contracts", "plugins\Booking\src\EasyAbp.EShop.Plugins.Booking.Application.Contracts\EasyAbp.EShop.Plugins.Booking.Application.Contracts.csproj", "{BA8BAB83-D8D9-4716-BB80-C58A67C5F7A3}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyAbp.EShop.Plugins.Booking.Domain", "plugins\Booking\src\EasyAbp.EShop.Plugins.Booking.Domain\EasyAbp.EShop.Plugins.Booking.Domain.csproj", "{1E65087A-DAC5-4595-9E1B-1BBE6C333D7D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyAbp.EShop.Plugins.Booking.Domain.Shared", "plugins\Booking\src\EasyAbp.EShop.Plugins.Booking.Domain.Shared\EasyAbp.EShop.Plugins.Booking.Domain.Shared.csproj", "{E78D741F-F071-4824-9386-E370717F7CBF}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore", "plugins\Booking\src\EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore\EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore.csproj", "{926BA9EC-AB2F-4E4F-8363-54426411A17C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyAbp.EShop.Plugins.Booking.HttpApi", "plugins\Booking\src\EasyAbp.EShop.Plugins.Booking.HttpApi\EasyAbp.EShop.Plugins.Booking.HttpApi.csproj", "{878A5B7A-269F-4356-8B97-E5BC5EE6BED9}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyAbp.EShop.Plugins.Booking.HttpApi.Client", "plugins\Booking\src\EasyAbp.EShop.Plugins.Booking.HttpApi.Client\EasyAbp.EShop.Plugins.Booking.HttpApi.Client.csproj", "{4EFA90C2-3EFE-4E9C-BDEB-274493EB8C9D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyAbp.EShop.Plugins.Booking.Installer", "plugins\Booking\src\EasyAbp.EShop.Plugins.Booking.Installer\EasyAbp.EShop.Plugins.Booking.Installer.csproj", "{FF764D80-17E6-4DE4-92CC-591F706B39DD}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyAbp.EShop.Plugins.Booking.MongoDB", "plugins\Booking\src\EasyAbp.EShop.Plugins.Booking.MongoDB\EasyAbp.EShop.Plugins.Booking.MongoDB.csproj", "{B7944CFA-31AB-4D35-925E-847E1115BF88}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyAbp.EShop.Plugins.Booking.Web", "plugins\Booking\src\EasyAbp.EShop.Plugins.Booking.Web\EasyAbp.EShop.Plugins.Booking.Web.csproj", "{E0ABB505-A788-4E66-A51E-94A9A0DD18FA}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{7087FDFF-196A-4C9F-8C66-EEBC2C49F2F8}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyAbp.EShop.Plugins.Booking.Application.Tests", "plugins\Booking\test\EasyAbp.EShop.Plugins.Booking.Application.Tests\EasyAbp.EShop.Plugins.Booking.Application.Tests.csproj", "{84C09B9B-97D8-4BAE-9741-ACE5707D5120}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyAbp.EShop.Plugins.Booking.Domain.Tests", "plugins\Booking\test\EasyAbp.EShop.Plugins.Booking.Domain.Tests\EasyAbp.EShop.Plugins.Booking.Domain.Tests.csproj", "{43DA07BB-DE8F-4D8F-B580-9BA75B39CFF3}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore.Tests", "plugins\Booking\test\EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore.Tests\EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore.Tests.csproj", "{435ED217-120E-472D-A9F6-B298FFFC3ADB}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyAbp.EShop.Plugins.Booking.HttpApi.Client.ConsoleTestApp", "plugins\Booking\test\EasyAbp.EShop.Plugins.Booking.HttpApi.Client.ConsoleTestApp\EasyAbp.EShop.Plugins.Booking.HttpApi.Client.ConsoleTestApp.csproj", "{0F0A4F84-419F-4547-9001-0853C1E509F9}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyAbp.EShop.Plugins.Booking.MongoDB.Tests", "plugins\Booking\test\EasyAbp.EShop.Plugins.Booking.MongoDB.Tests\EasyAbp.EShop.Plugins.Booking.MongoDB.Tests.csproj", "{5AE1B9B6-BE5D-4919-9612-7E11D384A985}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyAbp.EShop.Plugins.Booking.TestBase", "plugins\Booking\test\EasyAbp.EShop.Plugins.Booking.TestBase\EasyAbp.EShop.Plugins.Booking.TestBase.csproj", "{739CAE6A-14E6-44FC-8863-DA905CBD289F}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -895,6 +933,70 @@ Global {3C385657-8365-470F-9F4F-30F31F9FCA42}.Debug|Any CPU.Build.0 = Debug|Any CPU {3C385657-8365-470F-9F4F-30F31F9FCA42}.Release|Any CPU.ActiveCfg = Release|Any CPU {3C385657-8365-470F-9F4F-30F31F9FCA42}.Release|Any CPU.Build.0 = Release|Any CPU + {10C98582-61EB-49B9-9E6B-83E90CA3795D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {10C98582-61EB-49B9-9E6B-83E90CA3795D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {10C98582-61EB-49B9-9E6B-83E90CA3795D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {10C98582-61EB-49B9-9E6B-83E90CA3795D}.Release|Any CPU.Build.0 = Release|Any CPU + {BA8BAB83-D8D9-4716-BB80-C58A67C5F7A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BA8BAB83-D8D9-4716-BB80-C58A67C5F7A3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BA8BAB83-D8D9-4716-BB80-C58A67C5F7A3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BA8BAB83-D8D9-4716-BB80-C58A67C5F7A3}.Release|Any CPU.Build.0 = Release|Any CPU + {1E65087A-DAC5-4595-9E1B-1BBE6C333D7D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1E65087A-DAC5-4595-9E1B-1BBE6C333D7D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1E65087A-DAC5-4595-9E1B-1BBE6C333D7D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1E65087A-DAC5-4595-9E1B-1BBE6C333D7D}.Release|Any CPU.Build.0 = Release|Any CPU + {E78D741F-F071-4824-9386-E370717F7CBF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E78D741F-F071-4824-9386-E370717F7CBF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E78D741F-F071-4824-9386-E370717F7CBF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E78D741F-F071-4824-9386-E370717F7CBF}.Release|Any CPU.Build.0 = Release|Any CPU + {926BA9EC-AB2F-4E4F-8363-54426411A17C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {926BA9EC-AB2F-4E4F-8363-54426411A17C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {926BA9EC-AB2F-4E4F-8363-54426411A17C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {926BA9EC-AB2F-4E4F-8363-54426411A17C}.Release|Any CPU.Build.0 = Release|Any CPU + {878A5B7A-269F-4356-8B97-E5BC5EE6BED9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {878A5B7A-269F-4356-8B97-E5BC5EE6BED9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {878A5B7A-269F-4356-8B97-E5BC5EE6BED9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {878A5B7A-269F-4356-8B97-E5BC5EE6BED9}.Release|Any CPU.Build.0 = Release|Any CPU + {4EFA90C2-3EFE-4E9C-BDEB-274493EB8C9D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4EFA90C2-3EFE-4E9C-BDEB-274493EB8C9D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4EFA90C2-3EFE-4E9C-BDEB-274493EB8C9D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4EFA90C2-3EFE-4E9C-BDEB-274493EB8C9D}.Release|Any CPU.Build.0 = Release|Any CPU + {FF764D80-17E6-4DE4-92CC-591F706B39DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FF764D80-17E6-4DE4-92CC-591F706B39DD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FF764D80-17E6-4DE4-92CC-591F706B39DD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FF764D80-17E6-4DE4-92CC-591F706B39DD}.Release|Any CPU.Build.0 = Release|Any CPU + {B7944CFA-31AB-4D35-925E-847E1115BF88}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B7944CFA-31AB-4D35-925E-847E1115BF88}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B7944CFA-31AB-4D35-925E-847E1115BF88}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B7944CFA-31AB-4D35-925E-847E1115BF88}.Release|Any CPU.Build.0 = Release|Any CPU + {E0ABB505-A788-4E66-A51E-94A9A0DD18FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E0ABB505-A788-4E66-A51E-94A9A0DD18FA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E0ABB505-A788-4E66-A51E-94A9A0DD18FA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E0ABB505-A788-4E66-A51E-94A9A0DD18FA}.Release|Any CPU.Build.0 = Release|Any CPU + {84C09B9B-97D8-4BAE-9741-ACE5707D5120}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {84C09B9B-97D8-4BAE-9741-ACE5707D5120}.Debug|Any CPU.Build.0 = Debug|Any CPU + {84C09B9B-97D8-4BAE-9741-ACE5707D5120}.Release|Any CPU.ActiveCfg = Release|Any CPU + {84C09B9B-97D8-4BAE-9741-ACE5707D5120}.Release|Any CPU.Build.0 = Release|Any CPU + {43DA07BB-DE8F-4D8F-B580-9BA75B39CFF3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {43DA07BB-DE8F-4D8F-B580-9BA75B39CFF3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {43DA07BB-DE8F-4D8F-B580-9BA75B39CFF3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {43DA07BB-DE8F-4D8F-B580-9BA75B39CFF3}.Release|Any CPU.Build.0 = Release|Any CPU + {435ED217-120E-472D-A9F6-B298FFFC3ADB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {435ED217-120E-472D-A9F6-B298FFFC3ADB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {435ED217-120E-472D-A9F6-B298FFFC3ADB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {435ED217-120E-472D-A9F6-B298FFFC3ADB}.Release|Any CPU.Build.0 = Release|Any CPU + {0F0A4F84-419F-4547-9001-0853C1E509F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0F0A4F84-419F-4547-9001-0853C1E509F9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0F0A4F84-419F-4547-9001-0853C1E509F9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0F0A4F84-419F-4547-9001-0853C1E509F9}.Release|Any CPU.Build.0 = Release|Any CPU + {5AE1B9B6-BE5D-4919-9612-7E11D384A985}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5AE1B9B6-BE5D-4919-9612-7E11D384A985}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5AE1B9B6-BE5D-4919-9612-7E11D384A985}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5AE1B9B6-BE5D-4919-9612-7E11D384A985}.Release|Any CPU.Build.0 = Release|Any CPU + {739CAE6A-14E6-44FC-8863-DA905CBD289F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {739CAE6A-14E6-44FC-8863-DA905CBD289F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {739CAE6A-14E6-44FC-8863-DA905CBD289F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {739CAE6A-14E6-44FC-8863-DA905CBD289F}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1065,6 +1167,25 @@ Global {86CAD303-A0E5-42C9-89A5-61D9AAA4AD8F} = {4001814E-A67B-490D-9E13-2FB9A34B0A0B} {B076C103-DF0B-464B-A9CB-4BE5CAFEE067} = {4001814E-A67B-490D-9E13-2FB9A34B0A0B} {3C385657-8365-470F-9F4F-30F31F9FCA42} = {72F34527-9295-4F29-923E-4B075A4F31A2} + {CE945F1D-6636-47D5-A619-C16C4E14CF8C} = {94CC5A11-DA0F-413C-96CA-01DB0FC426E0} + {A8C4583C-034E-47AF-B7EC-1A34EE288E2F} = {CE945F1D-6636-47D5-A619-C16C4E14CF8C} + {10C98582-61EB-49B9-9E6B-83E90CA3795D} = {A8C4583C-034E-47AF-B7EC-1A34EE288E2F} + {BA8BAB83-D8D9-4716-BB80-C58A67C5F7A3} = {A8C4583C-034E-47AF-B7EC-1A34EE288E2F} + {1E65087A-DAC5-4595-9E1B-1BBE6C333D7D} = {A8C4583C-034E-47AF-B7EC-1A34EE288E2F} + {E78D741F-F071-4824-9386-E370717F7CBF} = {A8C4583C-034E-47AF-B7EC-1A34EE288E2F} + {926BA9EC-AB2F-4E4F-8363-54426411A17C} = {A8C4583C-034E-47AF-B7EC-1A34EE288E2F} + {878A5B7A-269F-4356-8B97-E5BC5EE6BED9} = {A8C4583C-034E-47AF-B7EC-1A34EE288E2F} + {4EFA90C2-3EFE-4E9C-BDEB-274493EB8C9D} = {A8C4583C-034E-47AF-B7EC-1A34EE288E2F} + {FF764D80-17E6-4DE4-92CC-591F706B39DD} = {A8C4583C-034E-47AF-B7EC-1A34EE288E2F} + {B7944CFA-31AB-4D35-925E-847E1115BF88} = {A8C4583C-034E-47AF-B7EC-1A34EE288E2F} + {E0ABB505-A788-4E66-A51E-94A9A0DD18FA} = {A8C4583C-034E-47AF-B7EC-1A34EE288E2F} + {7087FDFF-196A-4C9F-8C66-EEBC2C49F2F8} = {CE945F1D-6636-47D5-A619-C16C4E14CF8C} + {84C09B9B-97D8-4BAE-9741-ACE5707D5120} = {7087FDFF-196A-4C9F-8C66-EEBC2C49F2F8} + {43DA07BB-DE8F-4D8F-B580-9BA75B39CFF3} = {7087FDFF-196A-4C9F-8C66-EEBC2C49F2F8} + {435ED217-120E-472D-A9F6-B298FFFC3ADB} = {7087FDFF-196A-4C9F-8C66-EEBC2C49F2F8} + {0F0A4F84-419F-4547-9001-0853C1E509F9} = {7087FDFF-196A-4C9F-8C66-EEBC2C49F2F8} + {5AE1B9B6-BE5D-4919-9612-7E11D384A985} = {7087FDFF-196A-4C9F-8C66-EEBC2C49F2F8} + {739CAE6A-14E6-44FC-8863-DA905CBD289F} = {7087FDFF-196A-4C9F-8C66-EEBC2C49F2F8} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {28315BFD-90E7-4E14-A2EA-F3D23AF4126F} diff --git a/plugins/Booking/.gitattributes b/plugins/Booking/.gitattributes new file mode 100644 index 00000000..c941e526 --- /dev/null +++ b/plugins/Booking/.gitattributes @@ -0,0 +1 @@ +**/wwwroot/libs/** linguist-vendored diff --git a/plugins/Booking/.gitignore b/plugins/Booking/.gitignore new file mode 100644 index 00000000..48c0cf28 --- /dev/null +++ b/plugins/Booking/.gitignore @@ -0,0 +1,259 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# DNX +project.lock.json +artifacts/ + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# TODO: Comment the next line if you want to checkin your web deploy settings +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config +# NuGet v3's project.json files produces more ignoreable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.pfx +*.publishsettings +node_modules/ +orleans.codegen.cs + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +*.mdf +*.ldf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# Booking +host/EasyAbp.EShop.Plugins.Booking.IdentityServer/Logs/logs.txt +host/EasyAbp.EShop.Plugins.Booking.HttpApi.Host/Logs/logs.txt +host/EasyAbp.EShop.Plugins.Booking.Web.Host/Logs/logs.txt +host/EasyAbp.EShop.Plugins.Booking.Web.Unified/Logs/logs.txt +host/EasyAbp.EShop.Plugins.Booking.Blazor.Server.Host/Logs/logs.txt \ No newline at end of file diff --git a/plugins/Booking/.prettierrc b/plugins/Booking/.prettierrc new file mode 100644 index 00000000..56af76bd --- /dev/null +++ b/plugins/Booking/.prettierrc @@ -0,0 +1,5 @@ +{ + "singleQuote": true, + "useTabs": false, + "tabWidth": 4 +} diff --git a/plugins/Booking/EasyAbp.EShop.Plugins.Booking.abpmdl.json b/plugins/Booking/EasyAbp.EShop.Plugins.Booking.abpmdl.json new file mode 100644 index 00000000..c000ed24 --- /dev/null +++ b/plugins/Booking/EasyAbp.EShop.Plugins.Booking.abpmdl.json @@ -0,0 +1,111 @@ +{ + "folders": { + "items": { + "src": {}, + "test": {}, + "host": {} + } + }, + "packages": { + "EasyAbp.EShop.Plugins.Booking.Domain.Shared": { + "path": "src/EasyAbp.EShop.Plugins.Booking.Domain.Shared/EasyAbp.EShop.Plugins.Booking.Domain.Shared.abppkg.json", + "folder": "src" + }, + "EasyAbp.EShop.Plugins.Booking.Domain": { + "path": "src/EasyAbp.EShop.Plugins.Booking.Domain/EasyAbp.EShop.Plugins.Booking.Domain.abppkg.json", + "folder": "src" + }, + "EasyAbp.EShop.Plugins.Booking.Application.Contracts": { + "path": "src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp.EShop.Plugins.Booking.Application.Contracts.abppkg.json", + "folder": "src" + }, + "EasyAbp.EShop.Plugins.Booking.Application": { + "path": "src/EasyAbp.EShop.Plugins.Booking.Application/EasyAbp.EShop.Plugins.Booking.Application.abppkg.json", + "folder": "src" + }, + "EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore": { + "path": "src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore.abppkg.json", + "folder": "src" + }, + "EasyAbp.EShop.Plugins.Booking.MongoDB": { + "path": "src/EasyAbp.EShop.Plugins.Booking.MongoDB/EasyAbp.EShop.Plugins.Booking.MongoDB.abppkg.json", + "folder": "src" + }, + "EasyAbp.EShop.Plugins.Booking.HttpApi": { + "path": "src/EasyAbp.EShop.Plugins.Booking.HttpApi/EasyAbp.EShop.Plugins.Booking.HttpApi.abppkg.json", + "folder": "src" + }, + "EasyAbp.EShop.Plugins.Booking.HttpApi.Client": { + "path": "src/EasyAbp.EShop.Plugins.Booking.HttpApi.Client/EasyAbp.EShop.Plugins.Booking.HttpApi.Client.abppkg.json", + "folder": "src" + }, + "EasyAbp.EShop.Plugins.Booking.TestBase": { + "path": "test/EasyAbp.EShop.Plugins.Booking.TestBase/EasyAbp.EShop.Plugins.Booking.TestBase.abppkg.json", + "folder": "test" + }, + "EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore.Tests": { + "path": "test/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore.Tests/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore.Tests.abppkg.json", + "folder": "test" + }, + "EasyAbp.EShop.Plugins.Booking.MongoDB.Tests": { + "path": "test/EasyAbp.EShop.Plugins.Booking.MongoDB.Tests/EasyAbp.EShop.Plugins.Booking.MongoDB.Tests.abppkg.json", + "folder": "test" + }, + "EasyAbp.EShop.Plugins.Booking.Domain.Tests": { + "path": "test/EasyAbp.EShop.Plugins.Booking.Domain.Tests/EasyAbp.EShop.Plugins.Booking.Domain.Tests.abppkg.json", + "folder": "test" + }, + "EasyAbp.EShop.Plugins.Booking.Application.Tests": { + "path": "test/EasyAbp.EShop.Plugins.Booking.Application.Tests/EasyAbp.EShop.Plugins.Booking.Application.Tests.abppkg.json", + "folder": "test" + }, + "EasyAbp.EShop.Plugins.Booking.HttpApi.Host": { + "path": "host/EasyAbp.EShop.Plugins.Booking.HttpApi.Host/EasyAbp.EShop.Plugins.Booking.HttpApi.Host.abppkg.json", + "folder": "host" + }, + "EasyAbp.EShop.Plugins.Booking.Web": { + "path": "src/EasyAbp.EShop.Plugins.Booking.Web/EasyAbp.EShop.Plugins.Booking.Web.abppkg.json", + "folder": "src" + }, + "EasyAbp.EShop.Plugins.Booking.HttpApi.Client.ConsoleTestApp": { + "path": "test/EasyAbp.EShop.Plugins.Booking.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.Plugins.Booking.HttpApi.Client.ConsoleTestApp.abppkg.json", + "folder": "test" + }, + "EasyAbp.EShop.Plugins.Booking.Web.Host": { + "path": "host/EasyAbp.EShop.Plugins.Booking.Web.Host/EasyAbp.EShop.Plugins.Booking.Web.Host.abppkg.json", + "folder": "host" + }, + "EasyAbp.EShop.Plugins.Booking.IdentityServer": { + "path": "host/EasyAbp.EShop.Plugins.Booking.IdentityServer/EasyAbp.EShop.Plugins.Booking.IdentityServer.abppkg.json", + "folder": "host" + }, + "EasyAbp.EShop.Plugins.Booking.Host.Shared": { + "path": "host/EasyAbp.EShop.Plugins.Booking.Host.Shared/EasyAbp.EShop.Plugins.Booking.Host.Shared.abppkg.json", + "folder": "host" + }, + "EasyAbp.EShop.Plugins.Booking.Web.Unified": { + "path": "host/EasyAbp.EShop.Plugins.Booking.Web.Unified/EasyAbp.EShop.Plugins.Booking.Web.Unified.abppkg.json", + "folder": "host" + }, + "EasyAbp.EShop.Plugins.Booking.Blazor": { + "path": "src/EasyAbp.EShop.Plugins.Booking.Blazor/EasyAbp.EShop.Plugins.Booking.Blazor.abppkg.json", + "folder": "src" + }, + "EasyAbp.EShop.Plugins.Booking.Blazor.Host": { + "path": "host/EasyAbp.EShop.Plugins.Booking.Blazor.Host/EasyAbp.EShop.Plugins.Booking.Blazor.Host.abppkg.json", + "folder": "host" + }, + "EasyAbp.EShop.Plugins.Booking.Blazor.Server": { + "path": "src/EasyAbp.EShop.Plugins.Booking.Blazor.Server/EasyAbp.EShop.Plugins.Booking.Blazor.Server.abppkg.json", + "folder": "src" + }, + "EasyAbp.EShop.Plugins.Booking.Blazor.WebAssembly": { + "path": "src/EasyAbp.EShop.Plugins.Booking.Blazor.WebAssembly/EasyAbp.EShop.Plugins.Booking.Blazor.WebAssembly.abppkg.json", + "folder": "src" + }, + "EasyAbp.EShop.Plugins.Booking.Blazor.Server.Host": { + "path": "host/EasyAbp.EShop.Plugins.Booking.Blazor.Server.Host/EasyAbp.EShop.Plugins.Booking.Blazor.Server.Host.abppkg.json", + "folder": "host" + } + } +} \ No newline at end of file diff --git a/plugins/Booking/EasyAbp.EShop.Plugins.Booking.abpsln.json b/plugins/Booking/EasyAbp.EShop.Plugins.Booking.abpsln.json new file mode 100644 index 00000000..814d89ab --- /dev/null +++ b/plugins/Booking/EasyAbp.EShop.Plugins.Booking.abpsln.json @@ -0,0 +1,7 @@ +{ + "modules": { + "EasyAbp.EShop.Plugins.Booking": { + "path": "EasyAbp.EShop.Plugins.Booking.abpmdl.json" + } + } +} \ No newline at end of file diff --git a/plugins/Booking/EasyAbp.EShop.Plugins.Booking.sln b/plugins/Booking/EasyAbp.EShop.Plugins.Booking.sln new file mode 100644 index 00000000..7739bb4c --- /dev/null +++ b/plugins/Booking/EasyAbp.EShop.Plugins.Booking.sln @@ -0,0 +1,146 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29001.49 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.Booking.Domain.Shared", "src\EasyAbp.EShop.Plugins.Booking.Domain.Shared\EasyAbp.EShop.Plugins.Booking.Domain.Shared.csproj", "{D64C1577-4929-4B60-939E-96DE1534891A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.Booking.Domain", "src\EasyAbp.EShop.Plugins.Booking.Domain\EasyAbp.EShop.Plugins.Booking.Domain.csproj", "{F2840BC7-0188-4606-9126-DADD0F5ABF7A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.Booking.Application.Contracts", "src\EasyAbp.EShop.Plugins.Booking.Application.Contracts\EasyAbp.EShop.Plugins.Booking.Application.Contracts.csproj", "{BD65D04F-08D5-40C1-8C24-77CA0BACB877}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.Booking.Application", "src\EasyAbp.EShop.Plugins.Booking.Application\EasyAbp.EShop.Plugins.Booking.Application.csproj", "{78040F9E-3501-4A40-82DF-00A597710F35}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{649A3FFA-182F-4E56-9717-E6A9A2BEC545}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "host", "host", "{E400416D-2895-4512-9D17-90681EEC7E0A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore", "src\EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore\EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore.csproj", "{0CE86223-D31D-4315-A1F5-87BA3EE1B844}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.Booking.MongoDB", "src\EasyAbp.EShop.Plugins.Booking.MongoDB\EasyAbp.EShop.Plugins.Booking.MongoDB.csproj", "{F1C58097-4C08-4D88-8976-6B3389391481}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.Booking.HttpApi", "src\EasyAbp.EShop.Plugins.Booking.HttpApi\EasyAbp.EShop.Plugins.Booking.HttpApi.csproj", "{077AA5F8-8B61-420C-A6B5-0150A66FDB34}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.Booking.HttpApi.Client", "src\EasyAbp.EShop.Plugins.Booking.HttpApi.Client\EasyAbp.EShop.Plugins.Booking.HttpApi.Client.csproj", "{36E2735F-CEAB-44C8-A6D1-2CDAFF399751}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.Booking.TestBase", "test\EasyAbp.EShop.Plugins.Booking.TestBase\EasyAbp.EShop.Plugins.Booking.TestBase.csproj", "{C5BB573D-3030-4BCB-88B7-F6A85C32766C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore.Tests", "test\EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore.Tests\EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore.Tests.csproj", "{527F645C-C1FC-406E-8479-81386C8ECF13}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.Booking.MongoDB.Tests", "test\EasyAbp.EShop.Plugins.Booking.MongoDB.Tests\EasyAbp.EShop.Plugins.Booking.MongoDB.Tests.csproj", "{D0AD9179-125C-40B2-A8EE-CD4C1EE24BB6}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.Booking.Domain.Tests", "test\EasyAbp.EShop.Plugins.Booking.Domain.Tests\EasyAbp.EShop.Plugins.Booking.Domain.Tests.csproj", "{E60895E5-79C4-447D-88B7-85CB5BA336A4}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.Booking.Application.Tests", "test\EasyAbp.EShop.Plugins.Booking.Application.Tests\EasyAbp.EShop.Plugins.Booking.Application.Tests.csproj", "{90CB5DC4-C040-45C7-8900-9688B26405BC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.Booking.Web", "src\EasyAbp.EShop.Plugins.Booking.Web\EasyAbp.EShop.Plugins.Booking.Web.csproj", "{3B7B6317-1B85-4164-8E11-75574F80AE17}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.Booking.HttpApi.Client.ConsoleTestApp", "test\EasyAbp.EShop.Plugins.Booking.HttpApi.Client.ConsoleTestApp\EasyAbp.EShop.Plugins.Booking.HttpApi.Client.ConsoleTestApp.csproj", "{1EDCD6D4-DF3A-4E3B-ABB6-C0D0B373EAB8}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.Booking.Host.Shared", "host\EasyAbp.EShop.Plugins.Booking.Host.Shared\EasyAbp.EShop.Plugins.Booking.Host.Shared.csproj", "{F6AC8D4A-EDD7-4514-8E8A-5BCB019864DB}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyAbp.EShop.Plugins.Booking.Installer", "src\EasyAbp.EShop.Plugins.Booking.Installer\EasyAbp.EShop.Plugins.Booking.Installer.csproj", "{BE39FD00-745B-4049-8161-FC129817CBE4}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D64C1577-4929-4B60-939E-96DE1534891A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D64C1577-4929-4B60-939E-96DE1534891A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D64C1577-4929-4B60-939E-96DE1534891A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D64C1577-4929-4B60-939E-96DE1534891A}.Release|Any CPU.Build.0 = Release|Any CPU + {F2840BC7-0188-4606-9126-DADD0F5ABF7A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F2840BC7-0188-4606-9126-DADD0F5ABF7A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F2840BC7-0188-4606-9126-DADD0F5ABF7A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F2840BC7-0188-4606-9126-DADD0F5ABF7A}.Release|Any CPU.Build.0 = Release|Any CPU + {BD65D04F-08D5-40C1-8C24-77CA0BACB877}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BD65D04F-08D5-40C1-8C24-77CA0BACB877}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BD65D04F-08D5-40C1-8C24-77CA0BACB877}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BD65D04F-08D5-40C1-8C24-77CA0BACB877}.Release|Any CPU.Build.0 = Release|Any CPU + {78040F9E-3501-4A40-82DF-00A597710F35}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {78040F9E-3501-4A40-82DF-00A597710F35}.Debug|Any CPU.Build.0 = Debug|Any CPU + {78040F9E-3501-4A40-82DF-00A597710F35}.Release|Any CPU.ActiveCfg = Release|Any CPU + {78040F9E-3501-4A40-82DF-00A597710F35}.Release|Any CPU.Build.0 = Release|Any CPU + {0CE86223-D31D-4315-A1F5-87BA3EE1B844}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0CE86223-D31D-4315-A1F5-87BA3EE1B844}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0CE86223-D31D-4315-A1F5-87BA3EE1B844}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0CE86223-D31D-4315-A1F5-87BA3EE1B844}.Release|Any CPU.Build.0 = Release|Any CPU + {F1C58097-4C08-4D88-8976-6B3389391481}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F1C58097-4C08-4D88-8976-6B3389391481}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F1C58097-4C08-4D88-8976-6B3389391481}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F1C58097-4C08-4D88-8976-6B3389391481}.Release|Any CPU.Build.0 = Release|Any CPU + {077AA5F8-8B61-420C-A6B5-0150A66FDB34}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {077AA5F8-8B61-420C-A6B5-0150A66FDB34}.Debug|Any CPU.Build.0 = Debug|Any CPU + {077AA5F8-8B61-420C-A6B5-0150A66FDB34}.Release|Any CPU.ActiveCfg = Release|Any CPU + {077AA5F8-8B61-420C-A6B5-0150A66FDB34}.Release|Any CPU.Build.0 = Release|Any CPU + {36E2735F-CEAB-44C8-A6D1-2CDAFF399751}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {36E2735F-CEAB-44C8-A6D1-2CDAFF399751}.Debug|Any CPU.Build.0 = Debug|Any CPU + {36E2735F-CEAB-44C8-A6D1-2CDAFF399751}.Release|Any CPU.ActiveCfg = Release|Any CPU + {36E2735F-CEAB-44C8-A6D1-2CDAFF399751}.Release|Any CPU.Build.0 = Release|Any CPU + {C5BB573D-3030-4BCB-88B7-F6A85C32766C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C5BB573D-3030-4BCB-88B7-F6A85C32766C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C5BB573D-3030-4BCB-88B7-F6A85C32766C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C5BB573D-3030-4BCB-88B7-F6A85C32766C}.Release|Any CPU.Build.0 = Release|Any CPU + {527F645C-C1FC-406E-8479-81386C8ECF13}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {527F645C-C1FC-406E-8479-81386C8ECF13}.Debug|Any CPU.Build.0 = Debug|Any CPU + {527F645C-C1FC-406E-8479-81386C8ECF13}.Release|Any CPU.ActiveCfg = Release|Any CPU + {527F645C-C1FC-406E-8479-81386C8ECF13}.Release|Any CPU.Build.0 = Release|Any CPU + {D0AD9179-125C-40B2-A8EE-CD4C1EE24BB6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D0AD9179-125C-40B2-A8EE-CD4C1EE24BB6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D0AD9179-125C-40B2-A8EE-CD4C1EE24BB6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D0AD9179-125C-40B2-A8EE-CD4C1EE24BB6}.Release|Any CPU.Build.0 = Release|Any CPU + {E60895E5-79C4-447D-88B7-85CB5BA336A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E60895E5-79C4-447D-88B7-85CB5BA336A4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E60895E5-79C4-447D-88B7-85CB5BA336A4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E60895E5-79C4-447D-88B7-85CB5BA336A4}.Release|Any CPU.Build.0 = Release|Any CPU + {90CB5DC4-C040-45C7-8900-9688B26405BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {90CB5DC4-C040-45C7-8900-9688B26405BC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {90CB5DC4-C040-45C7-8900-9688B26405BC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {90CB5DC4-C040-45C7-8900-9688B26405BC}.Release|Any CPU.Build.0 = Release|Any CPU + {3B7B6317-1B85-4164-8E11-75574F80AE17}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3B7B6317-1B85-4164-8E11-75574F80AE17}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3B7B6317-1B85-4164-8E11-75574F80AE17}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3B7B6317-1B85-4164-8E11-75574F80AE17}.Release|Any CPU.Build.0 = Release|Any CPU + {1EDCD6D4-DF3A-4E3B-ABB6-C0D0B373EAB8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1EDCD6D4-DF3A-4E3B-ABB6-C0D0B373EAB8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1EDCD6D4-DF3A-4E3B-ABB6-C0D0B373EAB8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1EDCD6D4-DF3A-4E3B-ABB6-C0D0B373EAB8}.Release|Any CPU.Build.0 = Release|Any CPU + {F6AC8D4A-EDD7-4514-8E8A-5BCB019864DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F6AC8D4A-EDD7-4514-8E8A-5BCB019864DB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F6AC8D4A-EDD7-4514-8E8A-5BCB019864DB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F6AC8D4A-EDD7-4514-8E8A-5BCB019864DB}.Release|Any CPU.Build.0 = Release|Any CPU + {BE39FD00-745B-4049-8161-FC129817CBE4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BE39FD00-745B-4049-8161-FC129817CBE4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BE39FD00-745B-4049-8161-FC129817CBE4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BE39FD00-745B-4049-8161-FC129817CBE4}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {D64C1577-4929-4B60-939E-96DE1534891A} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} + {F2840BC7-0188-4606-9126-DADD0F5ABF7A} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} + {BD65D04F-08D5-40C1-8C24-77CA0BACB877} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} + {78040F9E-3501-4A40-82DF-00A597710F35} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} + {0CE86223-D31D-4315-A1F5-87BA3EE1B844} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} + {F1C58097-4C08-4D88-8976-6B3389391481} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} + {077AA5F8-8B61-420C-A6B5-0150A66FDB34} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} + {36E2735F-CEAB-44C8-A6D1-2CDAFF399751} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} + {C5BB573D-3030-4BCB-88B7-F6A85C32766C} = {CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D} + {527F645C-C1FC-406E-8479-81386C8ECF13} = {CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D} + {D0AD9179-125C-40B2-A8EE-CD4C1EE24BB6} = {CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D} + {E60895E5-79C4-447D-88B7-85CB5BA336A4} = {CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D} + {90CB5DC4-C040-45C7-8900-9688B26405BC} = {CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D} + {3B7B6317-1B85-4164-8E11-75574F80AE17} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} + {1EDCD6D4-DF3A-4E3B-ABB6-C0D0B373EAB8} = {CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D} + {F6AC8D4A-EDD7-4514-8E8A-5BCB019864DB} = {E400416D-2895-4512-9D17-90681EEC7E0A} + {BE39FD00-745B-4049-8161-FC129817CBE4} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {4324B3B4-B60B-4E3C-91D8-59576B4E26DD} + EndGlobalSection +EndGlobal diff --git a/plugins/Booking/EasyAbp.EShop.Plugins.Booking.sln.DotSettings b/plugins/Booking/EasyAbp.EShop.Plugins.Booking.sln.DotSettings new file mode 100644 index 00000000..cb0b2c91 --- /dev/null +++ b/plugins/Booking/EasyAbp.EShop.Plugins.Booking.sln.DotSettings @@ -0,0 +1,23 @@ + + True + WARNING + WARNING + WARNING + WARNING + WARNING + WARNING + WARNING + WARNING + Required + Required + Required + Required + False + True + False + False + True + False + False + SQL + \ No newline at end of file diff --git a/plugins/Booking/NuGet.Config b/plugins/Booking/NuGet.Config new file mode 100644 index 00000000..be8a1ece --- /dev/null +++ b/plugins/Booking/NuGet.Config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/plugins/Booking/docker-compose.migrations.yml b/plugins/Booking/docker-compose.migrations.yml new file mode 100644 index 00000000..ae5abd8d --- /dev/null +++ b/plugins/Booking/docker-compose.migrations.yml @@ -0,0 +1,13 @@ +version: '3.4' + +services: + migrations: + build: + context: ../../ + dockerfile: templates/service/database/Dockerfile + depends_on: + - sqlserver + environment: + - IdentityServer_DB=Booking_Identity + - Booking_DB=Booking_ModuleDb + - SA_PASSWORD=yourStrong(!)Password diff --git a/plugins/Booking/docker-compose.override.yml b/plugins/Booking/docker-compose.override.yml new file mode 100644 index 00000000..ffdb5bbd --- /dev/null +++ b/plugins/Booking/docker-compose.override.yml @@ -0,0 +1,29 @@ +version: '3.4' + +services: + sqlserver: + environment: + - SA_PASSWORD=yourStrong(!)Password + - ACCEPT_EULA=Y + ports: + - "51599:1433" + + identity-server: + environment: + - ASPNETCORE_URLS=http://0.0.0.0:80 + - ConnectionStrings__Default=Server=sqlserver;Database=Booking_Identity;Trusted_Connection=True;User=sa;Password=yourStrong(!)Password;Integrated Security=false + - ConnectionStrings__SqlServerCache=Server=sqlserver;Database=Booking_Cache;Trusted_Connection=True;User=sa;Password=yourStrong(!)Password;Integrated Security=false + ports: + - "51600:80" + + booking: + environment: + - ASPNETCORE_URLS=http://0.0.0.0:80 + - ConnectionStrings__Default=Server=sqlserver;Database=Booking_ModuleDb;Trusted_Connection=True;User=sa;Password=yourStrong(!)Password;Integrated Security=false + - ConnectionStrings__AbpSettingManagement=Server=sqlserver;Database=Booking_Identity;Trusted_Connection=True;User=sa;Password=yourStrong(!)Password;Integrated Security=false + - ConnectionStrings__AbpPermissionManagement=Server=sqlserver;Database=Booking_Identity;Trusted_Connection=True;User=sa;Password=yourStrong(!)Password;Integrated Security=false + - ConnectionStrings__AbpAuditLogging=Server=sqlserver;Database=Booking_Identity;Trusted_Connection=True;User=sa;Password=yourStrong(!)Password;Integrated Security=false + - ConnectionStrings__SqlServerCache=Server=sqlserver;Database=Booking_Cache;Trusted_Connection=True;User=sa;Password=yourStrong(!)Password;Integrated Security=false + - AuthServer__Authority=http://identity-server + ports: + - "51601:80" \ No newline at end of file diff --git a/plugins/Booking/docker-compose.yml b/plugins/Booking/docker-compose.yml new file mode 100644 index 00000000..de6ce679 --- /dev/null +++ b/plugins/Booking/docker-compose.yml @@ -0,0 +1,25 @@ +version: '3.4' + +services: + sqlserver: + image: mcr.microsoft.com/mssql/server + volumes: + - dbdata:/var/opt/mssql + + identity-server: + build: + context: ../../ + dockerfile: templates/service/host/IdentityServerHost/Dockerfile + depends_on: + - sqlserver + + booking: + build: + context: ../../ + dockerfile: templates/service/host/EasyAbp.EShop.Plugins.Booking.Host/Dockerfile + depends_on: + - sqlserver + - identity-server + +volumes: + dbdata: \ No newline at end of file diff --git a/plugins/Booking/host/EasyAbp.EShop.Plugins.Booking.Host.Shared/EasyAbp.EShop.Plugins.Booking.Host.Shared.abppkg.json b/plugins/Booking/host/EasyAbp.EShop.Plugins.Booking.Host.Shared/EasyAbp.EShop.Plugins.Booking.Host.Shared.abppkg.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/plugins/Booking/host/EasyAbp.EShop.Plugins.Booking.Host.Shared/EasyAbp.EShop.Plugins.Booking.Host.Shared.abppkg.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/plugins/Booking/host/EasyAbp.EShop.Plugins.Booking.Host.Shared/EasyAbp.EShop.Plugins.Booking.Host.Shared.csproj b/plugins/Booking/host/EasyAbp.EShop.Plugins.Booking.Host.Shared/EasyAbp.EShop.Plugins.Booking.Host.Shared.csproj new file mode 100644 index 00000000..1b005456 --- /dev/null +++ b/plugins/Booking/host/EasyAbp.EShop.Plugins.Booking.Host.Shared/EasyAbp.EShop.Plugins.Booking.Host.Shared.csproj @@ -0,0 +1,10 @@ + + + + + + netstandard2.0 + EasyAbp.EShop.Plugins.Booking + + + diff --git a/plugins/Booking/host/EasyAbp.EShop.Plugins.Booking.Host.Shared/FodyWeavers.xml b/plugins/Booking/host/EasyAbp.EShop.Plugins.Booking.Host.Shared/FodyWeavers.xml new file mode 100644 index 00000000..1715698c --- /dev/null +++ b/plugins/Booking/host/EasyAbp.EShop.Plugins.Booking.Host.Shared/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/plugins/Booking/host/EasyAbp.EShop.Plugins.Booking.Host.Shared/FodyWeavers.xsd b/plugins/Booking/host/EasyAbp.EShop.Plugins.Booking.Host.Shared/FodyWeavers.xsd new file mode 100644 index 00000000..ffa6fc4b --- /dev/null +++ b/plugins/Booking/host/EasyAbp.EShop.Plugins.Booking.Host.Shared/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/plugins/Booking/host/EasyAbp.EShop.Plugins.Booking.Host.Shared/MultiTenancy/MultiTenancyConsts.cs b/plugins/Booking/host/EasyAbp.EShop.Plugins.Booking.Host.Shared/MultiTenancy/MultiTenancyConsts.cs new file mode 100644 index 00000000..2170d762 --- /dev/null +++ b/plugins/Booking/host/EasyAbp.EShop.Plugins.Booking.Host.Shared/MultiTenancy/MultiTenancyConsts.cs @@ -0,0 +1,9 @@ +namespace EasyAbp.EShop.Plugins.Booking.MultiTenancy; + +public static class MultiTenancyConsts +{ + /* Enable/disable multi-tenancy in a single point + * to test your module with multi-tenancy. + */ + public const bool IsEnabled = false; +} diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp.EShop.Plugins.Booking.Application.Contracts.abppkg.json b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp.EShop.Plugins.Booking.Application.Contracts.abppkg.json new file mode 100644 index 00000000..49032794 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp.EShop.Plugins.Booking.Application.Contracts.abppkg.json @@ -0,0 +1,3 @@ +{ + "role": "lib.application-contracts" +} \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp.EShop.Plugins.Booking.Application.Contracts.csproj b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp.EShop.Plugins.Booking.Application.Contracts.csproj new file mode 100644 index 00000000..9fa0cea5 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp.EShop.Plugins.Booking.Application.Contracts.csproj @@ -0,0 +1,16 @@ + + + + + + netstandard2.0 + + + + + + + + + + diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/BookingApplicationContractsModule.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/BookingApplicationContractsModule.cs new file mode 100644 index 00000000..b0faf97f --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/BookingApplicationContractsModule.cs @@ -0,0 +1,15 @@ +using Volo.Abp.Application; +using Volo.Abp.Modularity; +using Volo.Abp.Authorization; + +namespace EasyAbp.EShop.Plugins.Booking; + +[DependsOn( + typeof(BookingDomainSharedModule), + typeof(AbpDddApplicationContractsModule), + typeof(AbpAuthorizationModule) + )] +public class BookingApplicationContractsModule : AbpModule +{ + +} diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/BookingRemoteServiceConsts.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/BookingRemoteServiceConsts.cs new file mode 100644 index 00000000..cd1db9a6 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/BookingRemoteServiceConsts.cs @@ -0,0 +1,8 @@ +namespace EasyAbp.EShop.Plugins.Booking; + +public class BookingRemoteServiceConsts +{ + public const string RemoteServiceName = "EasyAbpEShopPluginsBooking"; + + public const string ModuleName = "easyAbpEShopPluginsBooking"; +} diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/Permissions/BookingPermissionDefinitionProvider.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/Permissions/BookingPermissionDefinitionProvider.cs new file mode 100644 index 00000000..1225112d --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/Permissions/BookingPermissionDefinitionProvider.cs @@ -0,0 +1,18 @@ +using EasyAbp.EShop.Plugins.Booking.Localization; +using Volo.Abp.Authorization.Permissions; +using Volo.Abp.Localization; + +namespace EasyAbp.EShop.Plugins.Booking.Permissions; + +public class BookingPermissionDefinitionProvider : PermissionDefinitionProvider +{ + public override void Define(IPermissionDefinitionContext context) + { + var myGroup = context.AddGroup(BookingPermissions.GroupName, L("Permission:Booking")); + } + + private static LocalizableString L(string name) + { + return LocalizableString.Create(name); + } +} diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/Permissions/BookingPermissions.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/Permissions/BookingPermissions.cs new file mode 100644 index 00000000..27aaab2d --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/Permissions/BookingPermissions.cs @@ -0,0 +1,13 @@ +using Volo.Abp.Reflection; + +namespace EasyAbp.EShop.Plugins.Booking.Permissions; + +public class BookingPermissions +{ + public const string GroupName = "EasyAbp.EShop.Plugins.Booking"; + + public static string[] GetAll() + { + return ReflectionHelper.GetPublicConstantsRecursively(typeof(BookingPermissions)); + } +} diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/FodyWeavers.xml b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/FodyWeavers.xml new file mode 100644 index 00000000..1715698c --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/FodyWeavers.xsd b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/FodyWeavers.xsd new file mode 100644 index 00000000..ffa6fc4b --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application/EasyAbp.EShop.Plugins.Booking.Application.abppkg.json b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application/EasyAbp.EShop.Plugins.Booking.Application.abppkg.json new file mode 100644 index 00000000..412567ac --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application/EasyAbp.EShop.Plugins.Booking.Application.abppkg.json @@ -0,0 +1,3 @@ +{ + "role": "lib.application" +} \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application/EasyAbp.EShop.Plugins.Booking.Application.csproj b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application/EasyAbp.EShop.Plugins.Booking.Application.csproj new file mode 100644 index 00000000..bd2e8251 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application/EasyAbp.EShop.Plugins.Booking.Application.csproj @@ -0,0 +1,17 @@ + + + + + + netstandard2.0 + + + + + + + + + + + diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application/EasyAbp/EShop/Plugins/Booking/BookingAppService.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application/EasyAbp/EShop/Plugins/Booking/BookingAppService.cs new file mode 100644 index 00000000..16740ca7 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application/EasyAbp/EShop/Plugins/Booking/BookingAppService.cs @@ -0,0 +1,13 @@ +using EasyAbp.EShop.Plugins.Booking.Localization; +using Volo.Abp.Application.Services; + +namespace EasyAbp.EShop.Plugins.Booking; + +public abstract class BookingAppService : ApplicationService +{ + protected BookingAppService() + { + LocalizationResource = typeof(BookingResource); + ObjectMapperContext = typeof(BookingApplicationModule); + } +} diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application/EasyAbp/EShop/Plugins/Booking/BookingApplicationAutoMapperProfile.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application/EasyAbp/EShop/Plugins/Booking/BookingApplicationAutoMapperProfile.cs new file mode 100644 index 00000000..e1b8199b --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application/EasyAbp/EShop/Plugins/Booking/BookingApplicationAutoMapperProfile.cs @@ -0,0 +1,13 @@ +using AutoMapper; + +namespace EasyAbp.EShop.Plugins.Booking; + +public class BookingApplicationAutoMapperProfile : Profile +{ + public BookingApplicationAutoMapperProfile() + { + /* You can configure your AutoMapper mapping configuration here. + * Alternatively, you can split your mapping configurations + * into multiple profile classes for a better organization. */ + } +} diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application/EasyAbp/EShop/Plugins/Booking/BookingApplicationModule.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application/EasyAbp/EShop/Plugins/Booking/BookingApplicationModule.cs new file mode 100644 index 00000000..943b716a --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application/EasyAbp/EShop/Plugins/Booking/BookingApplicationModule.cs @@ -0,0 +1,24 @@ +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.AutoMapper; +using Volo.Abp.Modularity; +using Volo.Abp.Application; + +namespace EasyAbp.EShop.Plugins.Booking; + +[DependsOn( + typeof(BookingDomainModule), + typeof(BookingApplicationContractsModule), + typeof(AbpDddApplicationModule), + typeof(AbpAutoMapperModule) + )] +public class BookingApplicationModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddAutoMapperObjectMapper(); + Configure(options => + { + options.AddMaps(validate: true); + }); + } +} diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application/FodyWeavers.xml b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application/FodyWeavers.xml new file mode 100644 index 00000000..1715698c --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application/FodyWeavers.xsd b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application/FodyWeavers.xsd new file mode 100644 index 00000000..ffa6fc4b --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain.Shared/EasyAbp.EShop.Plugins.Booking.Domain.Shared.abppkg.json b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain.Shared/EasyAbp.EShop.Plugins.Booking.Domain.Shared.abppkg.json new file mode 100644 index 00000000..8b3de05f --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain.Shared/EasyAbp.EShop.Plugins.Booking.Domain.Shared.abppkg.json @@ -0,0 +1,3 @@ +{ + "role": "lib.domain-shared" +} \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain.Shared/EasyAbp.EShop.Plugins.Booking.Domain.Shared.csproj b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain.Shared/EasyAbp.EShop.Plugins.Booking.Domain.Shared.csproj new file mode 100644 index 00000000..595187c9 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain.Shared/EasyAbp.EShop.Plugins.Booking.Domain.Shared.csproj @@ -0,0 +1,24 @@ + + + + + + netstandard2.0 + + true + + + + + + + + + + + + + + + + diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain.Shared/EasyAbp/EShop/Plugins/Booking/BookingDomainSharedModule.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain.Shared/EasyAbp/EShop/Plugins/Booking/BookingDomainSharedModule.cs new file mode 100644 index 00000000..a8527ea2 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain.Shared/EasyAbp/EShop/Plugins/Booking/BookingDomainSharedModule.cs @@ -0,0 +1,36 @@ +using Volo.Abp.Modularity; +using Volo.Abp.Localization; +using EasyAbp.EShop.Plugins.Booking.Localization; +using Volo.Abp.Localization.ExceptionHandling; +using Volo.Abp.Validation; +using Volo.Abp.Validation.Localization; +using Volo.Abp.VirtualFileSystem; + +namespace EasyAbp.EShop.Plugins.Booking; + +[DependsOn( + typeof(AbpValidationModule) +)] +public class BookingDomainSharedModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => + { + options.FileSets.AddEmbedded(); + }); + + Configure(options => + { + options.Resources + .Add("en") + .AddBaseTypes(typeof(AbpValidationResource)) + .AddVirtualJson("EasyAbp/EShop/Plugins/Booking/Localization"); + }); + + Configure(options => + { + options.MapCodeNamespace("EasyAbp.EShop.Plugins.Booking", typeof(BookingResource)); + }); + } +} diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain.Shared/EasyAbp/EShop/Plugins/Booking/BookingErrorCodes.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain.Shared/EasyAbp/EShop/Plugins/Booking/BookingErrorCodes.cs new file mode 100644 index 00000000..6a972ee9 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain.Shared/EasyAbp/EShop/Plugins/Booking/BookingErrorCodes.cs @@ -0,0 +1,6 @@ +namespace EasyAbp.EShop.Plugins.Booking; + +public static class BookingErrorCodes +{ + //Add your business exception error codes here... +} diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain.Shared/EasyAbp/EShop/Plugins/Booking/Localization/BookingResource.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain.Shared/EasyAbp/EShop/Plugins/Booking/Localization/BookingResource.cs new file mode 100644 index 00000000..262e073f --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain.Shared/EasyAbp/EShop/Plugins/Booking/Localization/BookingResource.cs @@ -0,0 +1,9 @@ +using Volo.Abp.Localization; + +namespace EasyAbp.EShop.Plugins.Booking.Localization; + +[LocalizationResourceName("EasyAbpEShopPluginsBooking")] +public class BookingResource +{ + +} diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain.Shared/EasyAbp/EShop/Plugins/Booking/Localization/en.json b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain.Shared/EasyAbp/EShop/Plugins/Booking/Localization/en.json new file mode 100644 index 00000000..fa424c46 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain.Shared/EasyAbp/EShop/Plugins/Booking/Localization/en.json @@ -0,0 +1,7 @@ +{ + "culture": "en", + "texts": { + "MyAccount": "My account", + "SamplePageMessage": "A sample page for the Booking module" + } +} \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain.Shared/EasyAbp/EShop/Plugins/Booking/Localization/zh-Hans.json b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain.Shared/EasyAbp/EShop/Plugins/Booking/Localization/zh-Hans.json new file mode 100644 index 00000000..8811773c --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain.Shared/EasyAbp/EShop/Plugins/Booking/Localization/zh-Hans.json @@ -0,0 +1,7 @@ +{ + "culture": "zh-Hans", + "texts": { + "MyAccount": "我的账户", + "SamplePageMessage": "Booking模块的示例页面" + } +} \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain.Shared/EasyAbp/EShop/Plugins/Booking/Localization/zh-Hant.json b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain.Shared/EasyAbp/EShop/Plugins/Booking/Localization/zh-Hant.json new file mode 100644 index 00000000..e74219bd --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain.Shared/EasyAbp/EShop/Plugins/Booking/Localization/zh-Hant.json @@ -0,0 +1,7 @@ +{ + "culture": "zh-Hant", + "texts": { + "MyAccount": "我的賬戶", + "SamplePageMessage": "Booking 模塊的示例頁面" + } +} \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain.Shared/FodyWeavers.xml b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain.Shared/FodyWeavers.xml new file mode 100644 index 00000000..1715698c --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain.Shared/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain.Shared/FodyWeavers.xsd b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain.Shared/FodyWeavers.xsd new file mode 100644 index 00000000..ffa6fc4b --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain.Shared/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/EasyAbp.EShop.Plugins.Booking.Domain.abppkg.json b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/EasyAbp.EShop.Plugins.Booking.Domain.abppkg.json new file mode 100644 index 00000000..1d574efe --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/EasyAbp.EShop.Plugins.Booking.Domain.abppkg.json @@ -0,0 +1,3 @@ +{ + "role": "lib.domain" +} \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/EasyAbp.EShop.Plugins.Booking.Domain.csproj b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/EasyAbp.EShop.Plugins.Booking.Domain.csproj new file mode 100644 index 00000000..fd37e309 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/EasyAbp.EShop.Plugins.Booking.Domain.csproj @@ -0,0 +1,15 @@ + + + + + + netstandard2.0 + + + + + + + + + diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/EasyAbp/EShop/Plugins/Booking/BookingDbProperties.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/EasyAbp/EShop/Plugins/Booking/BookingDbProperties.cs new file mode 100644 index 00000000..5e2e0dfd --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/EasyAbp/EShop/Plugins/Booking/BookingDbProperties.cs @@ -0,0 +1,10 @@ +namespace EasyAbp.EShop.Plugins.Booking; + +public static class BookingDbProperties +{ + public static string DbTablePrefix { get; set; } = "EasyAbpEShopPluginsBooking"; + + public static string DbSchema { get; set; } = null; + + public const string ConnectionStringName = "EasyAbpEShopPluginsBooking"; +} diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/EasyAbp/EShop/Plugins/Booking/BookingDomainModule.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/EasyAbp/EShop/Plugins/Booking/BookingDomainModule.cs new file mode 100644 index 00000000..3e318197 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/EasyAbp/EShop/Plugins/Booking/BookingDomainModule.cs @@ -0,0 +1,13 @@ +using Volo.Abp.Domain; +using Volo.Abp.Modularity; + +namespace EasyAbp.EShop.Plugins.Booking; + +[DependsOn( + typeof(AbpDddDomainModule), + typeof(BookingDomainSharedModule) +)] +public class BookingDomainModule : AbpModule +{ + +} diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/EasyAbp/EShop/Plugins/Booking/Settings/BookingSettingDefinitionProvider.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/EasyAbp/EShop/Plugins/Booking/Settings/BookingSettingDefinitionProvider.cs new file mode 100644 index 00000000..35056318 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/EasyAbp/EShop/Plugins/Booking/Settings/BookingSettingDefinitionProvider.cs @@ -0,0 +1,13 @@ +using Volo.Abp.Settings; + +namespace EasyAbp.EShop.Plugins.Booking.Settings; + +public class BookingSettingDefinitionProvider : SettingDefinitionProvider +{ + public override void Define(ISettingDefinitionContext context) + { + /* Define module settings here. + * Use names from BookingSettings class. + */ + } +} diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/EasyAbp/EShop/Plugins/Booking/Settings/BookingSettings.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/EasyAbp/EShop/Plugins/Booking/Settings/BookingSettings.cs new file mode 100644 index 00000000..cc227799 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/EasyAbp/EShop/Plugins/Booking/Settings/BookingSettings.cs @@ -0,0 +1,10 @@ +namespace EasyAbp.EShop.Plugins.Booking.Settings; + +public static class BookingSettings +{ + public const string GroupName = "EasyAbp.EShop.Plugins.Booking"; + + /* Add constants for setting names. Example: + * public const string MySettingName = GroupName + ".MySettingName"; + */ +} diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/FodyWeavers.xml b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/FodyWeavers.xml new file mode 100644 index 00000000..1715698c --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/FodyWeavers.xsd b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/FodyWeavers.xsd new file mode 100644 index 00000000..ffa6fc4b --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore.abppkg.json b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore.abppkg.json new file mode 100644 index 00000000..e1c64f01 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore.abppkg.json @@ -0,0 +1,3 @@ +{ + "role": "lib.ef" +} \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore.csproj b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore.csproj new file mode 100644 index 00000000..25f08b68 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore.csproj @@ -0,0 +1,19 @@ + + + + + + net6.0 + + + + + + + + + + + + + diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/EasyAbp/EShop/Plugins/Booking/EntityFrameworkCore/BookingDbContext.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/EasyAbp/EShop/Plugins/Booking/EntityFrameworkCore/BookingDbContext.cs new file mode 100644 index 00000000..8f364504 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/EasyAbp/EShop/Plugins/Booking/EntityFrameworkCore/BookingDbContext.cs @@ -0,0 +1,26 @@ +using Microsoft.EntityFrameworkCore; +using Volo.Abp.Data; +using Volo.Abp.EntityFrameworkCore; + +namespace EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore; + +[ConnectionStringName(BookingDbProperties.ConnectionStringName)] +public class BookingDbContext : AbpDbContext, IBookingDbContext +{ + /* Add DbSet for each Aggregate Root here. Example: + * public DbSet Questions { get; set; } + */ + + public BookingDbContext(DbContextOptions options) + : base(options) + { + + } + + protected override void OnModelCreating(ModelBuilder builder) + { + base.OnModelCreating(builder); + + builder.ConfigureBooking(); + } +} diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/EasyAbp/EShop/Plugins/Booking/EntityFrameworkCore/BookingDbContextModelCreatingExtensions.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/EasyAbp/EShop/Plugins/Booking/EntityFrameworkCore/BookingDbContextModelCreatingExtensions.cs new file mode 100644 index 00000000..cd07a59b --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/EasyAbp/EShop/Plugins/Booking/EntityFrameworkCore/BookingDbContextModelCreatingExtensions.cs @@ -0,0 +1,33 @@ +using Microsoft.EntityFrameworkCore; +using Volo.Abp; + +namespace EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore; + +public static class BookingDbContextModelCreatingExtensions +{ + public static void ConfigureBooking( + this ModelBuilder builder) + { + Check.NotNull(builder, nameof(builder)); + + /* Configure all entities here. Example: + + builder.Entity(b => + { + //Configure table & schema name + b.ToTable(BookingDbProperties.DbTablePrefix + "Questions", BookingDbProperties.DbSchema); + + b.ConfigureByConvention(); + + //Properties + b.Property(q => q.Title).IsRequired().HasMaxLength(QuestionConsts.MaxTitleLength); + + //Relations + b.HasMany(question => question.Tags).WithOne().HasForeignKey(qt => qt.QuestionId); + + //Indexes + b.HasIndex(q => q.CreationTime); + }); + */ + } +} diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/EasyAbp/EShop/Plugins/Booking/EntityFrameworkCore/BookingEntityFrameworkCoreModule.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/EasyAbp/EShop/Plugins/Booking/EntityFrameworkCore/BookingEntityFrameworkCoreModule.cs new file mode 100644 index 00000000..06bf3a8b --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/EasyAbp/EShop/Plugins/Booking/EntityFrameworkCore/BookingEntityFrameworkCoreModule.cs @@ -0,0 +1,22 @@ +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.EntityFrameworkCore; +using Volo.Abp.Modularity; + +namespace EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore; + +[DependsOn( + typeof(BookingDomainModule), + typeof(AbpEntityFrameworkCoreModule) +)] +public class BookingEntityFrameworkCoreModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddAbpDbContext(options => + { + /* Add custom repositories here. Example: + * options.AddRepository(); + */ + }); + } +} diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/EasyAbp/EShop/Plugins/Booking/EntityFrameworkCore/IBookingDbContext.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/EasyAbp/EShop/Plugins/Booking/EntityFrameworkCore/IBookingDbContext.cs new file mode 100644 index 00000000..5542513f --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/EasyAbp/EShop/Plugins/Booking/EntityFrameworkCore/IBookingDbContext.cs @@ -0,0 +1,12 @@ +using Volo.Abp.Data; +using Volo.Abp.EntityFrameworkCore; + +namespace EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore; + +[ConnectionStringName(BookingDbProperties.ConnectionStringName)] +public interface IBookingDbContext : IEfCoreDbContext +{ + /* Add DbSet for each Aggregate Root here. Example: + * DbSet Questions { get; } + */ +} diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/FodyWeavers.xml b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/FodyWeavers.xml new file mode 100644 index 00000000..1715698c --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/FodyWeavers.xsd b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/FodyWeavers.xsd new file mode 100644 index 00000000..ffa6fc4b --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.HttpApi.Client/EasyAbp.EShop.Plugins.Booking.HttpApi.Client.abppkg.json b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.HttpApi.Client/EasyAbp.EShop.Plugins.Booking.HttpApi.Client.abppkg.json new file mode 100644 index 00000000..7deef5e3 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.HttpApi.Client/EasyAbp.EShop.Plugins.Booking.HttpApi.Client.abppkg.json @@ -0,0 +1,3 @@ +{ + "role": "lib.http-api-client" +} \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.HttpApi.Client/EasyAbp.EShop.Plugins.Booking.HttpApi.Client.csproj b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.HttpApi.Client/EasyAbp.EShop.Plugins.Booking.HttpApi.Client.csproj new file mode 100644 index 00000000..b0a9d266 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.HttpApi.Client/EasyAbp.EShop.Plugins.Booking.HttpApi.Client.csproj @@ -0,0 +1,20 @@ + + + + + + netstandard2.0 + + + + + + + + + + + + + + diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.HttpApi.Client/EasyAbp/EShop/Plugins/Booking/BookingHttpApiClientModule.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.HttpApi.Client/EasyAbp/EShop/Plugins/Booking/BookingHttpApiClientModule.cs new file mode 100644 index 00000000..34d59b7a --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.HttpApi.Client/EasyAbp/EShop/Plugins/Booking/BookingHttpApiClientModule.cs @@ -0,0 +1,26 @@ +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.Http.Client; +using Volo.Abp.Modularity; +using Volo.Abp.VirtualFileSystem; + +namespace EasyAbp.EShop.Plugins.Booking; + +[DependsOn( + typeof(BookingApplicationContractsModule), + typeof(AbpHttpClientModule))] +public class BookingHttpApiClientModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddHttpClientProxies( + typeof(BookingApplicationContractsModule).Assembly, + BookingRemoteServiceConsts.RemoteServiceName + ); + + Configure(options => + { + options.FileSets.AddEmbedded(); + }); + + } +} diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.HttpApi.Client/FodyWeavers.xml b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.HttpApi.Client/FodyWeavers.xml new file mode 100644 index 00000000..1715698c --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.HttpApi.Client/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.HttpApi.Client/FodyWeavers.xsd b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.HttpApi.Client/FodyWeavers.xsd new file mode 100644 index 00000000..ffa6fc4b --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.HttpApi.Client/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.HttpApi/EasyAbp.EShop.Plugins.Booking.HttpApi.abppkg.json b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.HttpApi/EasyAbp.EShop.Plugins.Booking.HttpApi.abppkg.json new file mode 100644 index 00000000..515bfe64 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.HttpApi/EasyAbp.EShop.Plugins.Booking.HttpApi.abppkg.json @@ -0,0 +1,3 @@ +{ + "role": "lib.http-api" +} \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.HttpApi/EasyAbp.EShop.Plugins.Booking.HttpApi.csproj b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.HttpApi/EasyAbp.EShop.Plugins.Booking.HttpApi.csproj new file mode 100644 index 00000000..db3b4bc2 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.HttpApi/EasyAbp.EShop.Plugins.Booking.HttpApi.csproj @@ -0,0 +1,15 @@ + + + + + + net6.0 + + + + + + + + + diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.HttpApi/EasyAbp/EShop/Plugins/Booking/BookingController.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.HttpApi/EasyAbp/EShop/Plugins/Booking/BookingController.cs new file mode 100644 index 00000000..8c1e84b2 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.HttpApi/EasyAbp/EShop/Plugins/Booking/BookingController.cs @@ -0,0 +1,14 @@ +using EasyAbp.EShop.Plugins.Booking.Localization; +using Microsoft.AspNetCore.Mvc; +using Volo.Abp.AspNetCore.Mvc; + +namespace EasyAbp.EShop.Plugins.Booking; + +[Area(BookingRemoteServiceConsts.ModuleName)] +public abstract class BookingController : AbpControllerBase +{ + protected BookingController() + { + LocalizationResource = typeof(BookingResource); + } +} diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.HttpApi/EasyAbp/EShop/Plugins/Booking/BookingHttpApiModule.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.HttpApi/EasyAbp/EShop/Plugins/Booking/BookingHttpApiModule.cs new file mode 100644 index 00000000..54832f52 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.HttpApi/EasyAbp/EShop/Plugins/Booking/BookingHttpApiModule.cs @@ -0,0 +1,32 @@ +using Localization.Resources.AbpUi; +using EasyAbp.EShop.Plugins.Booking.Localization; +using Volo.Abp.AspNetCore.Mvc; +using Volo.Abp.Localization; +using Volo.Abp.Modularity; +using Microsoft.Extensions.DependencyInjection; + +namespace EasyAbp.EShop.Plugins.Booking; + +[DependsOn( + typeof(BookingApplicationContractsModule), + typeof(AbpAspNetCoreMvcModule))] +public class BookingHttpApiModule : AbpModule +{ + public override void PreConfigureServices(ServiceConfigurationContext context) + { + PreConfigure(mvcBuilder => + { + mvcBuilder.AddApplicationPartIfNotExists(typeof(BookingHttpApiModule).Assembly); + }); + } + + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => + { + options.Resources + .Get() + .AddBaseTypes(typeof(AbpUiResource)); + }); + } +} diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.HttpApi/FodyWeavers.xml b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.HttpApi/FodyWeavers.xml new file mode 100644 index 00000000..1715698c --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.HttpApi/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.HttpApi/FodyWeavers.xsd b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.HttpApi/FodyWeavers.xsd new file mode 100644 index 00000000..ffa6fc4b --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.HttpApi/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Installer/EasyAbp.EShop.Plugins.Booking.Installer.csproj b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Installer/EasyAbp.EShop.Plugins.Booking.Installer.csproj new file mode 100644 index 00000000..becba310 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Installer/EasyAbp.EShop.Plugins.Booking.Installer.csproj @@ -0,0 +1,21 @@ + + + + + + net5.0 + true + + + + + + + + + + + + + + diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Installer/EasyAbp/EShop/Plugins/Booking/BookingInstallerModule.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Installer/EasyAbp/EShop/Plugins/Booking/BookingInstallerModule.cs new file mode 100644 index 00000000..2ab189bf --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Installer/EasyAbp/EShop/Plugins/Booking/BookingInstallerModule.cs @@ -0,0 +1,20 @@ +using Volo.Abp.Studio; +using Volo.Abp.Modularity; +using Volo.Abp.VirtualFileSystem; + +namespace EasyAbp.EShop.Plugins.Booking; + +[DependsOn( + typeof(AbpStudioModuleInstallerModule), + typeof(AbpVirtualFileSystemModule) + )] +public class BookingInstallerModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => + { + options.FileSets.AddEmbedded(); + }); + } +} diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Installer/EasyAbp/EShop/Plugins/Booking/BookingInstallerPipelineBuilder.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Installer/EasyAbp/EShop/Plugins/Booking/BookingInstallerPipelineBuilder.cs new file mode 100644 index 00000000..1f13ec23 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Installer/EasyAbp/EShop/Plugins/Booking/BookingInstallerPipelineBuilder.cs @@ -0,0 +1,16 @@ +using System.Threading.Tasks; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Studio.ModuleInstalling; + +namespace EasyAbp.EShop.Plugins.Booking; + +[Dependency(ServiceLifetime.Transient, ReplaceServices = true)] +[ExposeServices(typeof(IModuleInstallingPipelineBuilder))] +public class BookingInstallerPipelineBuilder : ModuleInstallingPipelineBuilderBase, IModuleInstallingPipelineBuilder, ITransientDependency +{ + public async Task BuildAsync(ModuleInstallingContext context) + { + return GetBasePipeline(context); + } +} diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Installer/FodyWeavers.xml b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Installer/FodyWeavers.xml new file mode 100644 index 00000000..be0de3a9 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Installer/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Installer/FodyWeavers.xsd b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Installer/FodyWeavers.xsd new file mode 100644 index 00000000..3f3946e2 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Installer/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.MongoDB/EasyAbp.EShop.Plugins.Booking.MongoDB.abppkg.json b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.MongoDB/EasyAbp.EShop.Plugins.Booking.MongoDB.abppkg.json new file mode 100644 index 00000000..8b23fd1e --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.MongoDB/EasyAbp.EShop.Plugins.Booking.MongoDB.abppkg.json @@ -0,0 +1,3 @@ +{ + "role": "lib.mongodb" +} \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.MongoDB/EasyAbp.EShop.Plugins.Booking.MongoDB.csproj b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.MongoDB/EasyAbp.EShop.Plugins.Booking.MongoDB.csproj new file mode 100644 index 00000000..e5167746 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.MongoDB/EasyAbp.EShop.Plugins.Booking.MongoDB.csproj @@ -0,0 +1,19 @@ + + + + + + netstandard2.0 + + + + + + + + + + + + + diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.MongoDB/EasyAbp/EShop/Plugins/Booking/MongoDB/BookingMongoDbContext.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.MongoDB/EasyAbp/EShop/Plugins/Booking/MongoDB/BookingMongoDbContext.cs new file mode 100644 index 00000000..839188ee --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.MongoDB/EasyAbp/EShop/Plugins/Booking/MongoDB/BookingMongoDbContext.cs @@ -0,0 +1,19 @@ +using Volo.Abp.Data; +using Volo.Abp.MongoDB; + +namespace EasyAbp.EShop.Plugins.Booking.MongoDB; + +[ConnectionStringName(BookingDbProperties.ConnectionStringName)] +public class BookingMongoDbContext : AbpMongoDbContext, IBookingMongoDbContext +{ + /* Add mongo collections here. Example: + * public IMongoCollection Questions => Collection(); + */ + + protected override void CreateModel(IMongoModelBuilder modelBuilder) + { + base.CreateModel(modelBuilder); + + modelBuilder.ConfigureBooking(); + } +} diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.MongoDB/EasyAbp/EShop/Plugins/Booking/MongoDB/BookingMongoDbContextExtensions.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.MongoDB/EasyAbp/EShop/Plugins/Booking/MongoDB/BookingMongoDbContextExtensions.cs new file mode 100644 index 00000000..f3443d25 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.MongoDB/EasyAbp/EShop/Plugins/Booking/MongoDB/BookingMongoDbContextExtensions.cs @@ -0,0 +1,13 @@ +using Volo.Abp; +using Volo.Abp.MongoDB; + +namespace EasyAbp.EShop.Plugins.Booking.MongoDB; + +public static class BookingMongoDbContextExtensions +{ + public static void ConfigureBooking( + this IMongoModelBuilder builder) + { + Check.NotNull(builder, nameof(builder)); + } +} diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.MongoDB/EasyAbp/EShop/Plugins/Booking/MongoDB/BookingMongoDbModule.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.MongoDB/EasyAbp/EShop/Plugins/Booking/MongoDB/BookingMongoDbModule.cs new file mode 100644 index 00000000..e1fde87e --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.MongoDB/EasyAbp/EShop/Plugins/Booking/MongoDB/BookingMongoDbModule.cs @@ -0,0 +1,22 @@ +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.Modularity; +using Volo.Abp.MongoDB; + +namespace EasyAbp.EShop.Plugins.Booking.MongoDB; + +[DependsOn( + typeof(BookingDomainModule), + typeof(AbpMongoDbModule) + )] +public class BookingMongoDbModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddMongoDbContext(options => + { + /* Add custom repositories here. Example: + * options.AddRepository(); + */ + }); + } +} diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.MongoDB/EasyAbp/EShop/Plugins/Booking/MongoDB/IBookingMongoDbContext.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.MongoDB/EasyAbp/EShop/Plugins/Booking/MongoDB/IBookingMongoDbContext.cs new file mode 100644 index 00000000..fcd15597 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.MongoDB/EasyAbp/EShop/Plugins/Booking/MongoDB/IBookingMongoDbContext.cs @@ -0,0 +1,12 @@ +using Volo.Abp.Data; +using Volo.Abp.MongoDB; + +namespace EasyAbp.EShop.Plugins.Booking.MongoDB; + +[ConnectionStringName(BookingDbProperties.ConnectionStringName)] +public interface IBookingMongoDbContext : IAbpMongoDbContext +{ + /* Define mongo collections here. Example: + * IMongoCollection Questions { get; } + */ +} diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.MongoDB/FodyWeavers.xml b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.MongoDB/FodyWeavers.xml new file mode 100644 index 00000000..1715698c --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.MongoDB/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.MongoDB/FodyWeavers.xsd b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.MongoDB/FodyWeavers.xsd new file mode 100644 index 00000000..ffa6fc4b --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.MongoDB/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/BookingWebAutoMapperProfile.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/BookingWebAutoMapperProfile.cs new file mode 100644 index 00000000..66a205bb --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/BookingWebAutoMapperProfile.cs @@ -0,0 +1,13 @@ +using AutoMapper; + +namespace EasyAbp.EShop.Plugins.Booking.Web; + +public class BookingWebAutoMapperProfile : Profile +{ + public BookingWebAutoMapperProfile() + { + /* You can configure your AutoMapper mapping configuration here. + * Alternatively, you can split your mapping configurations + * into multiple profile classes for a better organization. */ + } +} diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/BookingWebModule.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/BookingWebModule.cs new file mode 100644 index 00000000..e20adfa7 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/BookingWebModule.cs @@ -0,0 +1,58 @@ +using Microsoft.AspNetCore.Mvc.RazorPages; +using Microsoft.Extensions.DependencyInjection; +using EasyAbp.EShop.Plugins.Booking.Localization; +using EasyAbp.EShop.Plugins.Booking.Web.Menus; +using Volo.Abp.AspNetCore.Mvc.Localization; +using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared; +using Volo.Abp.AutoMapper; +using Volo.Abp.Modularity; +using Volo.Abp.UI.Navigation; +using Volo.Abp.VirtualFileSystem; +using EasyAbp.EShop.Plugins.Booking.Permissions; + +namespace EasyAbp.EShop.Plugins.Booking.Web; + +[DependsOn( + typeof(BookingApplicationContractsModule), + typeof(AbpAspNetCoreMvcUiThemeSharedModule), + typeof(AbpAutoMapperModule) + )] +public class BookingWebModule : AbpModule +{ + public override void PreConfigureServices(ServiceConfigurationContext context) + { + context.Services.PreConfigure(options => + { + options.AddAssemblyResource(typeof(BookingResource), typeof(BookingWebModule).Assembly); + }); + + PreConfigure(mvcBuilder => + { + mvcBuilder.AddApplicationPartIfNotExists(typeof(BookingWebModule).Assembly); + }); + } + + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => + { + options.MenuContributors.Add(new BookingMenuContributor()); + }); + + Configure(options => + { + options.FileSets.AddEmbedded(); + }); + + context.Services.AddAutoMapperObjectMapper(); + Configure(options => + { + options.AddMaps(validate: true); + }); + + Configure(options => + { + //Configure authorization. + }); + } +} diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/EasyAbp.EShop.Plugins.Booking.Web.abppkg.json b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/EasyAbp.EShop.Plugins.Booking.Web.abppkg.json new file mode 100644 index 00000000..930c4018 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/EasyAbp.EShop.Plugins.Booking.Web.abppkg.json @@ -0,0 +1,3 @@ +{ + "role": "lib.mvc" +} \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/EasyAbp.EShop.Plugins.Booking.Web.csproj b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/EasyAbp.EShop.Plugins.Booking.Web.csproj new file mode 100644 index 00000000..3d84b58e --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/EasyAbp.EShop.Plugins.Booking.Web.csproj @@ -0,0 +1,52 @@ + + + + + + net6.0 + $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; + true + Library + EasyAbp.EShop.Plugins.Booking.Web + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ContentIncludedByDefault Remove="Pages\Booking\Index.cshtml" /> + + + + + + + diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/FodyWeavers.xml b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/FodyWeavers.xml new file mode 100644 index 00000000..1715698c --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/FodyWeavers.xsd b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/FodyWeavers.xsd new file mode 100644 index 00000000..ffa6fc4b --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Menus/BookingMenuContributor.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Menus/BookingMenuContributor.cs new file mode 100644 index 00000000..56d862ba --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Menus/BookingMenuContributor.cs @@ -0,0 +1,23 @@ +using System.Threading.Tasks; +using Volo.Abp.UI.Navigation; + +namespace EasyAbp.EShop.Plugins.Booking.Web.Menus; + +public class BookingMenuContributor : IMenuContributor +{ + public async Task ConfigureMenuAsync(MenuConfigurationContext context) + { + if (context.Menu.Name == StandardMenus.Main) + { + await ConfigureMainMenuAsync(context); + } + } + + private Task ConfigureMainMenuAsync(MenuConfigurationContext context) + { + //Add main menu items. + context.Menu.AddItem(new ApplicationMenuItem(BookingMenus.Prefix, displayName: "Booking", "~/Booking", icon: "fa fa-globe")); + + return Task.CompletedTask; + } +} diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Menus/BookingMenus.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Menus/BookingMenus.cs new file mode 100644 index 00000000..5ea2537d --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Menus/BookingMenus.cs @@ -0,0 +1,10 @@ +namespace EasyAbp.EShop.Plugins.Booking.Web.Menus; + +public class BookingMenus +{ + public const string Prefix = "EasyAbp.EShop.Plugins.Booking"; + + //Add your menu items here... + //public const string Home = Prefix + ".MyNewMenuItem"; + +} diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/BookingPageModel.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/BookingPageModel.cs new file mode 100644 index 00000000..ce840e67 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/BookingPageModel.cs @@ -0,0 +1,15 @@ +using EasyAbp.EShop.Plugins.Booking.Localization; +using Volo.Abp.AspNetCore.Mvc.UI.RazorPages; + +namespace EasyAbp.EShop.Plugins.Booking.Web.Pages; + +/* Inherit your PageModel classes from this class. + */ +public abstract class BookingPageModel : AbpPageModel +{ + protected BookingPageModel() + { + LocalizationResourceType = typeof(BookingResource); + ObjectMapperContext = typeof(BookingWebModule); + } +} diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/Index.cshtml b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/Index.cshtml new file mode 100644 index 00000000..ba08a49c --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/Index.cshtml @@ -0,0 +1,10 @@ +@page +@using Microsoft.Extensions.Localization +@using EasyAbp.EShop.Plugins.Booking.Localization +@model EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.IndexModel +@inject IStringLocalizer L + +@{ +} +

Booking

+

@L["SamplePageMessage"]

diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/Index.cshtml.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/Index.cshtml.cs new file mode 100644 index 00000000..f0b1b4b3 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/Index.cshtml.cs @@ -0,0 +1,8 @@ +namespace EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking; + +public class IndexModel : BookingPageModel +{ + public void OnGet() + { + } +} diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/_ViewImports.cshtml b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/_ViewImports.cshtml new file mode 100644 index 00000000..c1da1f5f --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/_ViewImports.cshtml @@ -0,0 +1,4 @@ +@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers +@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI +@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bootstrap +@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bundling \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Properties/launchSettings.json b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Properties/launchSettings.json new file mode 100644 index 00000000..be756feb --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Properties/launchSettings.json @@ -0,0 +1,27 @@ +{ + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:64779/", + "sslPort": 44326 + } + }, + "profiles": { + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "EasyAbp.EShop.Plugins.Booking.Web": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:5001;http://localhost:5000" + } + } +} \ No newline at end of file diff --git a/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Application.Tests/BookingApplicationTestBase.cs b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Application.Tests/BookingApplicationTestBase.cs new file mode 100644 index 00000000..df99d45f --- /dev/null +++ b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Application.Tests/BookingApplicationTestBase.cs @@ -0,0 +1,9 @@ +namespace EasyAbp.EShop.Plugins.Booking; + +/* Inherit from this class for your application layer tests. + * See SampleAppService_Tests for example. + */ +public abstract class BookingApplicationTestBase : BookingTestBase +{ + +} diff --git a/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Application.Tests/BookingApplicationTestModule.cs b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Application.Tests/BookingApplicationTestModule.cs new file mode 100644 index 00000000..caf81543 --- /dev/null +++ b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Application.Tests/BookingApplicationTestModule.cs @@ -0,0 +1,12 @@ +using Volo.Abp.Modularity; + +namespace EasyAbp.EShop.Plugins.Booking; + +[DependsOn( + typeof(BookingApplicationModule), + typeof(BookingDomainTestModule) + )] +public class BookingApplicationTestModule : AbpModule +{ + +} diff --git a/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Application.Tests/EasyAbp.EShop.Plugins.Booking.Application.Tests.abppkg.json b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Application.Tests/EasyAbp.EShop.Plugins.Booking.Application.Tests.abppkg.json new file mode 100644 index 00000000..a686451f --- /dev/null +++ b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Application.Tests/EasyAbp.EShop.Plugins.Booking.Application.Tests.abppkg.json @@ -0,0 +1,3 @@ +{ + "role": "lib.test" +} \ No newline at end of file diff --git a/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Application.Tests/EasyAbp.EShop.Plugins.Booking.Application.Tests.csproj b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Application.Tests/EasyAbp.EShop.Plugins.Booking.Application.Tests.csproj new file mode 100644 index 00000000..4e04d9e5 --- /dev/null +++ b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Application.Tests/EasyAbp.EShop.Plugins.Booking.Application.Tests.csproj @@ -0,0 +1,16 @@ + + + + + + net6.0 + EasyAbp.EShop.Plugins.Booking + + + + + + + + + diff --git a/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Application.Tests/FodyWeavers.xml b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Application.Tests/FodyWeavers.xml new file mode 100644 index 00000000..1715698c --- /dev/null +++ b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Application.Tests/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Application.Tests/FodyWeavers.xsd b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Application.Tests/FodyWeavers.xsd new file mode 100644 index 00000000..ffa6fc4b --- /dev/null +++ b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Application.Tests/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Domain.Tests/BookingDomainTestBase.cs b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Domain.Tests/BookingDomainTestBase.cs new file mode 100644 index 00000000..fb0f945b --- /dev/null +++ b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Domain.Tests/BookingDomainTestBase.cs @@ -0,0 +1,9 @@ +namespace EasyAbp.EShop.Plugins.Booking; + +/* Inherit from this class for your domain layer tests. + * See SampleManager_Tests for example. + */ +public abstract class BookingDomainTestBase : BookingTestBase +{ + +} diff --git a/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Domain.Tests/BookingDomainTestModule.cs b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Domain.Tests/BookingDomainTestModule.cs new file mode 100644 index 00000000..1ee9c9fc --- /dev/null +++ b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Domain.Tests/BookingDomainTestModule.cs @@ -0,0 +1,16 @@ +using EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore; +using Volo.Abp.Modularity; + +namespace EasyAbp.EShop.Plugins.Booking; + +/* Domain tests are configured to use the EF Core provider. + * You can switch to MongoDB, however your domain tests should be + * database independent anyway. + */ +[DependsOn( + typeof(BookingEntityFrameworkCoreTestModule) + )] +public class BookingDomainTestModule : AbpModule +{ + +} diff --git a/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Domain.Tests/EasyAbp.EShop.Plugins.Booking.Domain.Tests.abppkg.json b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Domain.Tests/EasyAbp.EShop.Plugins.Booking.Domain.Tests.abppkg.json new file mode 100644 index 00000000..a686451f --- /dev/null +++ b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Domain.Tests/EasyAbp.EShop.Plugins.Booking.Domain.Tests.abppkg.json @@ -0,0 +1,3 @@ +{ + "role": "lib.test" +} \ No newline at end of file diff --git a/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Domain.Tests/EasyAbp.EShop.Plugins.Booking.Domain.Tests.csproj b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Domain.Tests/EasyAbp.EShop.Plugins.Booking.Domain.Tests.csproj new file mode 100644 index 00000000..a8abe153 --- /dev/null +++ b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Domain.Tests/EasyAbp.EShop.Plugins.Booking.Domain.Tests.csproj @@ -0,0 +1,15 @@ + + + + + + net6.0 + EasyAbp.EShop.Plugins.Booking + + + + + + + + diff --git a/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Domain.Tests/FodyWeavers.xml b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Domain.Tests/FodyWeavers.xml new file mode 100644 index 00000000..1715698c --- /dev/null +++ b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Domain.Tests/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Domain.Tests/FodyWeavers.xsd b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Domain.Tests/FodyWeavers.xsd new file mode 100644 index 00000000..ffa6fc4b --- /dev/null +++ b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Domain.Tests/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore.Tests/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore.Tests.abppkg.json b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore.Tests/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore.Tests.abppkg.json new file mode 100644 index 00000000..a686451f --- /dev/null +++ b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore.Tests/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore.Tests.abppkg.json @@ -0,0 +1,3 @@ +{ + "role": "lib.test" +} \ No newline at end of file diff --git a/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore.Tests/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore.Tests.csproj b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore.Tests/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore.Tests.csproj new file mode 100644 index 00000000..ea2e9332 --- /dev/null +++ b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore.Tests/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore.Tests.csproj @@ -0,0 +1,18 @@ + + + + + + net6.0 + EasyAbp.EShop.Plugins.Booking + + + + + + + + + + + diff --git a/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore.Tests/EntityFrameworkCore/BookingEntityFrameworkCoreTestBase.cs b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore.Tests/EntityFrameworkCore/BookingEntityFrameworkCoreTestBase.cs new file mode 100644 index 00000000..dea200a8 --- /dev/null +++ b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore.Tests/EntityFrameworkCore/BookingEntityFrameworkCoreTestBase.cs @@ -0,0 +1,9 @@ +namespace EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore; + +/* This class can be used as a base class for EF Core integration tests, + * while SampleRepository_Tests uses a different approach. + */ +public abstract class BookingEntityFrameworkCoreTestBase : BookingTestBase +{ + +} diff --git a/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore.Tests/EntityFrameworkCore/BookingEntityFrameworkCoreTestModule.cs b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore.Tests/EntityFrameworkCore/BookingEntityFrameworkCoreTestModule.cs new file mode 100644 index 00000000..1176f086 --- /dev/null +++ b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore.Tests/EntityFrameworkCore/BookingEntityFrameworkCoreTestModule.cs @@ -0,0 +1,42 @@ +using Microsoft.Data.Sqlite; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage; +using Volo.Abp.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore.Sqlite; +using Volo.Abp.Modularity; + +namespace EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore; + +[DependsOn( + typeof(BookingTestBaseModule), + typeof(BookingEntityFrameworkCoreModule), + typeof(AbpEntityFrameworkCoreSqliteModule) + )] +public class BookingEntityFrameworkCoreTestModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + var sqliteConnection = CreateDatabaseAndGetConnection(); + + Configure(options => + { + options.Configure(abpDbContextConfigurationContext => + { + abpDbContextConfigurationContext.DbContextOptions.UseSqlite(sqliteConnection); + }); + }); + } + + private static SqliteConnection CreateDatabaseAndGetConnection() + { + var connection = new SqliteConnection("Data Source=:memory:"); + connection.Open(); + + new BookingDbContext( + new DbContextOptionsBuilder().UseSqlite(connection).Options + ).GetService().CreateTables(); + + return connection; + } +} diff --git a/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore.Tests/FodyWeavers.xml b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore.Tests/FodyWeavers.xml new file mode 100644 index 00000000..1715698c --- /dev/null +++ b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore.Tests/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore.Tests/FodyWeavers.xsd b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore.Tests/FodyWeavers.xsd new file mode 100644 index 00000000..ffa6fc4b --- /dev/null +++ b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore.Tests/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.HttpApi.Client.ConsoleTestApp/BookingConsoleApiClientModule.cs b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.HttpApi.Client.ConsoleTestApp/BookingConsoleApiClientModule.cs new file mode 100644 index 00000000..9158e66a --- /dev/null +++ b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.HttpApi.Client.ConsoleTestApp/BookingConsoleApiClientModule.cs @@ -0,0 +1,15 @@ +using Volo.Abp.Autofac; +using Volo.Abp.Http.Client.IdentityModel; +using Volo.Abp.Modularity; + +namespace EasyAbp.EShop.Plugins.Booking; + +[DependsOn( + typeof(AbpAutofacModule), + typeof(BookingHttpApiClientModule), + typeof(AbpHttpClientIdentityModelModule) + )] +public class BookingConsoleApiClientModule : AbpModule +{ + +} diff --git a/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.HttpApi.Client.ConsoleTestApp/ClientDemoService.cs b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.HttpApi.Client.ConsoleTestApp/ClientDemoService.cs new file mode 100644 index 00000000..309980b0 --- /dev/null +++ b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.HttpApi.Client.ConsoleTestApp/ClientDemoService.cs @@ -0,0 +1,145 @@ +using System; +using System.Net.Http; +using System.Threading.Tasks; +using IdentityModel.Client; +using Microsoft.Extensions.Configuration; +using Volo.Abp.DependencyInjection; +using Volo.Abp.IdentityModel; + +namespace EasyAbp.EShop.Plugins.Booking; + +public class ClientDemoService : ITransientDependency +{ + private readonly IIdentityModelAuthenticationService _authenticationService; + private readonly IConfiguration _configuration; + + public ClientDemoService( + IIdentityModelAuthenticationService authenticationService, + IConfiguration configuration) + { + _authenticationService = authenticationService; + _configuration = configuration; + } + + public async Task RunAsync() + { + await TestWithDynamicProxiesAsync(); + await TestWithHttpClientAndIdentityModelAuthenticationServiceAsync(); + await TestAllManuallyAsync(); + } + + /* Shows how to perform an HTTP request to the API using ABP's dynamic c# proxy + * feature. It is just simple as calling a local service method. + * Authorization and HTTP request details are handled by the ABP framework. + */ + private async Task TestWithDynamicProxiesAsync() + { + Console.WriteLine(); + Console.WriteLine($"***** {nameof(TestWithDynamicProxiesAsync)} *****"); + } + + /* Shows how to use HttpClient to perform a request to the HTTP API. + * It uses ABP's IIdentityModelAuthenticationService to simplify obtaining access tokens. + */ + private async Task TestWithHttpClientAndIdentityModelAuthenticationServiceAsync() + { + Console.WriteLine(); + Console.WriteLine($"***** {nameof(TestWithHttpClientAndIdentityModelAuthenticationServiceAsync)} *****"); + + //Get access token using ABP's IIdentityModelAuthenticationService + + var accessToken = await _authenticationService.GetAccessTokenAsync( + new IdentityClientConfiguration( + _configuration["IdentityClients:Default:Authority"], + _configuration["IdentityClients:Default:Scope"], + _configuration["IdentityClients:Default:ClientId"], + _configuration["IdentityClients:Default:ClientSecret"], + _configuration["IdentityClients:Default:GrantType"], + _configuration["IdentityClients:Default:UserName"], + _configuration["IdentityClients:Default:UserPassword"] + ) + ); + + //Perform the actual HTTP request + + using (var httpClient = new HttpClient()) + { + httpClient.SetBearerToken(accessToken); + + var url = _configuration["RemoteServices:Booking:BaseUrl"] + + "api/Booking/sample/authorized"; + + var responseMessage = await httpClient.GetAsync(url); + if (responseMessage.IsSuccessStatusCode) + { + var responseString = await responseMessage.Content.ReadAsStringAsync(); + Console.WriteLine("Result: " + responseString); + } + else + { + throw new Exception("Remote server returns error code: " + responseMessage.StatusCode); + } + } + } + + /* Shows how to use HttpClient to perform a request to the HTTP API. + * It obtains access token using IdentityServer's API. See its documentation: + * https://identityserver4.readthedocs.io/en/latest/quickstarts/2_resource_owner_passwords.html + */ + private async Task TestAllManuallyAsync() + { + Console.WriteLine(); + Console.WriteLine($"***** {nameof(TestAllManuallyAsync)} *****"); + + //Obtain access token from the IDS4 server + + // discover endpoints from metadata + var client = new HttpClient(); + var disco = await client.GetDiscoveryDocumentAsync(_configuration["IdentityClients:Default:Authority"]); + if (disco.IsError) + { + Console.WriteLine(disco.Error); + return; + } + + // request token + var tokenResponse = await client.RequestPasswordTokenAsync(new PasswordTokenRequest + { + Address = disco.TokenEndpoint, + ClientId = _configuration["IdentityClients:Default:ClientId"], + ClientSecret = _configuration["IdentityClients:Default:ClientSecret"], + UserName = _configuration["IdentityClients:Default:UserName"], + Password = _configuration["IdentityClients:Default:UserPassword"], + Scope = _configuration["IdentityClients:Default:Scope"] + }); + + if (tokenResponse.IsError) + { + Console.WriteLine(tokenResponse.Error); + return; + } + + Console.WriteLine(tokenResponse.Json); + + //Perform the actual HTTP request + + using (var httpClient = new HttpClient()) + { + httpClient.SetBearerToken(tokenResponse.AccessToken); + + var url = _configuration["RemoteServices:Booking:BaseUrl"] + + "api/Booking/sample/authorized"; + + var responseMessage = await httpClient.GetAsync(url); + if (responseMessage.IsSuccessStatusCode) + { + var responseString = await responseMessage.Content.ReadAsStringAsync(); + Console.WriteLine("Result: " + responseString); + } + else + { + throw new Exception("Remote server returns error code: " + responseMessage.StatusCode); + } + } + } +} diff --git a/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs new file mode 100644 index 00000000..4d864106 --- /dev/null +++ b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs @@ -0,0 +1,40 @@ +using Microsoft.Extensions.Hosting; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp; + +namespace EasyAbp.EShop.Plugins.Booking.HttpApi.Client.ConsoleTestApp; + +public class ConsoleTestAppHostedService : IHostedService +{ + private readonly IConfiguration _configuration; + + public ConsoleTestAppHostedService(IConfiguration configuration) + { + _configuration = configuration; + } + + public async Task StartAsync(CancellationToken cancellationToken) + { + using (var application = await AbpApplicationFactory.CreateAsync(options => + { + options.Services.ReplaceConfiguration(_configuration); + options.UseAutofac(); + })) + { + await application.InitializeAsync(); + + var demo = application.ServiceProvider.GetRequiredService(); + await demo.RunAsync(); + + await application.ShutdownAsync(); + } + } + + public Task StopAsync(CancellationToken cancellationToken) + { + return Task.CompletedTask; + } +} diff --git a/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.Plugins.Booking.HttpApi.Client.ConsoleTestApp.abppkg.json b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.Plugins.Booking.HttpApi.Client.ConsoleTestApp.abppkg.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.Plugins.Booking.HttpApi.Client.ConsoleTestApp.abppkg.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.Plugins.Booking.HttpApi.Client.ConsoleTestApp.csproj b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.Plugins.Booking.HttpApi.Client.ConsoleTestApp.csproj new file mode 100644 index 00000000..8e6db2e9 --- /dev/null +++ b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.Plugins.Booking.HttpApi.Client.ConsoleTestApp.csproj @@ -0,0 +1,32 @@ + + + + Exe + net6.0 + EasyAbp.EShop.Plugins.Booking + + + + + + + + + + + + PreserveNewest + Always + + + + PreserveNewest + Always + + + + + + + + diff --git a/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.HttpApi.Client.ConsoleTestApp/Program.cs b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.HttpApi.Client.ConsoleTestApp/Program.cs new file mode 100644 index 00000000..e77baccd --- /dev/null +++ b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.HttpApi.Client.ConsoleTestApp/Program.cs @@ -0,0 +1,22 @@ +using System.Threading.Tasks; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; + +namespace EasyAbp.EShop.Plugins.Booking.HttpApi.Client.ConsoleTestApp; + +class Program +{ + static async Task Main(string[] args) + { + await CreateHostBuilder(args).RunConsoleAsync(); + } + + public static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .AddAppSettingsSecretsJson() + .ConfigureServices((hostContext, services) => + { + services.AddHostedService(); + }); +} diff --git a/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.HttpApi.Client.ConsoleTestApp/appsettings.json b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.HttpApi.Client.ConsoleTestApp/appsettings.json new file mode 100644 index 00000000..c374e9c3 --- /dev/null +++ b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.HttpApi.Client.ConsoleTestApp/appsettings.json @@ -0,0 +1,21 @@ +{ + "RemoteServices": { + "Default": { + "BaseUrl": "https://localhost:44344/" + }, + "Booking": { + "BaseUrl": "https://localhost:44354/" + } + }, + "IdentityClients": { + "Default": { + "GrantType": "password", + "ClientId": "Booking_App", + "ClientSecret": "1q2w3e*", + "UserName": "admin", + "UserPassword": "1q2w3E*", + "Authority": "https://localhost:44344/", + "Scope": "Booking" + } + } +} diff --git a/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.HttpApi.Client.ConsoleTestApp/appsettings.secrets.json b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.HttpApi.Client.ConsoleTestApp/appsettings.secrets.json new file mode 100644 index 00000000..7a73a41b --- /dev/null +++ b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.HttpApi.Client.ConsoleTestApp/appsettings.secrets.json @@ -0,0 +1,2 @@ +{ +} \ No newline at end of file diff --git a/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.MongoDB.Tests/EasyAbp.EShop.Plugins.Booking.MongoDB.Tests.abppkg.json b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.MongoDB.Tests/EasyAbp.EShop.Plugins.Booking.MongoDB.Tests.abppkg.json new file mode 100644 index 00000000..a686451f --- /dev/null +++ b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.MongoDB.Tests/EasyAbp.EShop.Plugins.Booking.MongoDB.Tests.abppkg.json @@ -0,0 +1,3 @@ +{ + "role": "lib.test" +} \ No newline at end of file diff --git a/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.MongoDB.Tests/EasyAbp.EShop.Plugins.Booking.MongoDB.Tests.csproj b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.MongoDB.Tests/EasyAbp.EShop.Plugins.Booking.MongoDB.Tests.csproj new file mode 100644 index 00000000..8a4ebfa3 --- /dev/null +++ b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.MongoDB.Tests/EasyAbp.EShop.Plugins.Booking.MongoDB.Tests.csproj @@ -0,0 +1,17 @@ + + + + + + net6.0 + EasyAbp.EShop.Plugins.Booking + + + + + + + + + + diff --git a/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.MongoDB.Tests/FodyWeavers.xml b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.MongoDB.Tests/FodyWeavers.xml new file mode 100644 index 00000000..1715698c --- /dev/null +++ b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.MongoDB.Tests/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.MongoDB.Tests/FodyWeavers.xsd b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.MongoDB.Tests/FodyWeavers.xsd new file mode 100644 index 00000000..ffa6fc4b --- /dev/null +++ b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.MongoDB.Tests/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.MongoDB.Tests/MongoDB/BookingMongoDbTestBase.cs b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.MongoDB.Tests/MongoDB/BookingMongoDbTestBase.cs new file mode 100644 index 00000000..5dea41c1 --- /dev/null +++ b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.MongoDB.Tests/MongoDB/BookingMongoDbTestBase.cs @@ -0,0 +1,9 @@ +namespace EasyAbp.EShop.Plugins.Booking.MongoDB; + +/* This class can be used as a base class for MongoDB integration tests, + * while SampleRepository_Tests uses a different approach. + */ +public abstract class BookingMongoDbTestBase : BookingTestBase +{ + +} diff --git a/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.MongoDB.Tests/MongoDB/BookingMongoDbTestModule.cs b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.MongoDB.Tests/MongoDB/BookingMongoDbTestModule.cs new file mode 100644 index 00000000..4b181d2e --- /dev/null +++ b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.MongoDB.Tests/MongoDB/BookingMongoDbTestModule.cs @@ -0,0 +1,26 @@ +using System; +using Volo.Abp.Data; +using Volo.Abp.Modularity; +using Volo.Abp.Uow; + +namespace EasyAbp.EShop.Plugins.Booking.MongoDB; + +[DependsOn( + typeof(BookingTestBaseModule), + typeof(BookingMongoDbModule) + )] +public class BookingMongoDbTestModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + var stringArray = MongoDbFixture.ConnectionString.Split('?'); + var connectionString = stringArray[0].EnsureEndsWith('/') + + "Db_" + + Guid.NewGuid().ToString("N") + "/?" + stringArray[1]; + + Configure(options => + { + options.ConnectionStrings.Default = connectionString; + }); + } +} diff --git a/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.MongoDB.Tests/MongoDB/MongoDbFixture.cs b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.MongoDB.Tests/MongoDB/MongoDbFixture.cs new file mode 100644 index 00000000..9173049f --- /dev/null +++ b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.MongoDB.Tests/MongoDB/MongoDbFixture.cs @@ -0,0 +1,21 @@ +using System; +using Mongo2Go; + +namespace EasyAbp.EShop.Plugins.Booking.MongoDB; + +public class MongoDbFixture : IDisposable +{ + private static readonly MongoDbRunner MongoDbRunner; + public static readonly string ConnectionString; + + static MongoDbFixture() + { + MongoDbRunner = MongoDbRunner.Start(singleNodeReplSet: true, singleNodeReplSetWaitTimeout: 20); + ConnectionString = MongoDbRunner.ConnectionString; + } + + public void Dispose() + { + MongoDbRunner?.Dispose(); + } +} diff --git a/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.MongoDB.Tests/MongoDB/MongoTestCollection.cs b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.MongoDB.Tests/MongoDB/MongoTestCollection.cs new file mode 100644 index 00000000..f1a3f600 --- /dev/null +++ b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.MongoDB.Tests/MongoDB/MongoTestCollection.cs @@ -0,0 +1,9 @@ +using Xunit; + +namespace EasyAbp.EShop.Plugins.Booking.MongoDB; + +[CollectionDefinition(Name)] +public class MongoTestCollection : ICollectionFixture +{ + public const string Name = "MongoDB Collection"; +} diff --git a/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.TestBase/BookingDataSeedContributor.cs b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.TestBase/BookingDataSeedContributor.cs new file mode 100644 index 00000000..9138c859 --- /dev/null +++ b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.TestBase/BookingDataSeedContributor.cs @@ -0,0 +1,32 @@ +using System.Threading.Tasks; +using Volo.Abp.Data; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Guids; +using Volo.Abp.MultiTenancy; + +namespace EasyAbp.EShop.Plugins.Booking; + +public class BookingDataSeedContributor : IDataSeedContributor, ITransientDependency +{ + private readonly IGuidGenerator _guidGenerator; + private readonly ICurrentTenant _currentTenant; + + public BookingDataSeedContributor( + IGuidGenerator guidGenerator, ICurrentTenant currentTenant) + { + _guidGenerator = guidGenerator; + _currentTenant = currentTenant; + } + + public Task SeedAsync(DataSeedContext context) + { + /* Instead of returning the Task.CompletedTask, you can insert your test data + * at this point! + */ + + using (_currentTenant.Change(context?.TenantId)) + { + return Task.CompletedTask; + } + } +} diff --git a/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.TestBase/BookingTestBase.cs b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.TestBase/BookingTestBase.cs new file mode 100644 index 00000000..c5b387fe --- /dev/null +++ b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.TestBase/BookingTestBase.cs @@ -0,0 +1,59 @@ +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 EasyAbp.EShop.Plugins.Booking; + +/* All test classes are derived from this class, directly or indirectly. */ +public abstract class BookingTestBase : AbpIntegratedTest + where TStartupModule : IAbpModule +{ + protected override void SetAbpApplicationCreationOptions(AbpApplicationCreationOptions options) + { + options.UseAutofac(); + } + + protected virtual Task WithUnitOfWorkAsync(Func func) + { + return WithUnitOfWorkAsync(new AbpUnitOfWorkOptions(), func); + } + + protected virtual async Task WithUnitOfWorkAsync(AbpUnitOfWorkOptions options, Func action) + { + using (var scope = ServiceProvider.CreateScope()) + { + var uowManager = scope.ServiceProvider.GetRequiredService(); + + using (var uow = uowManager.Begin(options)) + { + await action(); + + await uow.CompleteAsync(); + } + } + } + + protected virtual Task WithUnitOfWorkAsync(Func> func) + { + return WithUnitOfWorkAsync(new AbpUnitOfWorkOptions(), func); + } + + protected virtual async Task WithUnitOfWorkAsync(AbpUnitOfWorkOptions options, Func> func) + { + using (var scope = ServiceProvider.CreateScope()) + { + var uowManager = scope.ServiceProvider.GetRequiredService(); + + using (var uow = uowManager.Begin(options)) + { + var result = await func(); + await uow.CompleteAsync(); + return result; + } + } + } +} diff --git a/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.TestBase/BookingTestBaseModule.cs b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.TestBase/BookingTestBaseModule.cs new file mode 100644 index 00000000..b053a0f6 --- /dev/null +++ b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.TestBase/BookingTestBaseModule.cs @@ -0,0 +1,41 @@ +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp; +using Volo.Abp.Authorization; +using Volo.Abp.Autofac; +using Volo.Abp.Data; +using Volo.Abp.Modularity; +using Volo.Abp.Threading; + +namespace EasyAbp.EShop.Plugins.Booking; + +[DependsOn( + typeof(AbpAutofacModule), + typeof(AbpTestBaseModule), + typeof(AbpAuthorizationModule), + typeof(BookingDomainModule) + )] +public class BookingTestBaseModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + 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() + .SeedAsync(); + } + }); + } +} diff --git a/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.TestBase/EasyAbp.EShop.Plugins.Booking.TestBase.abppkg.json b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.TestBase/EasyAbp.EShop.Plugins.Booking.TestBase.abppkg.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.TestBase/EasyAbp.EShop.Plugins.Booking.TestBase.abppkg.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.TestBase/EasyAbp.EShop.Plugins.Booking.TestBase.csproj b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.TestBase/EasyAbp.EShop.Plugins.Booking.TestBase.csproj new file mode 100644 index 00000000..8a64c2e7 --- /dev/null +++ b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.TestBase/EasyAbp.EShop.Plugins.Booking.TestBase.csproj @@ -0,0 +1,23 @@ + + + + + + net6.0 + EasyAbp.EShop.Plugins.Booking + + + + + + + + + + + + + + + + diff --git a/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.TestBase/FodyWeavers.xml b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.TestBase/FodyWeavers.xml new file mode 100644 index 00000000..1715698c --- /dev/null +++ b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.TestBase/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.TestBase/FodyWeavers.xsd b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.TestBase/FodyWeavers.xsd new file mode 100644 index 00000000..ffa6fc4b --- /dev/null +++ b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.TestBase/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.TestBase/Security/FakeCurrentPrincipalAccessor.cs b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.TestBase/Security/FakeCurrentPrincipalAccessor.cs new file mode 100644 index 00000000..4c12656c --- /dev/null +++ b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.TestBase/Security/FakeCurrentPrincipalAccessor.cs @@ -0,0 +1,42 @@ +using System.Collections.Generic; +using System.Security.Claims; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Security.Claims; + +namespace EasyAbp.EShop.Plugins.Booking.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 + { + new Claim(AbpClaimTypes.UserId,"2e701e62-0953-4dd3-910b-dc6cc93ccb0d"), + new Claim(AbpClaimTypes.UserName,"admin"), + new Claim(AbpClaimTypes.Email,"admin@abp.io") + } + ) + ); + } + } + } + + return _principal; + } +}