diff --git a/src/api/member_account/api.rs b/src/api/member_account/api.rs index df86b28..f23c427 100644 --- a/src/api/member_account/api.rs +++ b/src/api/member_account/api.rs @@ -69,7 +69,7 @@ impl Api { let balance = r.balance.unwrap_or(0.00); let balance_bota = r.balance_bota.unwrap_or(0.00); let balance_sum = r.balance_sum.unwrap_or(0.00); - let companies = r.companies.unwrap_or("".to_string()); + let companies = r.companies; Ok(models::GetBalanceForUserResponse { balance, diff --git a/src/api/member_account/models.rs b/src/api/member_account/models.rs index 57172fc..22c5681 100644 --- a/src/api/member_account/models.rs +++ b/src/api/member_account/models.rs @@ -23,7 +23,7 @@ pub struct GetBalanceForUserResponse { pub balance_bota: f64, #[serde(rename = "balanceSum")] pub balance_sum: f64, - pub companies: String, + pub companies: Option, } pub struct GetBalanceForPartnerRequest {} diff --git a/src/compositions/member/models.rs b/src/compositions/member/models.rs index 8be6a88..00c3c69 100644 --- a/src/compositions/member/models.rs +++ b/src/compositions/member/models.rs @@ -12,7 +12,7 @@ pub struct MemberModel { /// pub balance_sum: f64, /// - pub companies: String, + pub companies: Option, /// pub oriental_play: String, /// diff --git a/src/repositories/member/models.rs b/src/repositories/member/models.rs index 752c721..c5a183d 100644 --- a/src/repositories/member/models.rs +++ b/src/repositories/member/models.rs @@ -14,7 +14,7 @@ pub struct Member { /// pub balance_sum: f64, /// - pub companies: String, + pub companies: Option, /// pub oriental_play: String, /// @@ -58,7 +58,7 @@ pub struct ModifyMemberForBalance { /// pub balance_sum: f64, /// - pub companies: String, + pub companies: Option, } /// diff --git a/src/repositories/member/schema.rs b/src/repositories/member/schema.rs index a6f0c77..5089b36 100644 --- a/src/repositories/member/schema.rs +++ b/src/repositories/member/schema.rs @@ -13,7 +13,7 @@ table! { /// balance_sum -> Double, /// - companies -> Text, + companies -> Nullable, /// oriental_play -> Text, ///