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
68
69
70
71
72
73
74
/*
* Ethereal Exchange API
*
* Ethereal HTTP API for real-time trading, order management, and market data access.
*
* The version of the OpenAPI document: 0.1.0
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct PointsPeriodDto {
/// Id representing the points period entry
#[serde(rename = "id")]
pub id: uuid::Uuid,
/// Address of the account (non-checksummed)
#[serde(rename = "address")]
pub address: String,
/// Season number
#[serde(rename = "season")]
pub season: f64,
/// Epoch number within the season
#[serde(rename = "epoch")]
pub epoch: f64,
/// Points earned in this epoch expressed as a decimal (precision: 9)
#[serde(rename = "points")]
pub points: String,
/// Referral points earned in this epoch expressed as a decimal (precision: 9)
#[serde(rename = "referralPoints")]
pub referral_points: String,
/// Beginning of points period (ms since Unix Epoch)
#[serde(rename = "startedAt")]
pub started_at: f64,
/// End of points period (ms since Unix Epoch)
#[serde(rename = "endedAt")]
pub ended_at: f64,
/// Points period creation timestamp (ms since Unix Epoch)
#[serde(rename = "createdAt")]
pub created_at: f64,
/// Points period last update timestamp (ms since Unix Epoch)
#[serde(rename = "updatedAt")]
pub updated_at: f64,
}
impl PointsPeriodDto {
pub fn new(
id: uuid::Uuid,
address: String,
season: f64,
epoch: f64,
points: String,
referral_points: String,
started_at: f64,
ended_at: f64,
created_at: f64,
updated_at: f64,
) -> PointsPeriodDto {
PointsPeriodDto {
id,
address,
season,
epoch,
points,
referral_points,
started_at,
ended_at,
created_at,
updated_at,
}
}
}