-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
35 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using System.Collections.Generic; | ||
using YuckQi.Domain.Entities.Abstract; | ||
|
||
namespace YuckQi.Domain.RequestResults | ||
{ | ||
public class Page<TEntity, TKey> where TEntity : class, IEntity<TKey> where TKey : struct | ||
{ | ||
#region Properties | ||
|
||
public IReadOnlyCollection<TEntity> Items { get; } | ||
public int PageNumber { get; } | ||
public int PageSize { get; } | ||
public int TotalCount { get; } | ||
|
||
#endregion | ||
|
||
|
||
#region Constructors | ||
|
||
public Page(IReadOnlyCollection<TEntity> items, int page, int rows, int total) | ||
{ | ||
Items = items ?? new List<TEntity>(); | ||
PageNumber = page; | ||
PageSize = rows; | ||
TotalCount = total; | ||
} | ||
|
||
#endregion | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
src/YuckQi.Domain/Result.cs → src/YuckQi.Domain/RequestResults/Result.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
2 changes: 1 addition & 1 deletion
2
src/YuckQi.Domain/ResultCode.cs → ...uckQi.Domain/RequestResults/ResultCode.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,4 +1,4 @@ | ||
namespace YuckQi.Domain | ||
namespace YuckQi.Domain.RequestResults | ||
{ | ||
public readonly struct ResultCode | ||
{ | ||
|
2 changes: 1 addition & 1 deletion
2
src/YuckQi.Domain/ResultDetail.cs → ...kQi.Domain/RequestResults/ResultDetail.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,4 +1,4 @@ | ||
namespace YuckQi.Domain | ||
namespace YuckQi.Domain.RequestResults | ||
{ | ||
public class ResultDetail | ||
{ | ||
|
2 changes: 1 addition & 1 deletion
2
src/YuckQi.Domain/ResultType.cs → ...uckQi.Domain/RequestResults/ResultType.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,4 +1,4 @@ | ||
namespace YuckQi.Domain | ||
namespace YuckQi.Domain.RequestResults | ||
{ | ||
public enum ResultType | ||
{ | ||
|
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