nil_payload/request/infrastructure/
stable.rs1use bon::Builder;
5use nil_core::continent::Coord;
6use nil_core::infrastructure::building::r#impl::stable::recruit_queue::{
7 StableRecruitOrderId,
8 StableRecruitOrderRequest,
9};
10use nil_core::world::config::WorldId;
11use serde::{Deserialize, Serialize};
12
13#[cfg(feature = "typescript")]
14use ts_rs::TS;
15
16#[derive(Builder, Clone, Debug, Deserialize, Serialize)]
17#[serde(rename_all = "camelCase")]
18#[cfg_attr(feature = "typescript", derive(TS))]
19#[cfg_attr(feature = "typescript", ts(export))]
20pub struct AddStableRecruitOrderRequest {
21 #[builder(start_fn, into)]
22 pub world: WorldId,
23 pub request: StableRecruitOrderRequest,
24}
25
26#[derive(Builder, Clone, Debug, Deserialize, Serialize)]
27#[serde(rename_all = "camelCase")]
28#[cfg_attr(feature = "typescript", derive(TS))]
29#[cfg_attr(feature = "typescript", ts(export))]
30pub struct CancelStableRecruitOrderRequest {
31 #[builder(start_fn, into)]
32 pub world: WorldId,
33 #[builder(into)]
34 pub coord: Coord,
35 pub id: StableRecruitOrderId,
36}
37
38#[derive(Builder, Clone, Debug, Deserialize, Serialize)]
39#[serde(rename_all = "camelCase")]
40#[cfg_attr(feature = "typescript", derive(TS))]
41#[cfg_attr(feature = "typescript", ts(export))]
42pub struct GetStableRecruitCatalogRequest {
43 #[builder(start_fn, into)]
44 pub world: WorldId,
45 #[builder(into)]
46 pub coord: Coord,
47}