Skip to main content

nil_payload/request/
ranking.rs

1// Copyright (C) Call of Nil contributors
2// SPDX-License-Identifier: AGPL-3.0-only
3
4use bon::Builder;
5use nil_core::ruler::Ruler;
6use nil_core::world::config::WorldId;
7use serde::{Deserialize, Serialize};
8
9#[cfg(feature = "typescript")]
10use ts_rs::TS;
11
12#[derive(Builder, Clone, Debug, Deserialize, Serialize)]
13#[serde(rename_all = "camelCase")]
14#[cfg_attr(feature = "typescript", derive(TS))]
15#[cfg_attr(feature = "typescript", ts(export))]
16pub struct GetRankingRequest {
17  #[builder(start_fn, into)]
18  pub world: WorldId,
19}
20
21#[derive(Builder, Clone, Debug, Deserialize, Serialize)]
22#[serde(rename_all = "camelCase")]
23#[cfg_attr(feature = "typescript", derive(TS))]
24#[cfg_attr(feature = "typescript", ts(export))]
25pub struct GetRankRequest {
26  #[builder(start_fn, into)]
27  pub world: WorldId,
28  #[builder(into)]
29  pub ruler: Ruler,
30}