-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
big refactoring changed folder structure and more
- Loading branch information
1 parent
eedc770
commit d50acd7
Showing
136 changed files
with
992 additions
and
683 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
namespace Mint.Application.Dtos; | ||
|
||
public sealed record ImageLink(string Link); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 12 additions & 1 deletion
13
src/Mint.Application/Repositories/IProductPhotoRepository.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 0 additions & 3 deletions
3
src/Mint.Domain/DTO's/Identity/AuthenticationAdminResponse.cs
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace Mint.Domain.Models.Identity; | ||
|
||
public class Consumer : User | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.