-
Notifications
You must be signed in to change notification settings - Fork 35
/
SrFilter.cs
67 lines (58 loc) · 2.31 KB
/
SrFilter.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
using NSwag.Annotations;
using Tzkt.Api.Services;
namespace Tzkt.Api
{
public class SrFilter : INormalizable
{
/// <summary>
/// Filter by internal TzKT id.
/// Click on the parameter to expand more details.
/// </summary>
public Int32Parameter id { get; set; }
/// <summary>
/// Filter by smart rollup address.
/// Click on the parameter to expand more details.
/// </summary>
public AddressParameter address { get; set; }
/// <summary>
/// Filter by smart rollup creator.
/// Click on the parameter to expand more details.
/// </summary>
public AccountParameter creator { get; set; }
/// <summary>
/// Filter by level of the block, where the rollup was first seen.
/// Click on the parameter to expand more details.
/// </summary>
public Int32Parameter firstActivity { get; set; }
/// <summary>
/// Filter by timestamp of the block, where the rollup was first seen.
/// Click on the parameter to expand more details.
/// </summary>
public TimestampParameter firstActivityTime { get; set; }
/// <summary>
/// Filter by level of the block, where the rollup was last seen.
/// Click on the parameter to expand more details.
/// </summary>
public Int32Parameter lastActivity { get; set; }
/// <summary>
/// Filter by timestamp of the block, where the rollup was last seen.
/// Click on the parameter to expand more details.
/// </summary>
public TimestampParameter lastActivityTime { get; set; }
[OpenApiIgnore]
public bool Empty =>
id == null &&
address == null &&
creator == null &&
firstActivity == null &&
firstActivityTime == null &&
lastActivity == null &&
lastActivityTime == null;
public string Normalize(string name)
{
return ResponseCacheService.BuildKey("",
("id", id), ("address", address), ("creator", creator), ("firstActivity", firstActivity),
("firstActivityTime", firstActivityTime), ("lastActivity", lastActivity), ("lastActivityTime", lastActivityTime));
}
}
}