chesscom_openapi/models/rating.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 Rating {
16 #[serde(rename = "rating")]
17 pub rating: i32,
18 #[serde(rename = "date")]
19 #[serde(with = "chrono::serde::ts_seconds")]
20 pub date: chrono::DateTime<chrono::Utc>,
21}
22
23impl Rating {
24 pub fn new(rating: i32, date: chrono::DateTime<chrono::Utc>) -> Rating {
25 Rating {
26 rating,
27 date,
28 }
29 }
30}
31
32