移除pb重复枚举问题

This commit is contained in:
liwei1dao 2023-02-23 14:52:28 +08:00
parent 645a4158ee
commit 11c88c0e31
2 changed files with 71 additions and 121 deletions

View File

@ -31,7 +31,7 @@ const (
HeroType = "hero" //卡片资源 例如英雄卡,检验卡
EquipmentType = "equi" //武器资源
VipType = "vip" //vip
AtlasType = "atlas" //
AtlasType = "atlas" //铁匠铺资源
)
type Autogenerated struct {

View File

@ -20,55 +20,6 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type PracticePillarState int32
const (
PracticePillarState_NoUse PracticePillarState = 0 //未使用
PracticePillarState_Useing PracticePillarState = 1 //使用中
PracticePillarState_Receive PracticePillarState = 2 //待领取
)
// Enum value maps for PracticePillarState.
var (
PracticePillarState_name = map[int32]string{
0: "NoUse",
1: "Useing",
2: "Receive",
}
PracticePillarState_value = map[string]int32{
"NoUse": 0,
"Useing": 1,
"Receive": 2,
}
)
func (x PracticePillarState) Enum() *PracticePillarState {
p := new(PracticePillarState)
*p = x
return p
}
func (x PracticePillarState) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (PracticePillarState) Descriptor() protoreflect.EnumDescriptor {
return file_practice_practice_db_proto_enumTypes[0].Descriptor()
}
func (PracticePillarState) Type() protoreflect.EnumType {
return &file_practice_practice_db_proto_enumTypes[0]
}
func (x PracticePillarState) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use PracticePillarState.Descriptor instead.
func (PracticePillarState) EnumDescriptor() ([]byte, []int) {
return file_practice_practice_db_proto_rawDescGZIP(), []int{0}
}
///熊猫柱子
type DBPracticePillar struct {
state protoimpl.MessageState
@ -77,12 +28,11 @@ type DBPracticePillar struct {
Index int32 `protobuf:"varint,1,opt,name=index,proto3" json:"index"` //柱子下标
Isunlock bool `protobuf:"varint,2,opt,name=isunlock,proto3" json:"isunlock"` //是否解锁
State PracticePillarState `protobuf:"varint,3,opt,name=state,proto3,enum=PracticePillarState" json:"state"` //状态
Hero string `protobuf:"bytes,4,opt,name=hero,proto3" json:"hero"` //当前练功英雄
Start int64 `protobuf:"varint,5,opt,name=start,proto3" json:"start"` //开始时间
End int64 `protobuf:"varint,6,opt,name=end,proto3" json:"end"` //结束时间
Lastbill int64 `protobuf:"varint,7,opt,name=lastbill,proto3" json:"lastbill"` //上次结账时间
Reward int32 `protobuf:"varint,8,opt,name=reward,proto3" json:"reward"` //奖励
Hero string `protobuf:"bytes,3,opt,name=hero,proto3" json:"hero"` //当前练功英雄
Start int64 `protobuf:"varint,4,opt,name=start,proto3" json:"start"` //开始时间
End int64 `protobuf:"varint,5,opt,name=end,proto3" json:"end"` //结束时间
Lastbill int64 `protobuf:"varint,6,opt,name=lastbill,proto3" json:"lastbill"` //上次结账时间
Reward int32 `protobuf:"varint,7,opt,name=reward,proto3" json:"reward"` //奖励
}
func (x *DBPracticePillar) Reset() {
@ -131,13 +81,6 @@ func (x *DBPracticePillar) GetIsunlock() bool {
return false
}
func (x *DBPracticePillar) GetState() PracticePillarState {
if x != nil {
return x.State
}
return PracticePillarState_NoUse
}
func (x *DBPracticePillar) GetHero() string {
if x != nil {
return x.Hero
@ -245,6 +188,7 @@ type DBPracticeRoom struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id"` //id
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid"` //用户id
Knapsack map[string]int32 `protobuf:"bytes,3,rep,name=knapsack,proto3" json:"knapsack" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //资源
Pillar1 *DBPracticePillar `protobuf:"bytes,4,opt,name=pillar1,proto3" json:"pillar1"` //柱子1
Pillar2 *DBPracticePillar `protobuf:"bytes,5,opt,name=pillar2,proto3" json:"pillar2"` //柱子2
Pillar3 *DBPracticePillar `protobuf:"bytes,6,opt,name=pillar3,proto3" json:"pillar3"` //柱子3
@ -297,6 +241,13 @@ func (x *DBPracticeRoom) GetUid() string {
return ""
}
func (x *DBPracticeRoom) GetKnapsack() map[string]int32 {
if x != nil {
return x.Knapsack
}
return nil
}
func (x *DBPracticeRoom) GetPillar1() *DBPracticePillar {
if x != nil {
return x.Pillar1
@ -329,46 +280,47 @@ var File_practice_practice_db_proto protoreflect.FileDescriptor
var file_practice_practice_db_proto_rawDesc = []byte{
0x0a, 0x1a, 0x70, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x2f, 0x70, 0x72, 0x61, 0x63, 0x74,
0x69, 0x63, 0x65, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe0, 0x01, 0x0a,
0x69, 0x63, 0x65, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb4, 0x01, 0x0a,
0x10, 0x44, 0x42, 0x50, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x50, 0x69, 0x6c, 0x6c, 0x61,
0x72, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x75, 0x6e, 0x6c,
0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x75, 0x6e, 0x6c,
0x6f, 0x63, 0x6b, 0x12, 0x2a, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01,
0x28, 0x0e, 0x32, 0x14, 0x2e, 0x50, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x50, 0x69, 0x6c,
0x6c, 0x61, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12,
0x12, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68,
0x65, 0x72, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x05, 0x20, 0x01,
0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64,
0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c,
0x61, 0x73, 0x74, 0x62, 0x69, 0x6c, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6c,
0x61, 0x73, 0x74, 0x62, 0x69, 0x6c, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72,
0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x22,
0x4f, 0x0a, 0x11, 0x44, 0x42, 0x50, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x54, 0x65, 0x61,
0x63, 0x68, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x03, 0x63, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x75, 0x64, 0x65, 0x6e,
0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x74, 0x75, 0x64, 0x65, 0x6e, 0x74,
0x22, 0xe6, 0x01, 0x0a, 0x0e, 0x44, 0x42, 0x50, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x52,
0x6f, 0x6f, 0x6d, 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, 0x2b, 0x0a, 0x07, 0x70, 0x69, 0x6c, 0x6c, 0x61, 0x72, 0x31,
0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x44, 0x42, 0x50, 0x72, 0x61, 0x63, 0x74,
0x69, 0x63, 0x65, 0x50, 0x69, 0x6c, 0x6c, 0x61, 0x72, 0x52, 0x07, 0x70, 0x69, 0x6c, 0x6c, 0x61,
0x72, 0x31, 0x12, 0x2b, 0x0a, 0x07, 0x70, 0x69, 0x6c, 0x6c, 0x61, 0x72, 0x32, 0x18, 0x05, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x44, 0x42, 0x50, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x65,
0x50, 0x69, 0x6c, 0x6c, 0x61, 0x72, 0x52, 0x07, 0x70, 0x69, 0x6c, 0x6c, 0x61, 0x72, 0x32, 0x12,
0x2b, 0x0a, 0x07, 0x70, 0x69, 0x6c, 0x6c, 0x61, 0x72, 0x33, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x11, 0x2e, 0x44, 0x42, 0x50, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x50, 0x69, 0x6c,
0x6c, 0x61, 0x72, 0x52, 0x07, 0x70, 0x69, 0x6c, 0x6c, 0x61, 0x72, 0x33, 0x12, 0x2b, 0x0a, 0x07,
0x70, 0x69, 0x6c, 0x6c, 0x61, 0x72, 0x66, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e,
0x44, 0x42, 0x50, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x50, 0x69, 0x6c, 0x6c, 0x61, 0x72,
0x52, 0x07, 0x70, 0x69, 0x6c, 0x6c, 0x61, 0x72, 0x66, 0x2a, 0x39, 0x0a, 0x13, 0x50, 0x72, 0x61,
0x63, 0x74, 0x69, 0x63, 0x65, 0x50, 0x69, 0x6c, 0x6c, 0x61, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65,
0x12, 0x09, 0x0a, 0x05, 0x4e, 0x6f, 0x55, 0x73, 0x65, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x55,
0x73, 0x65, 0x69, 0x6e, 0x67, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x65, 0x63, 0x65, 0x69,
0x76, 0x65, 0x10, 0x02, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
0x6f, 0x63, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28,
0x09, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74,
0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a,
0x03, 0x65, 0x6e, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12,
0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x62, 0x69, 0x6c, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28,
0x03, 0x52, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x62, 0x69, 0x6c, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x72,
0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x72, 0x65, 0x77,
0x61, 0x72, 0x64, 0x22, 0x4f, 0x0a, 0x11, 0x44, 0x42, 0x50, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63,
0x65, 0x54, 0x65, 0x61, 0x63, 0x68, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74,
0x75, 0x64, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x74, 0x75,
0x64, 0x65, 0x6e, 0x74, 0x22, 0xde, 0x02, 0x0a, 0x0e, 0x44, 0x42, 0x50, 0x72, 0x61, 0x63, 0x74,
0x69, 0x63, 0x65, 0x52, 0x6f, 0x6f, 0x6d, 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, 0x39, 0x0a, 0x08, 0x6b, 0x6e, 0x61,
0x70, 0x73, 0x61, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x44, 0x42,
0x50, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x52, 0x6f, 0x6f, 0x6d, 0x2e, 0x4b, 0x6e, 0x61,
0x70, 0x73, 0x61, 0x63, 0x6b, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6b, 0x6e, 0x61, 0x70,
0x73, 0x61, 0x63, 0x6b, 0x12, 0x2b, 0x0a, 0x07, 0x70, 0x69, 0x6c, 0x6c, 0x61, 0x72, 0x31, 0x18,
0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x44, 0x42, 0x50, 0x72, 0x61, 0x63, 0x74, 0x69,
0x63, 0x65, 0x50, 0x69, 0x6c, 0x6c, 0x61, 0x72, 0x52, 0x07, 0x70, 0x69, 0x6c, 0x6c, 0x61, 0x72,
0x31, 0x12, 0x2b, 0x0a, 0x07, 0x70, 0x69, 0x6c, 0x6c, 0x61, 0x72, 0x32, 0x18, 0x05, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x11, 0x2e, 0x44, 0x42, 0x50, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x50,
0x69, 0x6c, 0x6c, 0x61, 0x72, 0x52, 0x07, 0x70, 0x69, 0x6c, 0x6c, 0x61, 0x72, 0x32, 0x12, 0x2b,
0x0a, 0x07, 0x70, 0x69, 0x6c, 0x6c, 0x61, 0x72, 0x33, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x11, 0x2e, 0x44, 0x42, 0x50, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x50, 0x69, 0x6c, 0x6c,
0x61, 0x72, 0x52, 0x07, 0x70, 0x69, 0x6c, 0x6c, 0x61, 0x72, 0x33, 0x12, 0x2b, 0x0a, 0x07, 0x70,
0x69, 0x6c, 0x6c, 0x61, 0x72, 0x66, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x44,
0x42, 0x50, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x50, 0x69, 0x6c, 0x6c, 0x61, 0x72, 0x52,
0x07, 0x70, 0x69, 0x6c, 0x6c, 0x61, 0x72, 0x66, 0x1a, 0x3b, 0x0a, 0x0d, 0x4b, 0x6e, 0x61, 0x70,
0x73, 0x61, 0x63, 0x6b, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 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 (
@ -383,20 +335,19 @@ func file_practice_practice_db_proto_rawDescGZIP() []byte {
return file_practice_practice_db_proto_rawDescData
}
var file_practice_practice_db_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_practice_practice_db_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_practice_practice_db_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_practice_practice_db_proto_goTypes = []interface{}{
(PracticePillarState)(0), // 0: PracticePillarState
(*DBPracticePillar)(nil), // 1: DBPracticePillar
(*DBPracticeTeacher)(nil), // 2: DBPracticeTeacher
(*DBPracticeRoom)(nil), // 3: DBPracticeRoom
(*DBPracticePillar)(nil), // 0: DBPracticePillar
(*DBPracticeTeacher)(nil), // 1: DBPracticeTeacher
(*DBPracticeRoom)(nil), // 2: DBPracticeRoom
nil, // 3: DBPracticeRoom.KnapsackEntry
}
var file_practice_practice_db_proto_depIdxs = []int32{
0, // 0: DBPracticePillar.state:type_name -> PracticePillarState
1, // 1: DBPracticeRoom.pillar1:type_name -> DBPracticePillar
1, // 2: DBPracticeRoom.pillar2:type_name -> DBPracticePillar
1, // 3: DBPracticeRoom.pillar3:type_name -> DBPracticePillar
1, // 4: DBPracticeRoom.pillarf:type_name -> DBPracticePillar
3, // 0: DBPracticeRoom.knapsack:type_name -> DBPracticeRoom.KnapsackEntry
0, // 1: DBPracticeRoom.pillar1:type_name -> DBPracticePillar
0, // 2: DBPracticeRoom.pillar2:type_name -> DBPracticePillar
0, // 3: DBPracticeRoom.pillar3:type_name -> DBPracticePillar
0, // 4: DBPracticeRoom.pillarf:type_name -> DBPracticePillar
5, // [5:5] is the sub-list for method output_type
5, // [5:5] is the sub-list for method input_type
5, // [5:5] is the sub-list for extension type_name
@ -452,14 +403,13 @@ func file_practice_practice_db_proto_init() {
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_practice_practice_db_proto_rawDesc,
NumEnums: 1,
NumMessages: 3,
NumEnums: 0,
NumMessages: 4,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_practice_practice_db_proto_goTypes,
DependencyIndexes: file_practice_practice_db_proto_depIdxs,
EnumInfos: file_practice_practice_db_proto_enumTypes,
MessageInfos: file_practice_practice_db_proto_msgTypes,
}.Build()
File_practice_practice_db_proto = out.File