mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 15:42:48 -05:00
event paging
This commit is contained in:
@ -5,12 +5,14 @@ namespace Bit.Core.Models.Api
|
||||
{
|
||||
public class ListResponseModel<T> : ResponseModel where T : ResponseModel
|
||||
{
|
||||
public ListResponseModel(IEnumerable<T> data)
|
||||
public ListResponseModel(IEnumerable<T> data, string continuationToken = null)
|
||||
: base("list")
|
||||
{
|
||||
Data = data;
|
||||
ContinuationToken = continuationToken;
|
||||
}
|
||||
|
||||
public IEnumerable<T> Data { get; set; }
|
||||
public string ContinuationToken { get; set; }
|
||||
}
|
||||
}
|
||||
|
8
src/Core/Models/Data/PageOptions.cs
Normal file
8
src/Core/Models/Data/PageOptions.cs
Normal file
@ -0,0 +1,8 @@
|
||||
namespace Bit.Core.Models.Data
|
||||
{
|
||||
public class PageOptions
|
||||
{
|
||||
public string ContinuationToken { get; set; }
|
||||
public int PageSize { get; set; } = 100;
|
||||
}
|
||||
}
|
10
src/Core/Models/Data/PagedResult.cs
Normal file
10
src/Core/Models/Data/PagedResult.cs
Normal file
@ -0,0 +1,10 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Bit.Core.Models.Data
|
||||
{
|
||||
public class PagedResult<T>
|
||||
{
|
||||
public List<T> Data { get; set; } = new List<T>();
|
||||
public string ContinuationToken { get; set; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user