Skip to content

Commit

Permalink
change int to long in PageNumber
Browse files Browse the repository at this point in the history
  • Loading branch information
imaun committed Dec 18, 2022
1 parent c30e2ae commit 41af4a7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Models/QueryFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ namespace Behlog.Core.Models;
/// </summary>
public class QueryFilter
{
public long PageNumber { get; set; } = 1;
public int PageNumber { get; set; } = 1;
public int PageSize { get; set; } = 10;
public long StartIndex => (PageNumber * PageSize) - PageSize;
public int StartIndex => (PageNumber * PageSize) - PageSize;
public string OrderBy { get; set; }
public bool OrderDesc { get; set; }

Expand Down
4 changes: 2 additions & 2 deletions src/Models/QueryResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ protected QueryResult(IEnumerable<TResult> results)

public IReadOnlyCollection<ValidationError> Errors => _errors.ToList();

public long PageNumber { get; protected set; }
public int PageNumber { get; protected set; }

public int PageSize { get; protected set; }

Expand All @@ -57,7 +57,7 @@ public QueryResult<TResult> WithPageSize(int pageSize = 10)
return this;
}

public QueryResult<TResult> WithPageNumber(long pageNumber)
public QueryResult<TResult> WithPageNumber(int pageNumber)
{
PageNumber = pageNumber;
return this;
Expand Down

0 comments on commit 41af4a7

Please sign in to comment.