syntax = "proto3";
option go_package = ".;pb";
import "equipment_db.proto";

enum ShopType {
  Null = 0;
  GoldShop = 1;
  DiamondShop = 2;
  PVPShop = 3;
  PVEShop = 4;
  AllianceShop = 5;
  HeroShop =6;
  SmithyShop =7;
}

message UserShopData {
  int64 LastRefreshTime = 1;            //最后一次刷新时间
  int32 ManualRefreshNum = 2;           //手动刷新次数
  repeated int32 Items = 3;             //商品列表
  map<int32, int32> buy = 4;            //购买记录
  map<int32, DB_Equipment> preview = 5; //预览数据
}

message DBShop {
  string id = 1;                //@go_tags(`bson:"_id"`) 装备id
  string uid = 2;               //@go_tags(`bson:"uid"`) 装备id
  int32 refreshnumgoldShop = 3;     //@go_tags(`bson:"refresholdShop"`) 刷新金币商店次数
  int64 refreshtimegoldShop = 4;        //@go_tags(`bson:"refresholdShop"`) 刷新金币商店的时间
  UserShopData goldShop = 5;    //@go_tags(`bson:"goldShop"`) 金币商店数据
  UserShopData diamondShop = 6; //@go_tags(`bson:"diamondShop"`) 金币商店数据
  UserShopData pvpShop = 7;     //@go_tags(`bson:"pvpShop"`) 金币商店数据
  UserShopData pveShop = 8;     //@go_tags(`bson:"pveShop"`) 金币商店数据
  UserShopData allianceShop = 9; //@go_tags(`bson:"allianceShop"`) 金币商店数据
  UserShopData heroShop = 10; //@go_tags(`bson:"heroShop"`) 金币商店数据
  UserShopData smithyShop = 11; //@go_tags(`bson:"smithyShop"`) 金币商店数据
}

// message DBShopItem {
//   string id = 1;                //@go_tags(`bson:"_id"`) 装备id
//   string uid = 2;               //@go_tags(`bson:"uid"`) 装备id
//   int32 goodsId = 3;            //@go_tags(`bson:"goodsId"`) 商品Id
//   map<int32, int32> buyNum = 4; //@go_tags(`bson:"buyNum"`) 购买数量
//   map<int32, int64> lastBuyTime =
//       5; //@go_tags(`bson:"lastBuyTime"`) 最后一次购买的时间
// }
