/*
 * @Author: 吴文洁
 * @Date: 2020-08-31 09:34:25
 * @LastEditors: zhangleyuan
 * @LastEditTime: 2020-12-04 11:37:33
 * @Description: 
 * @Copyright: 杭州杰竞科技有限公司 版权所有
 */

import Storage from './storage';
import { PREFIX } from '@/domains/basic-domain/constants';

class User {
  
  getStoreId(){
    return Storage.get(`${PREFIX}_storeId`)
  }

  getStoreUserId(){
    return Storage.get(`${PREFIX}_storeUserId`)
  }

  getUserId(){
    return Storage.get(`${PREFIX}_userId`)
  }

  getToken() {
    return Storage.get(`${PREFIX}_token`);
  }

  setStoreId(value:any){
    return Storage.set(`${PREFIX}_storeId`,value)
  }

  setStoreUserId(value:any){
    return Storage.set(`${PREFIX}_storeUserId`,value)
  }

  setUserId(value:any){
    return Storage.set(`${PREFIX}_userId`,value)
  }

  setToken(value:any) {
    return Storage.set(`${PREFIX}_token`,value);
  }
  removeToken(){
    return Storage.remove(`${PREFIX}_token`);
  }
  removeUserId(){
    return Storage.remove(`${PREFIX}_userId`);
  }
}

export default new User();