From 72fc0878326f35f1e352531d006130da689f6df4 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Wed, 22 Feb 2023 18:42:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E5=BF=83=E8=B7=B3=E6=BF=80?= =?UTF-8?q?=E6=B4=BB=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- comm/const.go | 3 + modules/gateway/agent.go | 2 +- modules/pandatakekan/modelPandata.go | 55 ++++ modules/pandatakekan/module.go | 2 - pb/pandatakekan_db.pb.go | 469 +++++++++++++++++++++++++++ pb/pandatakekan_msg.pb.go | 203 ++++++++++++ 6 files changed, 731 insertions(+), 3 deletions(-) create mode 100644 modules/pandatakekan/modelPandata.go create mode 100644 pb/pandatakekan_db.pb.go create mode 100644 pb/pandatakekan_msg.pb.go diff --git a/comm/const.go b/comm/const.go index c561e9c38..8418a001b 100644 --- a/comm/const.go +++ b/comm/const.go @@ -228,6 +228,9 @@ const ( TableStove = "stove" // 铁匠铺图鉴 TableAtlas = "atlas" + + ///熊猫物管部 + TablePandata = "pandata" ) // RPC服务接口定义处 diff --git a/modules/gateway/agent.go b/modules/gateway/agent.go index 4d24d4b0c..a191abdad 100644 --- a/modules/gateway/agent.go +++ b/modules/gateway/agent.go @@ -90,7 +90,7 @@ locp: SubType: "heartbeat", Data: data, }) - //this.wsConn.SetReadDeadline(time.Now().Add(time.Second * 30)) + this.wsConn.SetReadDeadline(time.Now().Add(time.Second * 30)) continue } // this.gateway.Debugf("----------2 agent:%s uId:%s MainType:%s SubType:%s ", this.sessionId, this.uId, msg.MainType, msg.SubType) diff --git a/modules/pandatakekan/modelPandata.go b/modules/pandatakekan/modelPandata.go new file mode 100644 index 000000000..3ce128baa --- /dev/null +++ b/modules/pandatakekan/modelPandata.go @@ -0,0 +1,55 @@ +package pandatakekan + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/lego/core" + "go_dreamfactory/lego/sys/mgo" + "go_dreamfactory/modules" + "go_dreamfactory/pb" + + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/x/bsonx" +) + +///熊猫武馆数据表 +type modelPandata struct { + modules.MCompModel + module *PandaTakekan +} + +func (this *modelPandata) Init(service core.IService, module core.IModule, comp core.IModuleComp, opt core.IModuleOptions) (err error) { + this.TableName = comm.TablePandata + this.MCompModel.Init(service, module, comp, opt) + this.module = module.(*PandaTakekan) + //创建uid索引 + this.DB.CreateIndex(core.SqlTable(this.TableName), mongo.IndexModel{ + Keys: bsonx.Doc{{Key: "uid", Value: bsonx.Int32(1)}}, + }) + return +} + +///询用户的练功房信息 +func (this *modelPandata) queryUserMartialhall(uid string) (result *pb.DBPandataKekan, err error) { + result = &pb.DBPandataKekan{} + if err = this.Get(uid, result); err != nil && err != mgo.MongodbNil { + this.module.Errorln(err) + } + if err == mgo.MongodbNil { + result = &pb.DBPandataKekan{ + Id: primitive.NewObjectID().Hex(), + Uid: uid, + + Pillar1: &pb.DBPandataPillar{Index: 1}, + Pillar2: &pb.DBPandataPillar{Index: 2}, + Pillar3: &pb.DBPandataPillar{Index: 3}, + Pillarf: &pb.DBPandataPillar{Index: 4}, + } + if err = this.Add(uid, result); err != nil { + this.module.Errorln(err) + return + } + } + err = nil + return +} diff --git a/modules/pandatakekan/module.go b/modules/pandatakekan/module.go index 62c3b1025..3945a328a 100644 --- a/modules/pandatakekan/module.go +++ b/modules/pandatakekan/module.go @@ -43,7 +43,5 @@ func (this *PandaTakekan) Start() (err error) { //装备组件 func (this *PandaTakekan) OnInstallComp() { this.ModuleBase.OnInstallComp() - this.api = this.RegisterComp(new(apiComp)).(*apiComp) - } diff --git a/pb/pandatakekan_db.pb.go b/pb/pandatakekan_db.pb.go new file mode 100644 index 000000000..deb23c689 --- /dev/null +++ b/pb/pandatakekan_db.pb.go @@ -0,0 +1,469 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.0 +// protoc v3.20.0 +// source: pandatakekan/pandatakekan_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 PandataPillarState int32 + +const ( + PandataPillarState_NoUse PandataPillarState = 0 //未使用 + PandataPillarState_Useing PandataPillarState = 1 //使用中 + PandataPillarState_Receive PandataPillarState = 2 //待领取 +) + +// Enum value maps for PandataPillarState. +var ( + PandataPillarState_name = map[int32]string{ + 0: "NoUse", + 1: "Useing", + 2: "Receive", + } + PandataPillarState_value = map[string]int32{ + "NoUse": 0, + "Useing": 1, + "Receive": 2, + } +) + +func (x PandataPillarState) Enum() *PandataPillarState { + p := new(PandataPillarState) + *p = x + return p +} + +func (x PandataPillarState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PandataPillarState) Descriptor() protoreflect.EnumDescriptor { + return file_pandatakekan_pandatakekan_db_proto_enumTypes[0].Descriptor() +} + +func (PandataPillarState) Type() protoreflect.EnumType { + return &file_pandatakekan_pandatakekan_db_proto_enumTypes[0] +} + +func (x PandataPillarState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PandataPillarState.Descriptor instead. +func (PandataPillarState) EnumDescriptor() ([]byte, []int) { + return file_pandatakekan_pandatakekan_db_proto_rawDescGZIP(), []int{0} +} + +///熊猫柱子 +type DBPandataPillar struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Index int32 `protobuf:"varint,1,opt,name=index,proto3" json:"index"` //柱子下标 + Isunlock bool `protobuf:"varint,2,opt,name=isunlock,proto3" json:"isunlock"` //是否解锁 + State PandataPillarState `protobuf:"varint,3,opt,name=state,proto3,enum=PandataPillarState" 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"` //奖励 +} + +func (x *DBPandataPillar) Reset() { + *x = DBPandataPillar{} + if protoimpl.UnsafeEnabled { + mi := &file_pandatakekan_pandatakekan_db_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DBPandataPillar) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DBPandataPillar) ProtoMessage() {} + +func (x *DBPandataPillar) ProtoReflect() protoreflect.Message { + mi := &file_pandatakekan_pandatakekan_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 DBPandataPillar.ProtoReflect.Descriptor instead. +func (*DBPandataPillar) Descriptor() ([]byte, []int) { + return file_pandatakekan_pandatakekan_db_proto_rawDescGZIP(), []int{0} +} + +func (x *DBPandataPillar) GetIndex() int32 { + if x != nil { + return x.Index + } + return 0 +} + +func (x *DBPandataPillar) GetIsunlock() bool { + if x != nil { + return x.Isunlock + } + return false +} + +func (x *DBPandataPillar) GetState() PandataPillarState { + if x != nil { + return x.State + } + return PandataPillarState_NoUse +} + +func (x *DBPandataPillar) GetHero() string { + if x != nil { + return x.Hero + } + return "" +} + +func (x *DBPandataPillar) GetStart() int64 { + if x != nil { + return x.Start + } + return 0 +} + +func (x *DBPandataPillar) GetEnd() int64 { + if x != nil { + return x.End + } + return 0 +} + +func (x *DBPandataPillar) GetLastbill() int64 { + if x != nil { + return x.Lastbill + } + return 0 +} + +func (x *DBPandataPillar) GetReward() int32 { + if x != nil { + return x.Reward + } + return 0 +} + +//熊猫武馆教习 +type DBPandataTeacher struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id"` //id + Cid string `protobuf:"bytes,2,opt,name=cid,proto3" json:"cid"` //配置id + Student string `protobuf:"bytes,3,opt,name=student,proto3" json:"student"` //学员id 有表示正在教学,没有表示没有教学 +} + +func (x *DBPandataTeacher) Reset() { + *x = DBPandataTeacher{} + if protoimpl.UnsafeEnabled { + mi := &file_pandatakekan_pandatakekan_db_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DBPandataTeacher) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DBPandataTeacher) ProtoMessage() {} + +func (x *DBPandataTeacher) ProtoReflect() protoreflect.Message { + mi := &file_pandatakekan_pandatakekan_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 DBPandataTeacher.ProtoReflect.Descriptor instead. +func (*DBPandataTeacher) Descriptor() ([]byte, []int) { + return file_pandatakekan_pandatakekan_db_proto_rawDescGZIP(), []int{1} +} + +func (x *DBPandataTeacher) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *DBPandataTeacher) GetCid() string { + if x != nil { + return x.Cid + } + return "" +} + +func (x *DBPandataTeacher) GetStudent() string { + if x != nil { + return x.Student + } + return "" +} + +//练功房 +type DBPandataKekan struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id"` //id + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid"` //用户id + Pillar1 *DBPandataPillar `protobuf:"bytes,4,opt,name=pillar1,proto3" json:"pillar1"` //柱子1 + Pillar2 *DBPandataPillar `protobuf:"bytes,5,opt,name=pillar2,proto3" json:"pillar2"` //柱子2 + Pillar3 *DBPandataPillar `protobuf:"bytes,6,opt,name=pillar3,proto3" json:"pillar3"` //柱子3 + Pillarf *DBPandataPillar `protobuf:"bytes,7,opt,name=pillarf,proto3" json:"pillarf"` //好友柱子 +} + +func (x *DBPandataKekan) Reset() { + *x = DBPandataKekan{} + if protoimpl.UnsafeEnabled { + mi := &file_pandatakekan_pandatakekan_db_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DBPandataKekan) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DBPandataKekan) ProtoMessage() {} + +func (x *DBPandataKekan) ProtoReflect() protoreflect.Message { + mi := &file_pandatakekan_pandatakekan_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 DBPandataKekan.ProtoReflect.Descriptor instead. +func (*DBPandataKekan) Descriptor() ([]byte, []int) { + return file_pandatakekan_pandatakekan_db_proto_rawDescGZIP(), []int{2} +} + +func (x *DBPandataKekan) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *DBPandataKekan) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +func (x *DBPandataKekan) GetPillar1() *DBPandataPillar { + if x != nil { + return x.Pillar1 + } + return nil +} + +func (x *DBPandataKekan) GetPillar2() *DBPandataPillar { + if x != nil { + return x.Pillar2 + } + return nil +} + +func (x *DBPandataKekan) GetPillar3() *DBPandataPillar { + if x != nil { + return x.Pillar3 + } + return nil +} + +func (x *DBPandataKekan) GetPillarf() *DBPandataPillar { + if x != nil { + return x.Pillarf + } + return nil +} + +var File_pandatakekan_pandatakekan_db_proto protoreflect.FileDescriptor + +var file_pandatakekan_pandatakekan_db_proto_rawDesc = []byte{ + 0x0a, 0x22, 0x70, 0x61, 0x6e, 0x64, 0x61, 0x74, 0x61, 0x6b, 0x65, 0x6b, 0x61, 0x6e, 0x2f, 0x70, + 0x61, 0x6e, 0x64, 0x61, 0x74, 0x61, 0x6b, 0x65, 0x6b, 0x61, 0x6e, 0x5f, 0x64, 0x62, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xde, 0x01, 0x0a, 0x0f, 0x44, 0x42, 0x50, 0x61, 0x6e, 0x64, 0x61, + 0x74, 0x61, 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, 0x29, 0x0a, 0x05, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x50, 0x61, 0x6e, 0x64, + 0x61, 0x74, 0x61, 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, 0x4e, 0x0a, 0x10, 0x44, 0x42, 0x50, 0x61, 0x6e, 0x64, 0x61, + 0x74, 0x61, 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, 0xe2, 0x01, 0x0a, 0x0e, 0x44, 0x42, 0x50, 0x61, 0x6e, 0x64, + 0x61, 0x74, 0x61, 0x4b, 0x65, 0x6b, 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, 0x2a, 0x0a, 0x07, 0x70, 0x69, + 0x6c, 0x6c, 0x61, 0x72, 0x31, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x44, 0x42, + 0x50, 0x61, 0x6e, 0x64, 0x61, 0x74, 0x61, 0x50, 0x69, 0x6c, 0x6c, 0x61, 0x72, 0x52, 0x07, 0x70, + 0x69, 0x6c, 0x6c, 0x61, 0x72, 0x31, 0x12, 0x2a, 0x0a, 0x07, 0x70, 0x69, 0x6c, 0x6c, 0x61, 0x72, + 0x32, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x44, 0x42, 0x50, 0x61, 0x6e, 0x64, + 0x61, 0x74, 0x61, 0x50, 0x69, 0x6c, 0x6c, 0x61, 0x72, 0x52, 0x07, 0x70, 0x69, 0x6c, 0x6c, 0x61, + 0x72, 0x32, 0x12, 0x2a, 0x0a, 0x07, 0x70, 0x69, 0x6c, 0x6c, 0x61, 0x72, 0x33, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x44, 0x42, 0x50, 0x61, 0x6e, 0x64, 0x61, 0x74, 0x61, 0x50, + 0x69, 0x6c, 0x6c, 0x61, 0x72, 0x52, 0x07, 0x70, 0x69, 0x6c, 0x6c, 0x61, 0x72, 0x33, 0x12, 0x2a, + 0x0a, 0x07, 0x70, 0x69, 0x6c, 0x6c, 0x61, 0x72, 0x66, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x10, 0x2e, 0x44, 0x42, 0x50, 0x61, 0x6e, 0x64, 0x61, 0x74, 0x61, 0x50, 0x69, 0x6c, 0x6c, 0x61, + 0x72, 0x52, 0x07, 0x70, 0x69, 0x6c, 0x6c, 0x61, 0x72, 0x66, 0x2a, 0x38, 0x0a, 0x12, 0x50, 0x61, + 0x6e, 0x64, 0x61, 0x74, 0x61, 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, +} + +var ( + file_pandatakekan_pandatakekan_db_proto_rawDescOnce sync.Once + file_pandatakekan_pandatakekan_db_proto_rawDescData = file_pandatakekan_pandatakekan_db_proto_rawDesc +) + +func file_pandatakekan_pandatakekan_db_proto_rawDescGZIP() []byte { + file_pandatakekan_pandatakekan_db_proto_rawDescOnce.Do(func() { + file_pandatakekan_pandatakekan_db_proto_rawDescData = protoimpl.X.CompressGZIP(file_pandatakekan_pandatakekan_db_proto_rawDescData) + }) + return file_pandatakekan_pandatakekan_db_proto_rawDescData +} + +var file_pandatakekan_pandatakekan_db_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_pandatakekan_pandatakekan_db_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_pandatakekan_pandatakekan_db_proto_goTypes = []interface{}{ + (PandataPillarState)(0), // 0: PandataPillarState + (*DBPandataPillar)(nil), // 1: DBPandataPillar + (*DBPandataTeacher)(nil), // 2: DBPandataTeacher + (*DBPandataKekan)(nil), // 3: DBPandataKekan +} +var file_pandatakekan_pandatakekan_db_proto_depIdxs = []int32{ + 0, // 0: DBPandataPillar.state:type_name -> PandataPillarState + 1, // 1: DBPandataKekan.pillar1:type_name -> DBPandataPillar + 1, // 2: DBPandataKekan.pillar2:type_name -> DBPandataPillar + 1, // 3: DBPandataKekan.pillar3:type_name -> DBPandataPillar + 1, // 4: DBPandataKekan.pillarf:type_name -> DBPandataPillar + 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 + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_pandatakekan_pandatakekan_db_proto_init() } +func file_pandatakekan_pandatakekan_db_proto_init() { + if File_pandatakekan_pandatakekan_db_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_pandatakekan_pandatakekan_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DBPandataPillar); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pandatakekan_pandatakekan_db_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DBPandataTeacher); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pandatakekan_pandatakekan_db_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DBPandataKekan); 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_pandatakekan_pandatakekan_db_proto_rawDesc, + NumEnums: 1, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_pandatakekan_pandatakekan_db_proto_goTypes, + DependencyIndexes: file_pandatakekan_pandatakekan_db_proto_depIdxs, + EnumInfos: file_pandatakekan_pandatakekan_db_proto_enumTypes, + MessageInfos: file_pandatakekan_pandatakekan_db_proto_msgTypes, + }.Build() + File_pandatakekan_pandatakekan_db_proto = out.File + file_pandatakekan_pandatakekan_db_proto_rawDesc = nil + file_pandatakekan_pandatakekan_db_proto_goTypes = nil + file_pandatakekan_pandatakekan_db_proto_depIdxs = nil +} diff --git a/pb/pandatakekan_msg.pb.go b/pb/pandatakekan_msg.pb.go new file mode 100644 index 000000000..cc16e3201 --- /dev/null +++ b/pb/pandatakekan_msg.pb.go @@ -0,0 +1,203 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.0 +// protoc v3.20.0 +// source: pandatakekan/pandatakekan_msg.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 PandataKekanInfoReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PandataKekanInfoReq) Reset() { + *x = PandataKekanInfoReq{} + if protoimpl.UnsafeEnabled { + mi := &file_pandatakekan_pandatakekan_msg_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PandataKekanInfoReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PandataKekanInfoReq) ProtoMessage() {} + +func (x *PandataKekanInfoReq) ProtoReflect() protoreflect.Message { + mi := &file_pandatakekan_pandatakekan_msg_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 PandataKekanInfoReq.ProtoReflect.Descriptor instead. +func (*PandataKekanInfoReq) Descriptor() ([]byte, []int) { + return file_pandatakekan_pandatakekan_msg_proto_rawDescGZIP(), []int{0} +} + +///信息请求 回应 +type PandataKekanInfoResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Info *DBPandataKekan `protobuf:"bytes,1,opt,name=info,proto3" json:"info"` +} + +func (x *PandataKekanInfoResp) Reset() { + *x = PandataKekanInfoResp{} + if protoimpl.UnsafeEnabled { + mi := &file_pandatakekan_pandatakekan_msg_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PandataKekanInfoResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PandataKekanInfoResp) ProtoMessage() {} + +func (x *PandataKekanInfoResp) ProtoReflect() protoreflect.Message { + mi := &file_pandatakekan_pandatakekan_msg_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 PandataKekanInfoResp.ProtoReflect.Descriptor instead. +func (*PandataKekanInfoResp) Descriptor() ([]byte, []int) { + return file_pandatakekan_pandatakekan_msg_proto_rawDescGZIP(), []int{1} +} + +func (x *PandataKekanInfoResp) GetInfo() *DBPandataKekan { + if x != nil { + return x.Info + } + return nil +} + +var File_pandatakekan_pandatakekan_msg_proto protoreflect.FileDescriptor + +var file_pandatakekan_pandatakekan_msg_proto_rawDesc = []byte{ + 0x0a, 0x23, 0x70, 0x61, 0x6e, 0x64, 0x61, 0x74, 0x61, 0x6b, 0x65, 0x6b, 0x61, 0x6e, 0x2f, 0x70, + 0x61, 0x6e, 0x64, 0x61, 0x74, 0x61, 0x6b, 0x65, 0x6b, 0x61, 0x6e, 0x5f, 0x6d, 0x73, 0x67, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x70, 0x61, 0x6e, 0x64, 0x61, 0x74, 0x61, 0x6b, 0x65, + 0x6b, 0x61, 0x6e, 0x2f, 0x70, 0x61, 0x6e, 0x64, 0x61, 0x74, 0x61, 0x6b, 0x65, 0x6b, 0x61, 0x6e, + 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x15, 0x0a, 0x13, 0x50, 0x61, 0x6e, + 0x64, 0x61, 0x74, 0x61, 0x4b, 0x65, 0x6b, 0x61, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, + 0x22, 0x3b, 0x0a, 0x14, 0x50, 0x61, 0x6e, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x65, 0x6b, 0x61, 0x6e, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x23, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x44, 0x42, 0x50, 0x61, 0x6e, 0x64, 0x61, + 0x74, 0x61, 0x4b, 0x65, 0x6b, 0x61, 0x6e, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x42, 0x06, 0x5a, + 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_pandatakekan_pandatakekan_msg_proto_rawDescOnce sync.Once + file_pandatakekan_pandatakekan_msg_proto_rawDescData = file_pandatakekan_pandatakekan_msg_proto_rawDesc +) + +func file_pandatakekan_pandatakekan_msg_proto_rawDescGZIP() []byte { + file_pandatakekan_pandatakekan_msg_proto_rawDescOnce.Do(func() { + file_pandatakekan_pandatakekan_msg_proto_rawDescData = protoimpl.X.CompressGZIP(file_pandatakekan_pandatakekan_msg_proto_rawDescData) + }) + return file_pandatakekan_pandatakekan_msg_proto_rawDescData +} + +var file_pandatakekan_pandatakekan_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_pandatakekan_pandatakekan_msg_proto_goTypes = []interface{}{ + (*PandataKekanInfoReq)(nil), // 0: PandataKekanInfoReq + (*PandataKekanInfoResp)(nil), // 1: PandataKekanInfoResp + (*DBPandataKekan)(nil), // 2: DBPandataKekan +} +var file_pandatakekan_pandatakekan_msg_proto_depIdxs = []int32{ + 2, // 0: PandataKekanInfoResp.info:type_name -> DBPandataKekan + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_pandatakekan_pandatakekan_msg_proto_init() } +func file_pandatakekan_pandatakekan_msg_proto_init() { + if File_pandatakekan_pandatakekan_msg_proto != nil { + return + } + file_pandatakekan_pandatakekan_db_proto_init() + if !protoimpl.UnsafeEnabled { + file_pandatakekan_pandatakekan_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PandataKekanInfoReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pandatakekan_pandatakekan_msg_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PandataKekanInfoResp); 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_pandatakekan_pandatakekan_msg_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_pandatakekan_pandatakekan_msg_proto_goTypes, + DependencyIndexes: file_pandatakekan_pandatakekan_msg_proto_depIdxs, + MessageInfos: file_pandatakekan_pandatakekan_msg_proto_msgTypes, + }.Build() + File_pandatakekan_pandatakekan_msg_proto = out.File + file_pandatakekan_pandatakekan_msg_proto_rawDesc = nil + file_pandatakekan_pandatakekan_msg_proto_goTypes = nil + file_pandatakekan_pandatakekan_msg_proto_depIdxs = nil +}