-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
using ReasnAPI.Models.Enums; | ||
|
||
namespace ReasnAPI.Models.API | ||
{ | ||
public enum SortBy | ||
{ | ||
CreatedAt, | ||
StartAt, | ||
Name | ||
} | ||
|
||
public enum SortOrder | ||
{ | ||
Ascending, | ||
Descending | ||
} | ||
|
||
public class PagedRequest | ||
{ | ||
public string FilterName { get; set; } | ||
public EventStatus? FilterStatus { get; set; } | ||
public List<string> FilterTags { get; set; } | ||
public DateTime? FilterStartAt { get; set; } | ||
public DateTime? FilterEndAt { get; set; } | ||
public int Offset { get; set; } | ||
public int Limit { get; set; } | ||
public SortBy SortBy { get; set; } | ||
public SortOrder SortOrder { get; set; } | ||
} | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using ReasnAPI.Models.Enums; | ||
|
||
namespace ReasnAPI.Models.API | ||
{ | ||
public class PagedResponse<T> | ||
{ | ||
public enum SortByEnum | ||
{ | ||
CreatedAt, | ||
StartAt, | ||
Name | ||
} | ||
|
||
public enum SortOrderEnum | ||
{ | ||
Ascending, | ||
Descending | ||
} | ||
|
||
public List<T> Items { get; set; } | ||
Check warning on line 20 in Server/ReasnAPI/ReasnAPI/Models/API/PagedResponse.cs GitHub Actions / dotnet-tests (ubuntu-latest)
Check warning on line 20 in Server/ReasnAPI/ReasnAPI/Models/API/PagedResponse.cs GitHub Actions / dotnet-tests (macos-latest)
|
||
public string FilterName { get; set; } | ||
Check warning on line 21 in Server/ReasnAPI/ReasnAPI/Models/API/PagedResponse.cs GitHub Actions / dotnet-tests (ubuntu-latest)
Check warning on line 21 in Server/ReasnAPI/ReasnAPI/Models/API/PagedResponse.cs GitHub Actions / dotnet-tests (macos-latest)
Check warning on line 21 in Server/ReasnAPI/ReasnAPI/Models/API/PagedResponse.cs GitHub Actions / dotnet-tests (windows-latest)
|
||
public EventStatus? FilterStatus { get; set; } | ||
public List<string> FilterTags { get; set; } | ||
Check warning on line 23 in Server/ReasnAPI/ReasnAPI/Models/API/PagedResponse.cs GitHub Actions / dotnet-tests (ubuntu-latest)
Check warning on line 23 in Server/ReasnAPI/ReasnAPI/Models/API/PagedResponse.cs GitHub Actions / dotnet-tests (macos-latest)
Check warning on line 23 in Server/ReasnAPI/ReasnAPI/Models/API/PagedResponse.cs GitHub Actions / dotnet-tests (windows-latest)
|
||
public DateTime? FilterStartAt { get; set; } | ||
public DateTime? FilterEndAt { get; set; } | ||
public int Offset { get; set; } | ||
public int Limit { get; set; } | ||
public SortByEnum SortBy { get; set; } | ||
public SortOrderEnum SortOrder { get; set; } | ||
public int TotalCount { get; set; } | ||
} | ||
} |