407 lines
14 KiB
Go
407 lines
14 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.28.0
|
|
// protoc v3.20.0
|
|
// source: caravan/caravan_db.proto
|
|
|
|
package pb
|
|
|
|
import (
|
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
reflect "reflect"
|
|
sync "sync"
|
|
)
|
|
|
|
const (
|
|
// Verify that this generated code is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
|
)
|
|
|
|
type Goods struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count"` // 货物数量
|
|
Period int32 `protobuf:"varint,2,opt,name=period,proto3" json:"period"` // 变动周期
|
|
CurPeriod int32 `protobuf:"varint,3,opt,name=curPeriod,proto3" json:"curPeriod"` // 当前变动周期
|
|
Price int32 `protobuf:"varint,4,opt,name=price,proto3" json:"price"` // 当前价格
|
|
Time int64 `protobuf:"varint,5,opt,name=time,proto3" json:"time"` // 刷新时间
|
|
}
|
|
|
|
func (x *Goods) Reset() {
|
|
*x = Goods{}
|
|
if protoimpl.UnsafeEnabled {
|
|
mi := &file_caravan_caravan_db_proto_msgTypes[0]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
|
|
func (x *Goods) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*Goods) ProtoMessage() {}
|
|
|
|
func (x *Goods) ProtoReflect() protoreflect.Message {
|
|
mi := &file_caravan_caravan_db_proto_msgTypes[0]
|
|
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 Goods.ProtoReflect.Descriptor instead.
|
|
func (*Goods) Descriptor() ([]byte, []int) {
|
|
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 {
|
|
if x != nil {
|
|
return x.Period
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *Goods) GetCurPeriod() int32 {
|
|
if x != nil {
|
|
return x.CurPeriod
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *Goods) GetPrice() int32 {
|
|
if x != nil {
|
|
return x.Price
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *Goods) GetTime() int64 {
|
|
if x != nil {
|
|
return x.Time
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type CityGoods struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
Like []int32 `protobuf:"varint,1,rep,packed,name=like,proto3" json:"like"` // 习惯的货物
|
|
Unlike []int32 `protobuf:"varint,2,rep,packed,name=unlike,proto3" json:"unlike"` // 不喜欢的货物
|
|
}
|
|
|
|
func (x *CityGoods) Reset() {
|
|
*x = CityGoods{}
|
|
if protoimpl.UnsafeEnabled {
|
|
mi := &file_caravan_caravan_db_proto_msgTypes[1]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
|
|
func (x *CityGoods) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*CityGoods) ProtoMessage() {}
|
|
|
|
func (x *CityGoods) ProtoReflect() protoreflect.Message {
|
|
mi := &file_caravan_caravan_db_proto_msgTypes[1]
|
|
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 CityGoods.ProtoReflect.Descriptor instead.
|
|
func (*CityGoods) Descriptor() ([]byte, []int) {
|
|
return file_caravan_caravan_db_proto_rawDescGZIP(), []int{1}
|
|
}
|
|
|
|
func (x *CityGoods) GetLike() []int32 {
|
|
if x != nil {
|
|
return x.Like
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *CityGoods) GetUnlike() []int32 {
|
|
if x != nil {
|
|
return x.Unlike
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type DBCaravan struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
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
|
|
UseCount int32 `protobuf:"varint,3,opt,name=useCount,proto3" json:"useCount"` // 当前背包使用的数量
|
|
//map<int32,int32> items = 4; // 背包数据
|
|
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"` // 城市信息
|
|
Lv int32 `protobuf:"varint,7,opt,name=lv,proto3" json:"lv"` // 商队等级
|
|
Num int64 `protobuf:"varint,8,opt,name=num,proto3" json:"num"` // 虚拟货币数量
|
|
Profit int64 `protobuf:"varint,9,opt,name=profit,proto3" json:"profit"` // 虚拟货利润
|
|
Resettime int64 `protobuf:"varint,10,opt,name=resettime,proto3" json:"resettime"` // 最后一次重置时间
|
|
}
|
|
|
|
func (x *DBCaravan) Reset() {
|
|
*x = DBCaravan{}
|
|
if protoimpl.UnsafeEnabled {
|
|
mi := &file_caravan_caravan_db_proto_msgTypes[2]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
|
|
func (x *DBCaravan) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*DBCaravan) ProtoMessage() {}
|
|
|
|
func (x *DBCaravan) 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 DBCaravan.ProtoReflect.Descriptor instead.
|
|
func (*DBCaravan) Descriptor() ([]byte, []int) {
|
|
return file_caravan_caravan_db_proto_rawDescGZIP(), []int{2}
|
|
}
|
|
|
|
func (x *DBCaravan) GetId() string {
|
|
if x != nil {
|
|
return x.Id
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *DBCaravan) GetUid() string {
|
|
if x != nil {
|
|
return x.Uid
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *DBCaravan) GetUseCount() int32 {
|
|
if x != nil {
|
|
return x.UseCount
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *DBCaravan) GetGoods() map[int32]*Goods {
|
|
if x != nil {
|
|
return x.Goods
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *DBCaravan) GetCity() map[int32]*CityGoods {
|
|
if x != nil {
|
|
return x.City
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *DBCaravan) GetLv() int32 {
|
|
if x != nil {
|
|
return x.Lv
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *DBCaravan) GetNum() int64 {
|
|
if x != nil {
|
|
return x.Num
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *DBCaravan) GetProfit() int64 {
|
|
if x != nil {
|
|
return x.Profit
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *DBCaravan) GetResettime() int64 {
|
|
if x != nil {
|
|
return x.Resettime
|
|
}
|
|
return 0
|
|
}
|
|
|
|
var File_caravan_caravan_db_proto protoreflect.FileDescriptor
|
|
|
|
var file_caravan_caravan_db_proto_rawDesc = []byte{
|
|
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,
|
|
0x6f, 0x64, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01,
|
|
0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x65, 0x72,
|
|
0x69, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f,
|
|
0x64, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x75, 0x72, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x03,
|
|
0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, 0x75, 0x72, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12,
|
|
0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05,
|
|
0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20,
|
|
0x01, 0x28, 0x03, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x37, 0x0a, 0x09, 0x43, 0x69, 0x74,
|
|
0x79, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6b, 0x65, 0x18, 0x01,
|
|
0x20, 0x03, 0x28, 0x05, 0x52, 0x04, 0x6c, 0x69, 0x6b, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x6e,
|
|
0x6c, 0x69, 0x6b, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x52, 0x06, 0x75, 0x6e, 0x6c, 0x69,
|
|
0x6b, 0x65, 0x22, 0xff, 0x02, 0x0a, 0x09, 0x44, 0x42, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e,
|
|
0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64,
|
|
0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75,
|
|
0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03,
|
|
0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x75, 0x73, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2b,
|
|
0x0a, 0x05, 0x67, 0x6f, 0x6f, 0x64, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e,
|
|
0x44, 0x42, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x2e, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x45,
|
|
0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x67, 0x6f, 0x6f, 0x64, 0x73, 0x12, 0x28, 0x0a, 0x04, 0x63,
|
|
0x69, 0x74, 0x79, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x44, 0x42, 0x43, 0x61,
|
|
0x72, 0x61, 0x76, 0x61, 0x6e, 0x2e, 0x43, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52,
|
|
0x04, 0x63, 0x69, 0x74, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x07, 0x20, 0x01, 0x28,
|
|
0x05, 0x52, 0x02, 0x6c, 0x76, 0x12, 0x10, 0x0a, 0x03, 0x6e, 0x75, 0x6d, 0x18, 0x08, 0x20, 0x01,
|
|
0x28, 0x03, 0x52, 0x03, 0x6e, 0x75, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, 0x6f, 0x66, 0x69,
|
|
0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x12,
|
|
0x1c, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01,
|
|
0x28, 0x03, 0x52, 0x09, 0x72, 0x65, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6d, 0x65, 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,
|
|
0x43, 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, 0x20,
|
|
0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e,
|
|
0x43, 0x69, 0x74, 0x79, 0x47, 0x6f, 0x6f, 0x64, 0x73, 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 (
|
|
file_caravan_caravan_db_proto_rawDescOnce sync.Once
|
|
file_caravan_caravan_db_proto_rawDescData = file_caravan_caravan_db_proto_rawDesc
|
|
)
|
|
|
|
func file_caravan_caravan_db_proto_rawDescGZIP() []byte {
|
|
file_caravan_caravan_db_proto_rawDescOnce.Do(func() {
|
|
file_caravan_caravan_db_proto_rawDescData = protoimpl.X.CompressGZIP(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_goTypes = []interface{}{
|
|
(*Goods)(nil), // 0: Goods
|
|
(*CityGoods)(nil), // 1: CityGoods
|
|
(*DBCaravan)(nil), // 2: DBCaravan
|
|
nil, // 3: DBCaravan.GoodsEntry
|
|
nil, // 4: DBCaravan.CityEntry
|
|
}
|
|
var file_caravan_caravan_db_proto_depIdxs = []int32{
|
|
3, // 0: DBCaravan.goods:type_name -> DBCaravan.GoodsEntry
|
|
4, // 1: DBCaravan.city:type_name -> DBCaravan.CityEntry
|
|
0, // 2: DBCaravan.GoodsEntry.value:type_name -> Goods
|
|
1, // 3: DBCaravan.CityEntry.value:type_name -> CityGoods
|
|
4, // [4:4] is the sub-list for method output_type
|
|
4, // [4:4] is the sub-list for method input_type
|
|
4, // [4:4] is the sub-list for extension type_name
|
|
4, // [4:4] is the sub-list for extension extendee
|
|
0, // [0:4] is the sub-list for field type_name
|
|
}
|
|
|
|
func init() { file_caravan_caravan_db_proto_init() }
|
|
func file_caravan_caravan_db_proto_init() {
|
|
if File_caravan_caravan_db_proto != nil {
|
|
return
|
|
}
|
|
if !protoimpl.UnsafeEnabled {
|
|
file_caravan_caravan_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
|
switch v := v.(*Goods); 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[1].Exporter = func(v interface{}, i int) interface{} {
|
|
switch v := v.(*CityGoods); 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[2].Exporter = func(v interface{}, i int) interface{} {
|
|
switch v := v.(*DBCaravan); i {
|
|
case 0:
|
|
return &v.state
|
|
case 1:
|
|
return &v.sizeCache
|
|
case 2:
|
|
return &v.unknownFields
|
|
default:
|
|
return nil
|
|
}
|
|
}
|
|
}
|
|
type x struct{}
|
|
out := protoimpl.TypeBuilder{
|
|
File: protoimpl.DescBuilder{
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
RawDescriptor: file_caravan_caravan_db_proto_rawDesc,
|
|
NumEnums: 0,
|
|
NumMessages: 5,
|
|
NumExtensions: 0,
|
|
NumServices: 0,
|
|
},
|
|
GoTypes: file_caravan_caravan_db_proto_goTypes,
|
|
DependencyIndexes: file_caravan_caravan_db_proto_depIdxs,
|
|
MessageInfos: file_caravan_caravan_db_proto_msgTypes,
|
|
}.Build()
|
|
File_caravan_caravan_db_proto = out.File
|
|
file_caravan_caravan_db_proto_rawDesc = nil
|
|
file_caravan_caravan_db_proto_goTypes = nil
|
|
file_caravan_caravan_db_proto_depIdxs = nil
|
|
}
|