Commit 0b9066fe authored by xuwencheng's avatar xuwencheng

store

parent 5f0cf9f2
......@@ -36,4 +36,15 @@ impl StoreInfo {
pub fn is_dinner(&self) -> bool {
self.brand_type == 70
}
pub fn login_info(&self, token: impl AsRef<str>) -> LoginInfo {
let StoreInfo { group_id, seller_id, store_id, brand_type } = *self;
LoginInfo {
group_id,
seller_id,
store_id,
brand_type,
token: token.as_ref().to_string(),
}
}
}
\ No newline at end of file
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