跑商协议调整

This commit is contained in:
meixiongfeng 2023-05-12 19:59:48 +08:00
parent 763dcd6c0b
commit ef4f779ef2
3 changed files with 202 additions and 106 deletions

View File

@ -34,8 +34,9 @@ func (this *modelCaravan) getCaravanList(uid string) (result *pb.DBCaravan, err
Id: primitive.NewObjectID().Hex(), Id: primitive.NewObjectID().Hex(),
Uid: uid, Uid: uid,
UseCount: 0, UseCount: 0,
Items: map[int32]*pb.BagInfo{},
Goods: map[int32]*pb.Goods{}, Goods: map[int32]*pb.Goods{},
City: map[int32]*pb.CityGoods{}, City: map[int32]*pb.CityInfo{},
Lv: 0, Lv: 0,
Num: 0, Num: 0,
Profit: 0, Profit: 0,

View File

@ -49,11 +49,12 @@ func (this *Caravan) ModifyCaravanData(uid string, data map[string]interface{})
// 初始化城市信息 // 初始化城市信息
func (this *Caravan) InitCaravanCityData(uid string, data *pb.DBCaravan) { func (this *Caravan) InitCaravanCityData(uid string, data *pb.DBCaravan) {
list := this.configure.GetAllCaravanCity() list := this.configure.GetAllCaravanCity()
data.City = make(map[int32]*pb.CityGoods, 0) data.City = make(map[int32]*pb.CityInfo, 0)
for _, v := range list { for _, v := range list {
city := &pb.CityGoods{ city := &pb.CityInfo{
Like: []int32{}, Like: []int32{},
Unlike: []int32{}, Unlike: []int32{},
Count: map[int32]int32{},
} }
if len(v.Special) > int(v.Citytypenum) { if len(v.Special) > int(v.Citytypenum) {
@ -84,7 +85,6 @@ func (this *Caravan) InitCaravanItemData(uid string, data *pb.DBCaravan) {
data.Goods = make(map[int32]*pb.Goods, 0) data.Goods = make(map[int32]*pb.Goods, 0)
for _, v := range items { for _, v := range items {
goods := &pb.Goods{ goods := &pb.Goods{
Count: 0, // 货物数量
Period: 0, // 变动周期 Period: 0, // 变动周期
CurPeriod: 1, // 当前变动周期 CurPeriod: 1, // 当前变动周期
Price: 0, // 当前价格 Price: 0, // 当前价格

View File

@ -25,11 +25,10 @@ type Goods struct {
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count"` // 货物数量 Period int32 `protobuf:"varint,1,opt,name=period,proto3" json:"period"` // 变动周期
Period int32 `protobuf:"varint,2,opt,name=period,proto3" json:"period"` // 变动周期 CurPeriod int32 `protobuf:"varint,2,opt,name=curPeriod,proto3" json:"curPeriod"` // 当前变动周期
CurPeriod int32 `protobuf:"varint,3,opt,name=curPeriod,proto3" json:"curPeriod"` // 当前变动周期 Price int32 `protobuf:"varint,3,opt,name=price,proto3" json:"price"` // 当前价格
Price int32 `protobuf:"varint,4,opt,name=price,proto3" json:"price"` // 当前价格 Time int64 `protobuf:"varint,4,opt,name=time,proto3" json:"time"` // 刷新时间
Time int64 `protobuf:"varint,5,opt,name=time,proto3" json:"time"` // 刷新时间
} }
func (x *Goods) Reset() { func (x *Goods) Reset() {
@ -64,13 +63,6 @@ func (*Goods) Descriptor() ([]byte, []int) {
return file_caravan_caravan_db_proto_rawDescGZIP(), []int{0} return file_caravan_caravan_db_proto_rawDescGZIP(), []int{0}
} }
func (x *Goods) GetCount() int32 {
if x != nil {
return x.Count
}
return 0
}
func (x *Goods) GetPeriod() int32 { func (x *Goods) GetPeriod() int32 {
if x != nil { if x != nil {
return x.Period return x.Period
@ -99,17 +91,18 @@ func (x *Goods) GetTime() int64 {
return 0 return 0
} }
type CityGoods struct { type CityInfo struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
Like []int32 `protobuf:"varint,1,rep,packed,name=like,proto3" json:"like"` // 喜欢的货物 Like []int32 `protobuf:"varint,1,rep,packed,name=like,proto3" json:"like"` // 喜欢的货物ID
Unlike []int32 `protobuf:"varint,2,rep,packed,name=unlike,proto3" json:"unlike"` // 不喜欢的货物 Unlike []int32 `protobuf:"varint,2,rep,packed,name=unlike,proto3" json:"unlike"` // 不喜欢的货物ID
Count map[int32]int32 `protobuf:"bytes,3,rep,name=count,proto3" json:"count" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 货物对应的数量
} }
func (x *CityGoods) Reset() { func (x *CityInfo) Reset() {
*x = CityGoods{} *x = CityInfo{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_caravan_caravan_db_proto_msgTypes[1] mi := &file_caravan_caravan_db_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -117,13 +110,13 @@ func (x *CityGoods) Reset() {
} }
} }
func (x *CityGoods) String() string { func (x *CityInfo) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
} }
func (*CityGoods) ProtoMessage() {} func (*CityInfo) ProtoMessage() {}
func (x *CityGoods) ProtoReflect() protoreflect.Message { func (x *CityInfo) ProtoReflect() protoreflect.Message {
mi := &file_caravan_caravan_db_proto_msgTypes[1] mi := &file_caravan_caravan_db_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -135,50 +128,112 @@ func (x *CityGoods) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x) return mi.MessageOf(x)
} }
// Deprecated: Use CityGoods.ProtoReflect.Descriptor instead. // Deprecated: Use CityInfo.ProtoReflect.Descriptor instead.
func (*CityGoods) Descriptor() ([]byte, []int) { func (*CityInfo) Descriptor() ([]byte, []int) {
return file_caravan_caravan_db_proto_rawDescGZIP(), []int{1} return file_caravan_caravan_db_proto_rawDescGZIP(), []int{1}
} }
func (x *CityGoods) GetLike() []int32 { func (x *CityInfo) GetLike() []int32 {
if x != nil { if x != nil {
return x.Like return x.Like
} }
return nil return nil
} }
func (x *CityGoods) GetUnlike() []int32 { func (x *CityInfo) GetUnlike() []int32 {
if x != nil { if x != nil {
return x.Unlike return x.Unlike
} }
return nil return nil
} }
func (x *CityInfo) GetCount() map[int32]int32 {
if x != nil {
return x.Count
}
return nil
}
type BagInfo struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count"` //数量
Price int32 `protobuf:"varint,2,opt,name=price,proto3" json:"price"` //单价
}
func (x *BagInfo) Reset() {
*x = BagInfo{}
if protoimpl.UnsafeEnabled {
mi := &file_caravan_caravan_db_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BagInfo) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BagInfo) ProtoMessage() {}
func (x *BagInfo) ProtoReflect() protoreflect.Message {
mi := &file_caravan_caravan_db_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use BagInfo.ProtoReflect.Descriptor instead.
func (*BagInfo) Descriptor() ([]byte, []int) {
return file_caravan_caravan_db_proto_rawDescGZIP(), []int{2}
}
func (x *BagInfo) GetCount() int32 {
if x != nil {
return x.Count
}
return 0
}
func (x *BagInfo) GetPrice() int32 {
if x != nil {
return x.Price
}
return 0
}
type DBCaravan struct { type DBCaravan struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //ID Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //ID
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid" bson:"uid"` //用户ID Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid" bson:"uid"` //用户ID
UseCount int32 `protobuf:"varint,3,opt,name=useCount,proto3" json:"useCount"` // 当前背包使用的数量 UseCount int32 `protobuf:"varint,3,opt,name=useCount,proto3" json:"useCount" bson:"usecount"` //当前背包使用的数量
//map<int32,int32> items = 4; // 背包数据 Items map[int32]*BagInfo `protobuf:"bytes,4,rep,name=items,proto3" json:"items" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // 背包数据
Goods map[int32]*Goods `protobuf:"bytes,5,rep,name=goods,proto3" json:"goods" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // key 货物ID Goods map[int32]*Goods `protobuf:"bytes,5,rep,name=goods,proto3" json:"goods" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // key 货物ID
City map[int32]*CityGoods `protobuf:"bytes,6,rep,name=city,proto3" json:"city" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // 城市信息 City map[int32]*CityInfo `protobuf:"bytes,6,rep,name=city,proto3" json:"city" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // 城市信息
Lv int32 `protobuf:"varint,7,opt,name=lv,proto3" json:"lv"` // 商队等级 Lv int32 `protobuf:"varint,7,opt,name=lv,proto3" json:"lv"` // 商队等级
Num int64 `protobuf:"varint,8,opt,name=num,proto3" json:"num"` // 虚拟货币数量 Num int64 `protobuf:"varint,8,opt,name=num,proto3" json:"num"` // 虚拟货币数量
Profit int64 `protobuf:"varint,9,opt,name=profit,proto3" json:"profit"` // 虚拟货利润 Profit int64 `protobuf:"varint,9,opt,name=profit,proto3" json:"profit"` // 虚拟货利润
Resettime int64 `protobuf:"varint,10,opt,name=resettime,proto3" json:"resettime"` // 最后一次重置时间 Resettime int64 `protobuf:"varint,10,opt,name=resettime,proto3" json:"resettime"` // 最后一次重置时间
Curcity int32 `protobuf:"varint,11,opt,name=curcity,proto3" json:"curcity"` // 当前城市 Curcity int32 `protobuf:"varint,11,opt,name=curcity,proto3" json:"curcity"` // 当前城市
Task int32 `protobuf:"varint,12,opt,name=task,proto3" json:"task"` Task int32 `protobuf:"varint,12,opt,name=task,proto3" json:"task"`
Eventid int32 `protobuf:"varint,13,opt,name=eventid,proto3" json:"eventid"` // 特殊事件ID Eventid int32 `protobuf:"varint,13,opt,name=eventid,proto3" json:"eventid"` // 特殊事件ID
Tasktime int32 `protobuf:"varint,14,opt,name=tasktime,proto3" json:"tasktime"` // 任务触发时间 Tasktime int32 `protobuf:"varint,14,opt,name=tasktime,proto3" json:"tasktime"` // 任务触发时间
} }
func (x *DBCaravan) Reset() { func (x *DBCaravan) Reset() {
*x = DBCaravan{} *x = DBCaravan{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_caravan_caravan_db_proto_msgTypes[2] mi := &file_caravan_caravan_db_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@ -191,7 +246,7 @@ func (x *DBCaravan) String() string {
func (*DBCaravan) ProtoMessage() {} func (*DBCaravan) ProtoMessage() {}
func (x *DBCaravan) ProtoReflect() protoreflect.Message { func (x *DBCaravan) ProtoReflect() protoreflect.Message {
mi := &file_caravan_caravan_db_proto_msgTypes[2] mi := &file_caravan_caravan_db_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@ -204,7 +259,7 @@ func (x *DBCaravan) ProtoReflect() protoreflect.Message {
// Deprecated: Use DBCaravan.ProtoReflect.Descriptor instead. // Deprecated: Use DBCaravan.ProtoReflect.Descriptor instead.
func (*DBCaravan) Descriptor() ([]byte, []int) { func (*DBCaravan) Descriptor() ([]byte, []int) {
return file_caravan_caravan_db_proto_rawDescGZIP(), []int{2} return file_caravan_caravan_db_proto_rawDescGZIP(), []int{3}
} }
func (x *DBCaravan) GetId() string { func (x *DBCaravan) GetId() string {
@ -228,6 +283,13 @@ func (x *DBCaravan) GetUseCount() int32 {
return 0 return 0
} }
func (x *DBCaravan) GetItems() map[int32]*BagInfo {
if x != nil {
return x.Items
}
return nil
}
func (x *DBCaravan) GetGoods() map[int32]*Goods { func (x *DBCaravan) GetGoods() map[int32]*Goods {
if x != nil { if x != nil {
return x.Goods return x.Goods
@ -235,7 +297,7 @@ func (x *DBCaravan) GetGoods() map[int32]*Goods {
return nil return nil
} }
func (x *DBCaravan) GetCity() map[int32]*CityGoods { func (x *DBCaravan) GetCity() map[int32]*CityInfo {
if x != nil { if x != nil {
return x.City return x.City
} }
@ -302,50 +364,65 @@ var File_caravan_caravan_db_proto protoreflect.FileDescriptor
var file_caravan_caravan_db_proto_rawDesc = []byte{ var file_caravan_caravan_db_proto_rawDesc = []byte{
0x0a, 0x18, 0x63, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x2f, 0x63, 0x61, 0x72, 0x61, 0x76, 0x61, 0x0a, 0x18, 0x63, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x2f, 0x63, 0x61, 0x72, 0x61, 0x76, 0x61,
0x6e, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7d, 0x0a, 0x05, 0x47, 0x6f, 0x6e, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x67, 0x0a, 0x05, 0x47, 0x6f,
0x6f, 0x64, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x6f, 0x64, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x01, 0x20,
0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x01, 0x28, 0x05, 0x52, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x63,
0x69, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x75, 0x72, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09,
0x64, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x75, 0x72, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x03, 0x63, 0x75, 0x72, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69,
0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, 0x75, 0x72, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12,
0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x12, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x74,
0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x69, 0x6d, 0x65, 0x22, 0x9c, 0x01, 0x0a, 0x08, 0x43, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x66, 0x6f,
0x01, 0x28, 0x03, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x37, 0x0a, 0x09, 0x43, 0x69, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6b, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52, 0x04,
0x79, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6b, 0x65, 0x18, 0x01, 0x6c, 0x69, 0x6b, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x6e, 0x6c, 0x69, 0x6b, 0x65, 0x18, 0x02,
0x20, 0x03, 0x28, 0x05, 0x52, 0x04, 0x6c, 0x69, 0x6b, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x6e, 0x20, 0x03, 0x28, 0x05, 0x52, 0x06, 0x75, 0x6e, 0x6c, 0x69, 0x6b, 0x65, 0x12, 0x2a, 0x0a, 0x05,
0x6c, 0x69, 0x6b, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x52, 0x06, 0x75, 0x6e, 0x6c, 0x69, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x43, 0x69,
0x6b, 0x65, 0x22, 0xe3, 0x03, 0x0a, 0x09, 0x44, 0x42, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x74, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72,
0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x79, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x1a, 0x38, 0x0a, 0x0a, 0x43, 0x6f, 0x75, 0x6e,
0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20,
0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75,
0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x75, 0x73, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2b, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02,
0x0a, 0x05, 0x67, 0x6f, 0x6f, 0x64, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x38, 0x01, 0x22, 0x35, 0x0a, 0x07, 0x42, 0x61, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x14, 0x0a,
0x44, 0x42, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x2e, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x45, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f,
0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x67, 0x6f, 0x6f, 0x64, 0x73, 0x12, 0x28, 0x0a, 0x04, 0x63, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01,
0x69, 0x74, 0x79, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x44, 0x42, 0x43, 0x61, 0x28, 0x05, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x22, 0xd3, 0x04, 0x0a, 0x09, 0x44, 0x42,
0x72, 0x61, 0x76, 0x61, 0x6e, 0x2e, 0x43, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
0x04, 0x63, 0x69, 0x74, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x07, 0x20, 0x01, 0x28, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02,
0x05, 0x52, 0x02, 0x6c, 0x76, 0x12, 0x10, 0x0a, 0x03, 0x6e, 0x75, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65,
0x28, 0x03, 0x52, 0x03, 0x6e, 0x75, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x75, 0x73, 0x65,
0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x12, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2b, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x04,
0x1c, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x44, 0x42, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e,
0x28, 0x03, 0x52, 0x09, 0x72, 0x65, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x69, 0x74, 0x65,
0x07, 0x63, 0x75, 0x72, 0x63, 0x69, 0x74, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6d, 0x73, 0x12, 0x2b, 0x0a, 0x05, 0x67, 0x6f, 0x6f, 0x64, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28,
0x63, 0x75, 0x72, 0x63, 0x69, 0x74, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x0b, 0x32, 0x15, 0x2e, 0x44, 0x42, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x2e, 0x47, 0x6f,
0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6f, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x67, 0x6f, 0x6f, 0x64, 0x73, 0x12,
0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x65, 0x76, 0x28, 0x0a, 0x04, 0x63, 0x69, 0x74, 0x79, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e,
0x65, 0x6e, 0x74, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x74, 0x69, 0x6d, 0x44, 0x42, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x2e, 0x43, 0x69, 0x74, 0x79, 0x45, 0x6e,
0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x74, 0x69, 0x6d, 0x74, 0x72, 0x79, 0x52, 0x04, 0x63, 0x69, 0x74, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18,
0x65, 0x1a, 0x40, 0x0a, 0x0a, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x12, 0x10, 0x0a, 0x03, 0x6e, 0x75, 0x6d,
0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6e, 0x75, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x70,
0x79, 0x12, 0x1c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x70, 0x72, 0x6f,
0x32, 0x06, 0x2e, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x66, 0x69, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6d, 0x65,
0x02, 0x38, 0x01, 0x1a, 0x43, 0x0a, 0x09, 0x43, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x72, 0x65, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6d,
0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x75, 0x72, 0x63, 0x69, 0x74, 0x79, 0x18, 0x0b, 0x20, 0x01,
0x65, 0x79, 0x12, 0x20, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x28, 0x05, 0x52, 0x07, 0x63, 0x75, 0x72, 0x63, 0x69, 0x74, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x74,
0x0b, 0x32, 0x0a, 0x2e, 0x43, 0x69, 0x74, 0x79, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x52, 0x05, 0x76, 0x61, 0x73, 0x6b, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x12,
0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x18, 0x0a, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x52, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x61, 0x73,
0x6b, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x74, 0x61, 0x73,
0x6b, 0x74, 0x69, 0x6d, 0x65, 0x1a, 0x42, 0x0a, 0x0a, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x45, 0x6e,
0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1e, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x42, 0x61, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05,
0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x40, 0x0a, 0x0a, 0x47, 0x6f, 0x6f,
0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01,
0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x05, 0x76, 0x61, 0x6c,
0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x47, 0x6f, 0x6f, 0x64, 0x73,
0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x42, 0x0a, 0x09, 0x43,
0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18,
0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1f, 0x0a, 0x05, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x43, 0x69, 0x74, 0x79,
0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42,
0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (
@ -360,24 +437,30 @@ func file_caravan_caravan_db_proto_rawDescGZIP() []byte {
return file_caravan_caravan_db_proto_rawDescData return file_caravan_caravan_db_proto_rawDescData
} }
var file_caravan_caravan_db_proto_msgTypes = make([]protoimpl.MessageInfo, 5) var file_caravan_caravan_db_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
var file_caravan_caravan_db_proto_goTypes = []interface{}{ var file_caravan_caravan_db_proto_goTypes = []interface{}{
(*Goods)(nil), // 0: Goods (*Goods)(nil), // 0: Goods
(*CityGoods)(nil), // 1: CityGoods (*CityInfo)(nil), // 1: CityInfo
(*DBCaravan)(nil), // 2: DBCaravan (*BagInfo)(nil), // 2: BagInfo
nil, // 3: DBCaravan.GoodsEntry (*DBCaravan)(nil), // 3: DBCaravan
nil, // 4: DBCaravan.CityEntry nil, // 4: CityInfo.CountEntry
nil, // 5: DBCaravan.ItemsEntry
nil, // 6: DBCaravan.GoodsEntry
nil, // 7: DBCaravan.CityEntry
} }
var file_caravan_caravan_db_proto_depIdxs = []int32{ var file_caravan_caravan_db_proto_depIdxs = []int32{
3, // 0: DBCaravan.goods:type_name -> DBCaravan.GoodsEntry 4, // 0: CityInfo.count:type_name -> CityInfo.CountEntry
4, // 1: DBCaravan.city:type_name -> DBCaravan.CityEntry 5, // 1: DBCaravan.items:type_name -> DBCaravan.ItemsEntry
0, // 2: DBCaravan.GoodsEntry.value:type_name -> Goods 6, // 2: DBCaravan.goods:type_name -> DBCaravan.GoodsEntry
1, // 3: DBCaravan.CityEntry.value:type_name -> CityGoods 7, // 3: DBCaravan.city:type_name -> DBCaravan.CityEntry
4, // [4:4] is the sub-list for method output_type 2, // 4: DBCaravan.ItemsEntry.value:type_name -> BagInfo
4, // [4:4] is the sub-list for method input_type 0, // 5: DBCaravan.GoodsEntry.value:type_name -> Goods
4, // [4:4] is the sub-list for extension type_name 1, // 6: DBCaravan.CityEntry.value:type_name -> CityInfo
4, // [4:4] is the sub-list for extension extendee 7, // [7:7] is the sub-list for method output_type
0, // [0:4] is the sub-list for field type_name 7, // [7:7] is the sub-list for method input_type
7, // [7:7] is the sub-list for extension type_name
7, // [7:7] is the sub-list for extension extendee
0, // [0:7] is the sub-list for field type_name
} }
func init() { file_caravan_caravan_db_proto_init() } func init() { file_caravan_caravan_db_proto_init() }
@ -399,7 +482,7 @@ func file_caravan_caravan_db_proto_init() {
} }
} }
file_caravan_caravan_db_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { file_caravan_caravan_db_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CityGoods); i { switch v := v.(*CityInfo); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
@ -411,6 +494,18 @@ func file_caravan_caravan_db_proto_init() {
} }
} }
file_caravan_caravan_db_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { file_caravan_caravan_db_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*BagInfo); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_caravan_caravan_db_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DBCaravan); i { switch v := v.(*DBCaravan); i {
case 0: case 0:
return &v.state return &v.state
@ -429,7 +524,7 @@ func file_caravan_caravan_db_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_caravan_caravan_db_proto_rawDesc, RawDescriptor: file_caravan_caravan_db_proto_rawDesc,
NumEnums: 0, NumEnums: 0,
NumMessages: 5, NumMessages: 8,
NumExtensions: 0, NumExtensions: 0,
NumServices: 0, NumServices: 0,
}, },