Skip to content

Commit

Permalink
big refactoring changed folder structure and more
Browse files Browse the repository at this point in the history
  • Loading branch information
abubakrmirgiyasov committed May 16, 2024
1 parent eedc770 commit d50acd7
Show file tree
Hide file tree
Showing 136 changed files with 992 additions and 683 deletions.
107 changes: 52 additions & 55 deletions Mint.sln
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Min.Web.UI.Tests", "tests\M
EndProject
Project("{E53339B2-1760-4266-BCC7-CA923CBCF16C}") = "docker-compose", "docker-compose.dcproj", "{6AD5C31F-C007-4B36-8D94-A69500E8662C}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Identity", "Identity", "{7A823355-1953-4B19-A64F-F7A53AF449A7}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mint.WebApp.Email", "src\modules\Identity\Mint.WebApp.Email\Mint.WebApp.Email.csproj", "{7F551865-7DAB-45FD-82A8-693B8DB35EA8}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mint.WebApp.Identity", "src\modules\Identity\Mint.WebApp.Identity\Mint.WebApp.Identity.csproj", "{8FD30732-AB43-4A88-AE02-15E8EBF0E48E}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Notification", "Notification", "{AACDD6BF-E715-4FAA-B134-CEA50F20344F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mint.WebApp.Notification", "src\modules\Notification\Mint.WebApp.Notification\Mint.WebApp.Notification.csproj", "{406A5CF3-0E70-4304-9F2E-11833B976DE2}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Gateway", "Gateway", "{08CE716F-4D08-447C-96EE-A4018AFA7035}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mint.WebApp.Gateway", "src\Gateway\Mint.WebApp.Gateway\Mint.WebApp.Gateway.csproj", "{66EE6A01-5137-4E46-8647-803C9605CED7}"
Expand All @@ -43,18 +33,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mint.WebApp.StorageCloud",
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mint.Web.Infrastructure.Tests", "tests\Mint.Web.Infrastructure.Tests\Mint.Web.Infrastructure.Tests.csproj", "{306E3BBB-14A8-45E6-BDC4-52822A0F7B32}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mint.WebApp.Admin.Identity", "src\modules\Identity\Mint.WebApp.Admin.Identity\Mint.WebApp.Admin.Identity.csproj", "{6700AD78-48CC-4C06-AC7E-0780BA195F2D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mint.Architecture.Tests", "tests\Mint.Architecture.Tests\Mint.Architecture.Tests.csproj", "{C270E6D2-373C-48CE-B534-D1CD9D3A40A7}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mint.WebApp.Admin.Tests", "src\modules\Admin\Mint.WebApp.Admin.Tests\Mint.WebApp.Admin.Tests.csproj", "{EC4FA327-929A-465E-B2F8-155A1A187A9C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mint.WebApp.HealthChecker", "src\modules\Services\Mint.WebApp.HealthChecker\Mint.WebApp.HealthChecker.csproj", "{C5647212-6FC3-44B7-A741-2A47E1DC8EF5}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mint.WebApp.Admin.Application", "src\modules\Admin\Mint.WebApp.Admin.Application\Mint.WebApp.Admin.Application.csproj", "{2EE99609-9259-4E94-902C-091C56B2A337}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mint.WebApp.Identity.Application", "src\modules\Identity\Mint.WebApp.Identity.Application\Mint.WebApp.Identity.Application.csproj", "{A4B2BF08-9621-47D8-AB40-CB0EFCE5BD16}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mint.Application", "src\Mint.Application\Mint.Application.csproj", "{F8224E05-7862-4521-92F9-C050EB1A4B5F}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Client", "Client", "{A58CC3EF-B286-4151-853D-88F8EE5F0392}"
Expand All @@ -63,6 +45,22 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mint.WebApp.Client", "src\m
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mint.WebApp.Client.Application", "src\modules\Client\Mint.WebApp.Client.Application\Mint.WebApp.Client.Application.csproj", "{056002E9-BE29-4EE2-ABE0-883B9B6BC1F5}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mint.WebApp.Admin.Identity", "src\modules\Admin\Mint.WebApp.Admin.Identity\Mint.WebApp.Admin.Identity.csproj", "{338BD391-99E7-4E5A-9BC6-A1725C43475F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mint.WebApp.Client.Identity", "src\modules\Client\Mint.WebApp.Client.Identity\Mint.WebApp.Client.Identity.csproj", "{5E7F2612-5464-4167-A6D1-43B458EB1923}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mint.WebApp.Email", "src\modules\Services\Mint.WebApp.Email\Mint.WebApp.Email.csproj", "{3137D52A-03B4-4199-9642-3F513CE807BB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mint.WebApp.Admin.Identity.Application", "src\modules\Admin\Mint.WebApp.Admin.Identity.Application\Mint.WebApp.Admin.Identity.Application.csproj", "{B84A11BC-D32B-40C9-A66F-051F2E5B86B5}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mint.WebApp.Client.Identity.Application", "src\modules\Client\Mint.WebApp.Client.Identity.Application\Mint.WebApp.Client.Identity.Application.csproj", "{E26A5117-E63B-4EC6-BDD8-09D7B936DB8B}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{D6D76CD1-7D79-4455-9B3D-3CFC26A0ADF7}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mint.WebApp.Admin.Tests", "src\modules\Admin\tests\Mint.WebApp.Admin.Tests\Mint.WebApp.Admin.Tests.csproj", "{67E21190-4199-470A-ADF1-910A7CCA3F75}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mint.WebApp.Admin.Architecture.Tests", "src\modules\Admin\tests\Mint.WebApp.Admin.Architecture.Tests\Mint.WebApp.Admin.Architecture.Tests.csproj", "{D44172DD-0A58-4FDA-A4B9-64D25CBD4BAB}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -85,18 +83,6 @@ Global
{6AD5C31F-C007-4B36-8D94-A69500E8662C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6AD5C31F-C007-4B36-8D94-A69500E8662C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6AD5C31F-C007-4B36-8D94-A69500E8662C}.Release|Any CPU.Build.0 = Release|Any CPU
{7F551865-7DAB-45FD-82A8-693B8DB35EA8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7F551865-7DAB-45FD-82A8-693B8DB35EA8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7F551865-7DAB-45FD-82A8-693B8DB35EA8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7F551865-7DAB-45FD-82A8-693B8DB35EA8}.Release|Any CPU.Build.0 = Release|Any CPU
{8FD30732-AB43-4A88-AE02-15E8EBF0E48E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8FD30732-AB43-4A88-AE02-15E8EBF0E48E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8FD30732-AB43-4A88-AE02-15E8EBF0E48E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8FD30732-AB43-4A88-AE02-15E8EBF0E48E}.Release|Any CPU.Build.0 = Release|Any CPU
{406A5CF3-0E70-4304-9F2E-11833B976DE2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{406A5CF3-0E70-4304-9F2E-11833B976DE2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{406A5CF3-0E70-4304-9F2E-11833B976DE2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{406A5CF3-0E70-4304-9F2E-11833B976DE2}.Release|Any CPU.Build.0 = Release|Any CPU
{66EE6A01-5137-4E46-8647-803C9605CED7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{66EE6A01-5137-4E46-8647-803C9605CED7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{66EE6A01-5137-4E46-8647-803C9605CED7}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -117,18 +103,6 @@ Global
{306E3BBB-14A8-45E6-BDC4-52822A0F7B32}.Debug|Any CPU.Build.0 = Debug|Any CPU
{306E3BBB-14A8-45E6-BDC4-52822A0F7B32}.Release|Any CPU.ActiveCfg = Release|Any CPU
{306E3BBB-14A8-45E6-BDC4-52822A0F7B32}.Release|Any CPU.Build.0 = Release|Any CPU
{6700AD78-48CC-4C06-AC7E-0780BA195F2D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6700AD78-48CC-4C06-AC7E-0780BA195F2D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6700AD78-48CC-4C06-AC7E-0780BA195F2D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6700AD78-48CC-4C06-AC7E-0780BA195F2D}.Release|Any CPU.Build.0 = Release|Any CPU
{C270E6D2-373C-48CE-B534-D1CD9D3A40A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C270E6D2-373C-48CE-B534-D1CD9D3A40A7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C270E6D2-373C-48CE-B534-D1CD9D3A40A7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C270E6D2-373C-48CE-B534-D1CD9D3A40A7}.Release|Any CPU.Build.0 = Release|Any CPU
{EC4FA327-929A-465E-B2F8-155A1A187A9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EC4FA327-929A-465E-B2F8-155A1A187A9C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EC4FA327-929A-465E-B2F8-155A1A187A9C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EC4FA327-929A-465E-B2F8-155A1A187A9C}.Release|Any CPU.Build.0 = Release|Any CPU
{C5647212-6FC3-44B7-A741-2A47E1DC8EF5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C5647212-6FC3-44B7-A741-2A47E1DC8EF5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C5647212-6FC3-44B7-A741-2A47E1DC8EF5}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -137,10 +111,6 @@ Global
{2EE99609-9259-4E94-902C-091C56B2A337}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2EE99609-9259-4E94-902C-091C56B2A337}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2EE99609-9259-4E94-902C-091C56B2A337}.Release|Any CPU.Build.0 = Release|Any CPU
{A4B2BF08-9621-47D8-AB40-CB0EFCE5BD16}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A4B2BF08-9621-47D8-AB40-CB0EFCE5BD16}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A4B2BF08-9621-47D8-AB40-CB0EFCE5BD16}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A4B2BF08-9621-47D8-AB40-CB0EFCE5BD16}.Release|Any CPU.Build.0 = Release|Any CPU
{F8224E05-7862-4521-92F9-C050EB1A4B5F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F8224E05-7862-4521-92F9-C050EB1A4B5F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F8224E05-7862-4521-92F9-C050EB1A4B5F}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -153,6 +123,34 @@ Global
{056002E9-BE29-4EE2-ABE0-883B9B6BC1F5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{056002E9-BE29-4EE2-ABE0-883B9B6BC1F5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{056002E9-BE29-4EE2-ABE0-883B9B6BC1F5}.Release|Any CPU.Build.0 = Release|Any CPU
{338BD391-99E7-4E5A-9BC6-A1725C43475F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{338BD391-99E7-4E5A-9BC6-A1725C43475F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{338BD391-99E7-4E5A-9BC6-A1725C43475F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{338BD391-99E7-4E5A-9BC6-A1725C43475F}.Release|Any CPU.Build.0 = Release|Any CPU
{5E7F2612-5464-4167-A6D1-43B458EB1923}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5E7F2612-5464-4167-A6D1-43B458EB1923}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5E7F2612-5464-4167-A6D1-43B458EB1923}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5E7F2612-5464-4167-A6D1-43B458EB1923}.Release|Any CPU.Build.0 = Release|Any CPU
{3137D52A-03B4-4199-9642-3F513CE807BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3137D52A-03B4-4199-9642-3F513CE807BB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3137D52A-03B4-4199-9642-3F513CE807BB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3137D52A-03B4-4199-9642-3F513CE807BB}.Release|Any CPU.Build.0 = Release|Any CPU
{B84A11BC-D32B-40C9-A66F-051F2E5B86B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B84A11BC-D32B-40C9-A66F-051F2E5B86B5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B84A11BC-D32B-40C9-A66F-051F2E5B86B5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B84A11BC-D32B-40C9-A66F-051F2E5B86B5}.Release|Any CPU.Build.0 = Release|Any CPU
{E26A5117-E63B-4EC6-BDD8-09D7B936DB8B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E26A5117-E63B-4EC6-BDD8-09D7B936DB8B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E26A5117-E63B-4EC6-BDD8-09D7B936DB8B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E26A5117-E63B-4EC6-BDD8-09D7B936DB8B}.Release|Any CPU.Build.0 = Release|Any CPU
{67E21190-4199-470A-ADF1-910A7CCA3F75}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{67E21190-4199-470A-ADF1-910A7CCA3F75}.Debug|Any CPU.Build.0 = Debug|Any CPU
{67E21190-4199-470A-ADF1-910A7CCA3F75}.Release|Any CPU.ActiveCfg = Release|Any CPU
{67E21190-4199-470A-ADF1-910A7CCA3F75}.Release|Any CPU.Build.0 = Release|Any CPU
{D44172DD-0A58-4FDA-A4B9-64D25CBD4BAB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D44172DD-0A58-4FDA-A4B9-64D25CBD4BAB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D44172DD-0A58-4FDA-A4B9-64D25CBD4BAB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D44172DD-0A58-4FDA-A4B9-64D25CBD4BAB}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -162,11 +160,6 @@ Global
{EF0BBA79-FDD8-4922-8F50-6B24C469F0CA} = {326E6240-5F0D-451D-BEC7-81D042DF5321}
{0199D1FA-61BF-4621-B224-F9CE93086EDF} = {326E6240-5F0D-451D-BEC7-81D042DF5321}
{A9FEF188-FD07-4A88-A84B-4B222FCEC1A0} = {EBC3A9B7-E9B3-4526-A282-E072FEA7B8F1}
{7A823355-1953-4B19-A64F-F7A53AF449A7} = {0199D1FA-61BF-4621-B224-F9CE93086EDF}
{7F551865-7DAB-45FD-82A8-693B8DB35EA8} = {7A823355-1953-4B19-A64F-F7A53AF449A7}
{8FD30732-AB43-4A88-AE02-15E8EBF0E48E} = {7A823355-1953-4B19-A64F-F7A53AF449A7}
{AACDD6BF-E715-4FAA-B134-CEA50F20344F} = {0199D1FA-61BF-4621-B224-F9CE93086EDF}
{406A5CF3-0E70-4304-9F2E-11833B976DE2} = {AACDD6BF-E715-4FAA-B134-CEA50F20344F}
{08CE716F-4D08-447C-96EE-A4018AFA7035} = {326E6240-5F0D-451D-BEC7-81D042DF5321}
{66EE6A01-5137-4E46-8647-803C9605CED7} = {08CE716F-4D08-447C-96EE-A4018AFA7035}
{50EDA805-7245-48C5-B972-6216D23F29A5} = {08CE716F-4D08-447C-96EE-A4018AFA7035}
Expand All @@ -175,16 +168,20 @@ Global
{B4987191-ABF8-472B-9432-C0222120D832} = {0199D1FA-61BF-4621-B224-F9CE93086EDF}
{04A3D8C5-44BA-4E01-9E33-7FA2BC5CCDBA} = {B4987191-ABF8-472B-9432-C0222120D832}
{306E3BBB-14A8-45E6-BDC4-52822A0F7B32} = {EBC3A9B7-E9B3-4526-A282-E072FEA7B8F1}
{6700AD78-48CC-4C06-AC7E-0780BA195F2D} = {7A823355-1953-4B19-A64F-F7A53AF449A7}
{C270E6D2-373C-48CE-B534-D1CD9D3A40A7} = {EBC3A9B7-E9B3-4526-A282-E072FEA7B8F1}
{EC4FA327-929A-465E-B2F8-155A1A187A9C} = {E02DA575-B073-4084-89A9-2615E37C0C06}
{C5647212-6FC3-44B7-A741-2A47E1DC8EF5} = {B4987191-ABF8-472B-9432-C0222120D832}
{2EE99609-9259-4E94-902C-091C56B2A337} = {E02DA575-B073-4084-89A9-2615E37C0C06}
{A4B2BF08-9621-47D8-AB40-CB0EFCE5BD16} = {7A823355-1953-4B19-A64F-F7A53AF449A7}
{F8224E05-7862-4521-92F9-C050EB1A4B5F} = {326E6240-5F0D-451D-BEC7-81D042DF5321}
{A58CC3EF-B286-4151-853D-88F8EE5F0392} = {0199D1FA-61BF-4621-B224-F9CE93086EDF}
{0896B869-FAAC-4F74-AD70-13820F63C319} = {A58CC3EF-B286-4151-853D-88F8EE5F0392}
{056002E9-BE29-4EE2-ABE0-883B9B6BC1F5} = {A58CC3EF-B286-4151-853D-88F8EE5F0392}
{338BD391-99E7-4E5A-9BC6-A1725C43475F} = {E02DA575-B073-4084-89A9-2615E37C0C06}
{5E7F2612-5464-4167-A6D1-43B458EB1923} = {A58CC3EF-B286-4151-853D-88F8EE5F0392}
{3137D52A-03B4-4199-9642-3F513CE807BB} = {B4987191-ABF8-472B-9432-C0222120D832}
{B84A11BC-D32B-40C9-A66F-051F2E5B86B5} = {E02DA575-B073-4084-89A9-2615E37C0C06}
{E26A5117-E63B-4EC6-BDD8-09D7B936DB8B} = {A58CC3EF-B286-4151-853D-88F8EE5F0392}
{D6D76CD1-7D79-4455-9B3D-3CFC26A0ADF7} = {E02DA575-B073-4084-89A9-2615E37C0C06}
{67E21190-4199-470A-ADF1-910A7CCA3F75} = {D6D76CD1-7D79-4455-9B3D-3CFC26A0ADF7}
{D44172DD-0A58-4FDA-A4B9-64D25CBD4BAB} = {D6D76CD1-7D79-4455-9B3D-3CFC26A0ADF7}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {E2E3EF17-D76B-4080-B8AA-2FB58CBB21B8}
Expand Down
3 changes: 3 additions & 0 deletions src/Mint.Application/Dtos/ImageLink.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
namespace Mint.Application.Dtos;

public sealed record ImageLink(string Link);
2 changes: 2 additions & 0 deletions src/Mint.Application/Interfaces/IGenericReadRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ public interface IGenericReadRepository<T> where T : class
{
Task<List<T>> GetAllAsync(CancellationToken cancellationToken = default);

IQueryable<T> Where(Expression<Func<T, bool>> func);

Task<T?> FirstOrDefaultAsync(Expression<Func<T, bool>> func, CancellationToken cancellationToken = default);

Task<T?> SingleOrDefaultAsync(Expression<Func<T, bool>> func, CancellationToken cancellationToken = default);
Expand Down
5 changes: 0 additions & 5 deletions src/Mint.Application/Interfaces/IQuery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@

namespace Mint.Application.Interfaces;

public interface IQuery : IRequest;

public interface IQuery<out TResponse> : IRequest<TResponse>;

public interface IQueryHandler<in TRequest> : IRequestHandler<TRequest>
where TRequest : IQuery;

public interface IQueryHandler<in TRequest, TResponse> : IRequestHandler<TRequest, TResponse>
where TRequest : IQuery<TResponse>;
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using Mint.Domain.DTO_s.Identity;
using Mint.Domain.Models.Identity;

namespace Mint.WebApp.Identity.Application.Mapper;
namespace Mint.Application.Mapper;

public class UserMapper : Profile
{
Expand Down
13 changes: 12 additions & 1 deletion src/Mint.Application/Repositories/IProductPhotoRepository.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
using Mint.Application.Interfaces;
using Mint.Domain.Models;
using Mint.Domain.Models.Admin.Products;

namespace Mint.Application.Repositories;

/// <summary>
/// Product Photo Repository
/// </summary>
public interface IProductPhotoRepository : IGenericRepository<ProductPhoto>;
public interface IProductPhotoRepository : IGenericRepository<ProductPhoto>
{
/// <summary>
/// Retrieves a Dictionary where Key is product id and Value is a Photos collection.
/// </summary>
/// <param name="productsIds"></param>
/// <param name="count"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
Dictionary<Guid, List<Photo>> GetProductsImages(List<Guid> productsIds, int count = 5);
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using Mint.Domain.DTO_s.Identity;
using Mint.Domain.Models.Identity;

namespace Mint.WebApp.Identity.Application.Operations.Repositories;
namespace Mint.Application.Repositories;

/// <summary>
/// Role Repository Interface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using Mint.Domain.DTO_s.Identity;
using Mint.Domain.Models.Identity;

namespace Mint.WebApp.Identity.Application.Operations.Repositories;
namespace Mint.Application.Repositories;

/// <summary>
/// User Repository
Expand Down
2 changes: 1 addition & 1 deletion src/Mint.Domain/Common/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public enum ContactType : int
Phone = 1,
}

public enum SortType: int
public enum SortDirection: int
{
Ascending = 1,
Descending = -1,
Expand Down
3 changes: 0 additions & 3 deletions src/Mint.Domain/DTO's/Identity/AuthenticationAdminResponse.cs

This file was deleted.

18 changes: 0 additions & 18 deletions src/Mint.Domain/DTO's/Identity/SignInDTO.cs

This file was deleted.

22 changes: 15 additions & 7 deletions src/Mint.Domain/Extensions/ListExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
using Mint.Domain.Common;
using System.ComponentModel;

namespace Mint.Domain.Extensions;

public static class ListExtensions
{
public static IOrderedEnumerable<TSource> SortBy<TSource, TKey>(
this IEnumerable<TSource> source,
Func<TSource, TKey> keySelector,
SortType sort)
public static IOrderedEnumerable<T> SortBy<T>(
this IEnumerable<T> source,
Func<T, object?> propertyExpression,
SortDirection sortDir) where T : class
{
if (sort == SortType.Descending)
return source.OrderByDescending(keySelector);
ArgumentNullException.ThrowIfNull(source);
ArgumentNullException.ThrowIfNull(propertyExpression);

if (!Enum.IsDefined(typeof(SortDirection), sortDir))
throw new InvalidEnumArgumentException(nameof(sortDir), (int)sortDir, typeof(SortDirection));


if (sortDir is SortDirection.Descending)
return source.OrderByDescending(propertyExpression);
else
return source.OrderBy(keySelector);
return source.OrderBy(propertyExpression);
}
}
6 changes: 6 additions & 0 deletions src/Mint.Domain/Models/Identity/Consumer.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace Mint.Domain.Models.Identity;

public class Consumer : User
{

}
2 changes: 0 additions & 2 deletions src/Mint.Infrastructure/ConfigureServices.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Microsoft.Extensions.DependencyInjection;
using Mint.WebApp.Admin.Application.Operations.Repositories;
using Mint.Infrastructure.Repositories.Admin;
using Mint.WebApp.Identity.Application.Operations.Repositories;
using Mint.Infrastructure.Repositories.Identity;
using Mint.Application.Interfaces;
using Mint.Infrastructure.Services;
Expand Down Expand Up @@ -68,7 +67,6 @@ public static IServiceCollection AddClientRepositories(this IServiceCollection s

public static IServiceCollection AddAdminIdentityRepositories(this IServiceCollection services)
{
services.AddScoped<IAdminAuthenticationRepository, AdminAuthenticationRepository>();
services.AddScoped<IAdminRepository, AdminRepository>();

return services;
Expand Down
Loading

0 comments on commit d50acd7

Please sign in to comment.