chesscom_openapi/models/score.rs
1/*
2 * Chess
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 1.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11
12
13
14#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
15pub struct Score {
16 #[serde(rename = "score")]
17 pub score: i32,
18 #[serde(rename = "date")]
19 #[serde(with = "chrono::serde::ts_seconds")]
20 pub date: chrono::DateTime<chrono::Utc>,
21}
22
23impl Score {
24 pub fn new(score: i32, date: chrono::DateTime<chrono::Utc>) -> Score {
25 Score {
26 score,
27 date,
28 }
29 }
30}
31
32