Commit a61f379e authored by xuwencheng's avatar xuwencheng

login

parent 1295e3eb
...@@ -6,8 +6,12 @@ pub struct LoginInfo { ...@@ -6,8 +6,12 @@ pub struct LoginInfo {
pub group_id: i64, pub group_id: i64,
// 店铺id // 店铺id
pub seller_id: i64, pub seller_id: i64,
// 店铺名
pub seller_name: Option<String>,
// 门店id // 门店id
pub store_id: i64, pub store_id: i64,
// 门店名
pub store_name: Option<String>,
// 店铺类型 // 店铺类型
pub brand_type: i32, pub brand_type: i32,
// token // token
...@@ -26,8 +30,12 @@ pub struct StoreInfo { ...@@ -26,8 +30,12 @@ pub struct StoreInfo {
pub group_id: i64, pub group_id: i64,
// 店铺id // 店铺id
pub seller_id: i64, pub seller_id: i64,
// 店铺名
pub seller_name: Option<String>,
// 门店id // 门店id
pub store_id: i64, pub store_id: i64,
// 门店名
pub store_name: Option<String>,
// 店铺类型 // 店铺类型
pub brand_type: i32, pub brand_type: i32,
} }
...@@ -42,11 +50,20 @@ impl StoreInfo { ...@@ -42,11 +50,20 @@ impl StoreInfo {
} }
pub fn login_info(&self, token: impl AsRef<str>) -> LoginInfo { pub fn login_info(&self, token: impl AsRef<str>) -> LoginInfo {
let StoreInfo { group_id, seller_id, store_id, brand_type } = *self; let StoreInfo {
group_id,
seller_id,
seller_name,
store_id,
store_name,
brand_type,
} = self.clone();
LoginInfo { LoginInfo {
group_id, group_id,
seller_id, seller_id,
seller_name,
store_id, store_id,
store_name,
brand_type, brand_type,
token: token.as_ref().to_string(), token: token.as_ref().to_string(),
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment