上传雕像维护

This commit is contained in:
liwei1dao 2023-03-02 17:06:16 +08:00
parent 3573a05da9
commit cc5a5929f0
7 changed files with 286 additions and 96 deletions

View File

@ -12,7 +12,7 @@ type (
}
//任务完成
ITaskComplete interface {
TaskComplete(session IUserSession,taskid int32)
TaskComplete(session IUserSession, taskid int32)
}
)
@ -415,7 +415,7 @@ type (
//推送战斗输出指令
PvpOutCmdPush(out *pb.PvpOutCmdPush)
//推送战斗结束
PvpFinishPush(battleId string)
PvpFinishPush(out *pb.BattleFinishPush)
}
ISmithy interface {
@ -428,6 +428,9 @@ type (
//练功房
IPractice interface {
ITaskComplete
//添加武馆资源
AddItems(session IUserSession, items map[string]int32, bPush bool) (code pb.ErrorCode)
//pvp切磋结果通知
ChallengeResults(red, bule string, winSide int32)
}
)

View File

@ -58,7 +58,7 @@ func (this *battleClientMgrComp) BattleOutCmd(out *pb.BattleOutCmdPush) {
//Pvp 战斗指令输出
func (this *battleClientMgrComp) BattleFinish(out *pb.BattleFinishPush) {
this.module.pvp.PvpFinishPush(out.Battleid)
this.module.pvp.PvpFinishPush(out)
}
//校验战斗结果

View File

@ -37,14 +37,17 @@ func (this *modelPandata) queryUserMartialhall(uid string) (result *pb.DBPractic
}
if err == mgo.MongodbNil {
result = &pb.DBPracticeRoom{
Id: primitive.NewObjectID().Hex(),
Uid: uid,
Full: make(map[int32]int32),
Knapsack: make(map[string]int32),
Pillar1: &pb.DBPracticePillar{Index: 1, Isunlock: true, Lv: 1},
Pillar2: &pb.DBPracticePillar{Index: 2, Lv: 1},
Pillar3: &pb.DBPracticePillar{Index: 3, Lv: 1},
Pillarf: &pb.DBPracticePillar{Index: 4, Lv: 1},
Id: primitive.NewObjectID().Hex(),
Uid: uid,
Full: make(map[int32]int32),
Knapsack: make(map[string]int32),
Gymaction: 0,
Gymrefresh: 0,
Pillar1: &pb.DBPracticePillar{Index: 1, Isunlock: true, Lv: 1},
Pillar2: &pb.DBPracticePillar{Index: 2, Lv: 1},
Pillar3: &pb.DBPracticePillar{Index: 3, Lv: 1},
Pillarf: &pb.DBPracticePillar{Index: 4, Lv: 1},
Statuers: make([]*pb.DBPracticeStatuer, 0),
}
if err = this.Add(uid, result); err != nil {
this.module.Errorln(err)

View File

@ -6,6 +6,7 @@ import (
"go_dreamfactory/lego/core"
"go_dreamfactory/modules"
"go_dreamfactory/pb"
"go_dreamfactory/sys/configure"
cfg "go_dreamfactory/sys/configure/structs"
)
@ -134,3 +135,80 @@ func (this *Practice) TaskComplete(session comm.IUserSession, taskid int32) {
}
}
}
func (this *Practice) ChallengeResults(red, bule string, winSide int32) {
if winSide == 0 {
return
}
var (
redroom *pb.DBPracticeRoom
reduser *pb.DBUser
buleroom *pb.DBPracticeRoom
buleuser *pb.DBUser
keep bool
err error
)
reduser = this.ModuleUser.GetUser(red)
buleuser = this.ModuleUser.GetUser(bule)
if redroom, err = this.modelPandata.queryUserMartialhall(red); err != nil {
this.Errorln(err)
return
}
if buleroom, err = this.modelPandata.queryUserMartialhall(bule); err != nil {
this.Errorln(err)
return
}
if winSide == 1 { //红方胜利
keep = false
for _, v := range buleroom.Statuers {
if v.Uid == red {
v.Create = configure.Now().Unix()
keep = true
break
}
}
if !keep {
buleroom.Statuers = append(buleroom.Statuers, &pb.DBPracticeStatuer{
Uid: red,
Figure: reduser.Figure,
Create: configure.Now().Unix(),
})
}
for i, v := range redroom.Statuers {
if v.Uid == bule { //移除雕像
redroom.Statuers = append(redroom.Statuers[0:i], redroom.Statuers[i+1:]...)
break
}
}
} else {
keep = false
for _, v := range redroom.Statuers {
if v.Uid == bule {
v.Create = configure.Now().Unix()
keep = true
break
}
}
if !keep {
redroom.Statuers = append(redroom.Statuers, &pb.DBPracticeStatuer{
Uid: bule,
Figure: buleuser.Figure,
Create: configure.Now().Unix(),
})
}
for i, v := range buleroom.Statuers {
if v.Uid == red { //移除雕像
buleroom.Statuers = append(buleroom.Statuers[0:i], buleroom.Statuers[i+1:]...)
break
}
}
}
this.modelPandata.Change(red, map[string]interface{}{
"statuers": redroom.Statuers,
})
this.modelPandata.Change(bule, map[string]interface{}{
"statuers": buleroom.Statuers,
})
}

View File

@ -32,6 +32,7 @@ type Pvp struct {
service base.IRPCXService
battle comm.IBattle
friend comm.IFriend
practice comm.IPractice
apicomp *apiComp
modelPvpComp *modelPvpComp
lock sync.RWMutex
@ -182,24 +183,25 @@ func (this *Pvp) PvpOutCmdPush(out *pb.PvpOutCmdPush) {
}
//推送战斗结束
func (this *Pvp) PvpFinishPush(battleId string) {
func (this *Pvp) PvpFinishPush(out *pb.BattleFinishPush) {
var (
battle *BattleItem
ok bool
)
this.lock.RLock()
battle, ok = this.battles[battleId]
battle, ok = this.battles[out.Battleid]
this.lock.RUnlock()
if ok {
this.lock.RLock()
delete(this.battles, battleId)
delete(this.battles, out.Battleid)
this.lock.RUnlock()
switch battle.Ptype {
case pb.PvpType_friends:
go this.friend.QiecuoFinishNotify(battle.Red.Uid, battleId)
go this.friend.QiecuoFinishNotify(battle.Red.Uid, out.Battleid)
go this.practice.ChallengeResults(battle.Red.Uid, battle.Blue.Uid, out.WinSide)
break
}
this.modelPvpComp.delpvp(battleId)
this.modelPvpComp.delpvp(out.Battleid)
}
}

View File

@ -1410,6 +1410,7 @@ type BattleFinishPush struct {
unknownFields protoimpl.UnknownFields
Battleid string `protobuf:"bytes,1,opt,name=battleid,proto3" json:"battleid"`
WinSide int32 `protobuf:"varint,2,opt,name=winSide,proto3" json:"winSide"`
}
func (x *BattleFinishPush) Reset() {
@ -1451,6 +1452,13 @@ func (x *BattleFinishPush) GetBattleid() string {
return ""
}
func (x *BattleFinishPush) GetWinSide() int32 {
if x != nil {
return x.WinSide
}
return 0
}
//战斗认输 请求
type BattleConcedeReq struct {
state protoimpl.MessageState
@ -1786,26 +1794,28 @@ var file_battle_battle_msg_proto_rawDesc = []byte{
0x65, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c,
0x65, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x03, 0x63, 0x6d, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x0a, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6d, 0x64, 0x52, 0x03, 0x63, 0x6d,
0x64, 0x22, 0x2e, 0x0a, 0x10, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73,
0x64, 0x22, 0x48, 0x0a, 0x10, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73,
0x68, 0x50, 0x75, 0x73, 0x68, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69,
0x64, 0x22, 0x42, 0x0a, 0x10, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x63, 0x65,
0x64, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69,
0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
0x04, 0x73, 0x69, 0x64, 0x65, 0x22, 0x2b, 0x0a, 0x11, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43,
0x6f, 0x6e, 0x63, 0x65, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73,
0x73, 0x75, 0x63, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75,
0x63, 0x63, 0x22, 0x82, 0x01, 0x0a, 0x0f, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61,
0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x66,
0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x24, 0x0a, 0x07, 0x6f, 0x75, 0x74, 0x43, 0x6d,
0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c,
0x65, 0x43, 0x6d, 0x64, 0x52, 0x07, 0x6f, 0x75, 0x74, 0x43, 0x6d, 0x64, 0x73, 0x12, 0x28, 0x0a,
0x09, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x43, 0x6d, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x0a, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6d, 0x64, 0x52, 0x09, 0x69, 0x6e,
0x70, 0x75, 0x74, 0x43, 0x6d, 0x64, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x64, 0x12, 0x18, 0x0a, 0x07, 0x77, 0x69, 0x6e, 0x53, 0x69, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x05, 0x52, 0x07, 0x77, 0x69, 0x6e, 0x53, 0x69, 0x64, 0x65, 0x22, 0x42, 0x0a, 0x10, 0x42,
0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x63, 0x65, 0x64, 0x65, 0x52, 0x65, 0x71, 0x12,
0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73,
0x69, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, 0x69, 0x64, 0x65, 0x22,
0x2b, 0x0a, 0x11, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x63, 0x65, 0x64, 0x65,
0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, 0x18, 0x01,
0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, 0x22, 0x82, 0x01, 0x0a,
0x0f, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f,
0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b,
0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66,
0x6f, 0x12, 0x24, 0x0a, 0x07, 0x6f, 0x75, 0x74, 0x43, 0x6d, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6d, 0x64, 0x52, 0x07,
0x6f, 0x75, 0x74, 0x43, 0x6d, 0x64, 0x73, 0x12, 0x28, 0x0a, 0x09, 0x69, 0x6e, 0x70, 0x75, 0x74,
0x43, 0x6d, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x42, 0x61, 0x74,
0x74, 0x6c, 0x65, 0x43, 0x6d, 0x64, 0x52, 0x09, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x43, 0x6d, 0x64,
0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
}
var (

View File

@ -204,29 +204,94 @@ func (x *DBPracticeTeacher) GetStudent() string {
return ""
}
//雕像
type DBPracticeStatuer struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"`
Figure int32 `protobuf:"varint,2,opt,name=figure,proto3" json:"figure"`
Create int64 `protobuf:"varint,3,opt,name=create,proto3" json:"create"`
}
func (x *DBPracticeStatuer) Reset() {
*x = DBPracticeStatuer{}
if protoimpl.UnsafeEnabled {
mi := &file_practice_practice_db_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DBPracticeStatuer) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DBPracticeStatuer) ProtoMessage() {}
func (x *DBPracticeStatuer) ProtoReflect() protoreflect.Message {
mi := &file_practice_practice_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 DBPracticeStatuer.ProtoReflect.Descriptor instead.
func (*DBPracticeStatuer) Descriptor() ([]byte, []int) {
return file_practice_practice_db_proto_rawDescGZIP(), []int{2}
}
func (x *DBPracticeStatuer) GetUid() string {
if x != nil {
return x.Uid
}
return ""
}
func (x *DBPracticeStatuer) GetFigure() int32 {
if x != nil {
return x.Figure
}
return 0
}
func (x *DBPracticeStatuer) GetCreate() int64 {
if x != nil {
return x.Create
}
return 0
}
//练功房
type DBPracticeRoom 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
Gymaction int32 `protobuf:"varint,3,opt,name=gymaction,proto3" json:"gymaction"` //健身房动作
Gymrefresh int32 `protobuf:"varint,4,opt,name=gymrefresh,proto3" json:"gymrefresh"` //健身房刷新次数
Lastrefresh int64 `protobuf:"varint,5,opt,name=lastrefresh,proto3" json:"lastrefresh"` //最后刷新时间
Full map[int32]int32 `protobuf:"bytes,6,rep,name=full,proto3" json:"full" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //满级登记
Knapsack map[string]int32 `protobuf:"bytes,7,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,8,opt,name=pillar1,proto3" json:"pillar1"` //柱子1
Pillar2 *DBPracticePillar `protobuf:"bytes,9,opt,name=pillar2,proto3" json:"pillar2"` //柱子2
Pillar3 *DBPracticePillar `protobuf:"bytes,10,opt,name=pillar3,proto3" json:"pillar3"` //柱子3
Pillarf *DBPracticePillar `protobuf:"bytes,11,opt,name=pillarf,proto3" json:"pillarf"` //好友柱子
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id"` //id
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid"` //用户id
Gymaction int32 `protobuf:"varint,3,opt,name=gymaction,proto3" json:"gymaction"` //健身房动作
Gymrefresh int32 `protobuf:"varint,4,opt,name=gymrefresh,proto3" json:"gymrefresh"` //健身房刷新次数
Lastrefresh int64 `protobuf:"varint,5,opt,name=lastrefresh,proto3" json:"lastrefresh"` //最后刷新时间
Full map[int32]int32 `protobuf:"bytes,6,rep,name=full,proto3" json:"full" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //满级登记
Knapsack map[string]int32 `protobuf:"bytes,7,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,8,opt,name=pillar1,proto3" json:"pillar1"` //柱子1
Pillar2 *DBPracticePillar `protobuf:"bytes,9,opt,name=pillar2,proto3" json:"pillar2"` //柱子2
Pillar3 *DBPracticePillar `protobuf:"bytes,10,opt,name=pillar3,proto3" json:"pillar3"` //柱子3
Pillarf *DBPracticePillar `protobuf:"bytes,11,opt,name=pillarf,proto3" json:"pillarf"` //好友柱子
Statuers []*DBPracticeStatuer `protobuf:"bytes,12,rep,name=statuers,proto3" json:"statuers"` //武馆雕像
}
func (x *DBPracticeRoom) Reset() {
*x = DBPracticeRoom{}
if protoimpl.UnsafeEnabled {
mi := &file_practice_practice_db_proto_msgTypes[2]
mi := &file_practice_practice_db_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -239,7 +304,7 @@ func (x *DBPracticeRoom) String() string {
func (*DBPracticeRoom) ProtoMessage() {}
func (x *DBPracticeRoom) ProtoReflect() protoreflect.Message {
mi := &file_practice_practice_db_proto_msgTypes[2]
mi := &file_practice_practice_db_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -252,7 +317,7 @@ func (x *DBPracticeRoom) ProtoReflect() protoreflect.Message {
// Deprecated: Use DBPracticeRoom.ProtoReflect.Descriptor instead.
func (*DBPracticeRoom) Descriptor() ([]byte, []int) {
return file_practice_practice_db_proto_rawDescGZIP(), []int{2}
return file_practice_practice_db_proto_rawDescGZIP(), []int{3}
}
func (x *DBPracticeRoom) GetId() string {
@ -332,6 +397,13 @@ func (x *DBPracticeRoom) GetPillarf() *DBPracticePillar {
return nil
}
func (x *DBPracticeRoom) GetStatuers() []*DBPracticeStatuer {
if x != nil {
return x.Statuers
}
return nil
}
var File_practice_practice_db_proto protoreflect.FileDescriptor
var file_practice_practice_db_proto_rawDesc = []byte{
@ -356,43 +428,51 @@ var file_practice_practice_db_proto_rawDesc = []byte{
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, 0xa6, 0x04, 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, 0x1c, 0x0a,
0x09, 0x67, 0x79, 0x6d, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05,
0x52, 0x09, 0x67, 0x79, 0x6d, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x67,
0x79, 0x6d, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52,
0x0a, 0x67, 0x79, 0x6d, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x12, 0x20, 0x0a, 0x0b, 0x6c,
0x61, 0x73, 0x74, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03,
0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x12, 0x2d, 0x0a,
0x04, 0x66, 0x75, 0x6c, 0x6c, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x44, 0x42,
0x50, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x52, 0x6f, 0x6f, 0x6d, 0x2e, 0x46, 0x75, 0x6c,
0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x66, 0x75, 0x6c, 0x6c, 0x12, 0x39, 0x0a, 0x08,
0x6b, 0x6e, 0x61, 0x70, 0x73, 0x61, 0x63, 0x6b, 0x18, 0x07, 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, 0x08, 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,
0x09, 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, 0x0a, 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, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x07, 0x73, 0x74, 0x75, 0x64, 0x65, 0x6e, 0x74, 0x22, 0x55, 0x0a, 0x11, 0x44, 0x42, 0x50, 0x72,
0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x65, 0x72, 0x12, 0x10, 0x0a,
0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12,
0x16, 0x0a, 0x06, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
0x06, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x72, 0x65, 0x61, 0x74,
0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x22,
0xd6, 0x04, 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, 0x1c, 0x0a, 0x09, 0x67, 0x79, 0x6d, 0x61, 0x63, 0x74, 0x69, 0x6f,
0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x67, 0x79, 0x6d, 0x61, 0x63, 0x74, 0x69,
0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x67, 0x79, 0x6d, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68,
0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x67, 0x79, 0x6d, 0x72, 0x65, 0x66, 0x72, 0x65,
0x73, 0x68, 0x12, 0x20, 0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73,
0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x72, 0x65, 0x66,
0x72, 0x65, 0x73, 0x68, 0x12, 0x2d, 0x0a, 0x04, 0x66, 0x75, 0x6c, 0x6c, 0x18, 0x06, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x19, 0x2e, 0x44, 0x42, 0x50, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x52,
0x6f, 0x6f, 0x6d, 0x2e, 0x46, 0x75, 0x6c, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x66,
0x75, 0x6c, 0x6c, 0x12, 0x39, 0x0a, 0x08, 0x6b, 0x6e, 0x61, 0x70, 0x73, 0x61, 0x63, 0x6b, 0x18,
0x07, 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, 0x08, 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, 0x37, 0x0a, 0x09, 0x46,
0x75, 0x6c, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18,
0x01, 0x20, 0x01, 0x28, 0x05, 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, 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,
0x61, 0x72, 0x52, 0x07, 0x70, 0x69, 0x6c, 0x6c, 0x61, 0x72, 0x31, 0x12, 0x2b, 0x0a, 0x07, 0x70,
0x69, 0x6c, 0x6c, 0x61, 0x72, 0x32, 0x18, 0x09, 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, 0x0a, 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, 0x0b, 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, 0x12, 0x2e, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x74, 0x75, 0x65, 0x72, 0x73, 0x18, 0x0c,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x44, 0x42, 0x50, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63,
0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x65, 0x72, 0x52, 0x08, 0x73, 0x74, 0x61, 0x74, 0x75, 0x65,
0x72, 0x73, 0x1a, 0x37, 0x0a, 0x09, 0x46, 0x75, 0x6c, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12,
0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 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, 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 (
@ -407,26 +487,28 @@ func file_practice_practice_db_proto_rawDescGZIP() []byte {
return file_practice_practice_db_proto_rawDescData
}
var file_practice_practice_db_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_practice_practice_db_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_practice_practice_db_proto_goTypes = []interface{}{
(*DBPracticePillar)(nil), // 0: DBPracticePillar
(*DBPracticeTeacher)(nil), // 1: DBPracticeTeacher
(*DBPracticeRoom)(nil), // 2: DBPracticeRoom
nil, // 3: DBPracticeRoom.FullEntry
nil, // 4: DBPracticeRoom.KnapsackEntry
(*DBPracticeStatuer)(nil), // 2: DBPracticeStatuer
(*DBPracticeRoom)(nil), // 3: DBPracticeRoom
nil, // 4: DBPracticeRoom.FullEntry
nil, // 5: DBPracticeRoom.KnapsackEntry
}
var file_practice_practice_db_proto_depIdxs = []int32{
3, // 0: DBPracticeRoom.full:type_name -> DBPracticeRoom.FullEntry
4, // 1: DBPracticeRoom.knapsack:type_name -> DBPracticeRoom.KnapsackEntry
4, // 0: DBPracticeRoom.full:type_name -> DBPracticeRoom.FullEntry
5, // 1: DBPracticeRoom.knapsack:type_name -> DBPracticeRoom.KnapsackEntry
0, // 2: DBPracticeRoom.pillar1:type_name -> DBPracticePillar
0, // 3: DBPracticeRoom.pillar2:type_name -> DBPracticePillar
0, // 4: DBPracticeRoom.pillar3:type_name -> DBPracticePillar
0, // 5: DBPracticeRoom.pillarf:type_name -> DBPracticePillar
6, // [6:6] is the sub-list for method output_type
6, // [6:6] is the sub-list for method input_type
6, // [6:6] is the sub-list for extension type_name
6, // [6:6] is the sub-list for extension extendee
0, // [0:6] is the sub-list for field type_name
2, // 6: DBPracticeRoom.statuers:type_name -> DBPracticeStatuer
7, // [7:7] is the sub-list for method output_type
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_practice_practice_db_proto_init() }
@ -460,6 +542,18 @@ func file_practice_practice_db_proto_init() {
}
}
file_practice_practice_db_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DBPracticeStatuer); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_practice_practice_db_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DBPracticeRoom); i {
case 0:
return &v.state
@ -478,7 +572,7 @@ func file_practice_practice_db_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_practice_practice_db_proto_rawDesc,
NumEnums: 0,
NumMessages: 5,
NumMessages: 6,
NumExtensions: 0,
NumServices: 0,
},