Implement LoginSchema
This commit is contained in:
parent
0ec8e3371b
commit
f4b500eadb
|
@ -95,7 +95,7 @@ pub mod schemas {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Serialize, Deserialize)]
|
#[derive(Debug, Serialize, Deserialize, PartialEq, Eq)]
|
||||||
#[serde(rename_all = "snake_case")]
|
#[serde(rename_all = "snake_case")]
|
||||||
pub struct LoginSchema {
|
pub struct LoginSchema {
|
||||||
login: String,
|
login: String,
|
||||||
|
@ -106,6 +106,26 @@ pub mod schemas {
|
||||||
gift_code_sku_id: Option<String>,
|
gift_code_sku_id: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl LoginSchema {
|
||||||
|
pub fn new(
|
||||||
|
login: String,
|
||||||
|
password: String,
|
||||||
|
undelete: Option<bool>,
|
||||||
|
captcha_key: Option<String>,
|
||||||
|
login_source: Option<String>,
|
||||||
|
gift_code_sku_id: Option<String>,
|
||||||
|
) -> LoginSchema {
|
||||||
|
LoginSchema {
|
||||||
|
login,
|
||||||
|
password,
|
||||||
|
undelete,
|
||||||
|
captcha_key,
|
||||||
|
login_source,
|
||||||
|
gift_code_sku_id,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Debug, Serialize, Deserialize)]
|
#[derive(Debug, Serialize, Deserialize)]
|
||||||
#[serde(rename_all = "snake_case")]
|
#[serde(rename_all = "snake_case")]
|
||||||
pub struct TotpSchema {
|
pub struct TotpSchema {
|
||||||
|
|
Loading…
Reference in New Issue