-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7dd304d
commit cf94fcb
Showing
4 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
use crate::CmlString; | ||
use makaikit_databases_serde::DatabaseRecord; | ||
use serde::{Deserialize, Serialize}; | ||
|
||
#[derive(Clone, Debug, Deserialize, Serialize)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct Complete { | ||
pub r#type: i32, | ||
pub val1: i32, | ||
pub val2: i32, | ||
} | ||
|
||
#[derive(Clone, Debug, Deserialize, Serialize)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct Info { | ||
pub r#type: i32, | ||
pub val1: i32, | ||
pub val2: i32, | ||
|
||
#[serde(rename = "identificationID")] | ||
pub identification_id: i32, | ||
|
||
pub rate: i32, | ||
pub is_complete: i32, | ||
} | ||
|
||
#[derive(Clone, Debug, Deserialize, Serialize)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct HospitalGachaData { | ||
#[serde(rename = "ID")] | ||
pub id: i32, | ||
|
||
pub enum_name: String, | ||
pub comment: String, | ||
pub name: CmlString, | ||
pub help: CmlString, | ||
pub consume_point: i32, | ||
pub info: Vec<Info>, | ||
pub info2: Vec<Info>, | ||
pub complete: Complete, | ||
pub complete2: Complete, | ||
pub cond_on_flag: Vec<i32>, | ||
pub cond_off_flag: Vec<i32>, | ||
pub open_flag: i32, | ||
pub on_flag_when_complete: i32, | ||
|
||
pub version: i32, | ||
pub region: u32, | ||
pub product: u32, | ||
pub platform: u32, | ||
} | ||
|
||
impl DatabaseRecord for HospitalGachaData { | ||
fn database_id(&self) -> i32 { | ||
self.id | ||
} | ||
|
||
fn database_enum_name(&self) -> &str { | ||
&self.enum_name | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters