TemplateID::new now returns Result<T, TemplateNotFoundError> Cleanup code in some of new handlers
19 lines
455 B
Rust
19 lines
455 B
Rust
use serde::Deserialize;
|
|
|
|
template_id!(OnceReward reward_id);
|
|
|
|
#[derive(Deserialize, Debug)]
|
|
#[serde(rename_all = "PascalCase")]
|
|
pub struct OnceRewardTemplate {
|
|
#[serde(rename = "RewardID")]
|
|
pub reward_id: OnceRewardID,
|
|
pub reward_list: Vec<RewardItem>,
|
|
}
|
|
|
|
#[derive(Deserialize, Debug)]
|
|
#[serde(rename_all = "PascalCase")]
|
|
pub struct RewardItem {
|
|
#[serde(rename = "RewardItemID")]
|
|
pub reward_item_id: u32,
|
|
pub reward_amount: u32,
|
|
}
|