fix: some api bug
This commit is contained in:
@@ -888,7 +888,7 @@ type Players struct {
|
||||
Games []int64 `protobuf:"varint,9,rep,packed,name=games,proto3" json:"games,omitempty"` //games
|
||||
CreatedAt int64 `protobuf:"varint,10,opt,name=createdAt,proto3" json:"createdAt,omitempty"` //createdAt
|
||||
UpdatedAt int64 `protobuf:"varint,11,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"` //updatedAt
|
||||
Gender int64 `protobuf:"varint,12,opt,name=gender,proto3" json:"gender,omitempty"` //gender
|
||||
Gender bool `protobuf:"varint,12,opt,name=gender,proto3" json:"gender,omitempty"` //gender
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
@@ -1000,11 +1000,11 @@ func (x *Players) GetUpdatedAt() int64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Players) GetGender() int64 {
|
||||
func (x *Players) GetGender() bool {
|
||||
if x != nil {
|
||||
return x.Gender
|
||||
}
|
||||
return 0
|
||||
return false
|
||||
}
|
||||
|
||||
type AddPlayersReq struct {
|
||||
@@ -1505,20 +1505,20 @@ func (x *GetPlayersByIdResp) GetPlayers() *Players {
|
||||
|
||||
type SearchPlayersReq struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Page int64 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` //page
|
||||
Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` //limit
|
||||
Id int64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty"` //id
|
||||
UserId int64 `protobuf:"varint,4,opt,name=userId,proto3" json:"userId,omitempty"` //userId
|
||||
Status string `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"` //status
|
||||
Rating float64 `protobuf:"fixed64,6,opt,name=rating,proto3" json:"rating,omitempty"` //rating
|
||||
TotalOrders int64 `protobuf:"varint,7,opt,name=totalOrders,proto3" json:"totalOrders,omitempty"` //totalOrders
|
||||
CompletedOrders int64 `protobuf:"varint,8,opt,name=completedOrders,proto3" json:"completedOrders,omitempty"` //completedOrders
|
||||
ShopId int64 `protobuf:"varint,9,opt,name=shopId,proto3" json:"shopId,omitempty"` //shopId
|
||||
Tags []string `protobuf:"bytes,10,rep,name=tags,proto3" json:"tags,omitempty"` //tags
|
||||
Games []int64 `protobuf:"varint,11,rep,packed,name=games,proto3" json:"games,omitempty"` //games
|
||||
CreatedAt int64 `protobuf:"varint,12,opt,name=createdAt,proto3" json:"createdAt,omitempty"` //createdAt
|
||||
UpdatedAt int64 `protobuf:"varint,13,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"` //updatedAt
|
||||
Gender int64 `protobuf:"varint,14,opt,name=gender,proto3" json:"gender,omitempty"` //gender
|
||||
Page *int64 `protobuf:"varint,1,opt,name=page,proto3,oneof" json:"page,omitempty"` //page
|
||||
Limit *int64 `protobuf:"varint,2,opt,name=limit,proto3,oneof" json:"limit,omitempty"` //limit
|
||||
Id *int64 `protobuf:"varint,3,opt,name=id,proto3,oneof" json:"id,omitempty"` //id
|
||||
UserId *int64 `protobuf:"varint,4,opt,name=userId,proto3,oneof" json:"userId,omitempty"` //userId
|
||||
Status *string `protobuf:"bytes,5,opt,name=status,proto3,oneof" json:"status,omitempty"` //status
|
||||
Rating *float64 `protobuf:"fixed64,6,opt,name=rating,proto3,oneof" json:"rating,omitempty"` //rating
|
||||
TotalOrders *int64 `protobuf:"varint,7,opt,name=totalOrders,proto3,oneof" json:"totalOrders,omitempty"` //totalOrders
|
||||
CompletedOrders *int64 `protobuf:"varint,8,opt,name=completedOrders,proto3,oneof" json:"completedOrders,omitempty"` //completedOrders
|
||||
ShopId *int64 `protobuf:"varint,9,opt,name=shopId,proto3,oneof" json:"shopId,omitempty"` //shopId
|
||||
Tags []string `protobuf:"bytes,10,rep,name=tags,proto3" json:"tags,omitempty"` //tags
|
||||
Games []int64 `protobuf:"varint,11,rep,packed,name=games,proto3" json:"games,omitempty"` //games
|
||||
CreatedAt *int64 `protobuf:"varint,12,opt,name=createdAt,proto3,oneof" json:"createdAt,omitempty"` //createdAt
|
||||
UpdatedAt *int64 `protobuf:"varint,13,opt,name=updatedAt,proto3,oneof" json:"updatedAt,omitempty"` //updatedAt
|
||||
Gender *int64 `protobuf:"varint,14,opt,name=gender,proto3,oneof" json:"gender,omitempty"` //gender
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
@@ -1554,64 +1554,64 @@ func (*SearchPlayersReq) Descriptor() ([]byte, []int) {
|
||||
}
|
||||
|
||||
func (x *SearchPlayersReq) GetPage() int64 {
|
||||
if x != nil {
|
||||
return x.Page
|
||||
if x != nil && x.Page != nil {
|
||||
return *x.Page
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *SearchPlayersReq) GetLimit() int64 {
|
||||
if x != nil {
|
||||
return x.Limit
|
||||
if x != nil && x.Limit != nil {
|
||||
return *x.Limit
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *SearchPlayersReq) GetId() int64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
if x != nil && x.Id != nil {
|
||||
return *x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *SearchPlayersReq) GetUserId() int64 {
|
||||
if x != nil {
|
||||
return x.UserId
|
||||
if x != nil && x.UserId != nil {
|
||||
return *x.UserId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *SearchPlayersReq) GetStatus() string {
|
||||
if x != nil {
|
||||
return x.Status
|
||||
if x != nil && x.Status != nil {
|
||||
return *x.Status
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SearchPlayersReq) GetRating() float64 {
|
||||
if x != nil {
|
||||
return x.Rating
|
||||
if x != nil && x.Rating != nil {
|
||||
return *x.Rating
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *SearchPlayersReq) GetTotalOrders() int64 {
|
||||
if x != nil {
|
||||
return x.TotalOrders
|
||||
if x != nil && x.TotalOrders != nil {
|
||||
return *x.TotalOrders
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *SearchPlayersReq) GetCompletedOrders() int64 {
|
||||
if x != nil {
|
||||
return x.CompletedOrders
|
||||
if x != nil && x.CompletedOrders != nil {
|
||||
return *x.CompletedOrders
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *SearchPlayersReq) GetShopId() int64 {
|
||||
if x != nil {
|
||||
return x.ShopId
|
||||
if x != nil && x.ShopId != nil {
|
||||
return *x.ShopId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
@@ -1631,22 +1631,22 @@ func (x *SearchPlayersReq) GetGames() []int64 {
|
||||
}
|
||||
|
||||
func (x *SearchPlayersReq) GetCreatedAt() int64 {
|
||||
if x != nil {
|
||||
return x.CreatedAt
|
||||
if x != nil && x.CreatedAt != nil {
|
||||
return *x.CreatedAt
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *SearchPlayersReq) GetUpdatedAt() int64 {
|
||||
if x != nil {
|
||||
return x.UpdatedAt
|
||||
if x != nil && x.UpdatedAt != nil {
|
||||
return *x.UpdatedAt
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *SearchPlayersReq) GetGender() int64 {
|
||||
if x != nil {
|
||||
return x.Gender
|
||||
if x != nil && x.Gender != nil {
|
||||
return *x.Gender
|
||||
}
|
||||
return 0
|
||||
}
|
||||
@@ -1800,7 +1800,7 @@ const file_player_proto_rawDesc = "" +
|
||||
"\tcreatedAt\x18\n" +
|
||||
" \x01(\x03R\tcreatedAt\x12\x1c\n" +
|
||||
"\tupdatedAt\x18\v \x01(\x03R\tupdatedAt\x12\x16\n" +
|
||||
"\x06gender\x18\f \x01(\x03R\x06gender\"\xb9\x02\n" +
|
||||
"\x06gender\x18\f \x01(\bR\x06gender\"\xb9\x02\n" +
|
||||
"\rAddPlayersReq\x12\x16\n" +
|
||||
"\x06userId\x18\x01 \x01(\x03R\x06userId\x12\x16\n" +
|
||||
"\x06status\x18\x02 \x01(\tR\x06status\x12\x16\n" +
|
||||
@@ -1847,23 +1847,38 @@ const file_player_proto_rawDesc = "" +
|
||||
"\x11GetPlayersByIdReq\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\x03R\x02id\";\n" +
|
||||
"\x12GetPlayersByIdResp\x12%\n" +
|
||||
"\aplayers\x18\x01 \x01(\v2\v.pb.PlayersR\aplayers\"\xf6\x02\n" +
|
||||
"\x10SearchPlayersReq\x12\x12\n" +
|
||||
"\x04page\x18\x01 \x01(\x03R\x04page\x12\x14\n" +
|
||||
"\x05limit\x18\x02 \x01(\x03R\x05limit\x12\x0e\n" +
|
||||
"\x02id\x18\x03 \x01(\x03R\x02id\x12\x16\n" +
|
||||
"\x06userId\x18\x04 \x01(\x03R\x06userId\x12\x16\n" +
|
||||
"\x06status\x18\x05 \x01(\tR\x06status\x12\x16\n" +
|
||||
"\x06rating\x18\x06 \x01(\x01R\x06rating\x12 \n" +
|
||||
"\vtotalOrders\x18\a \x01(\x03R\vtotalOrders\x12(\n" +
|
||||
"\x0fcompletedOrders\x18\b \x01(\x03R\x0fcompletedOrders\x12\x16\n" +
|
||||
"\x06shopId\x18\t \x01(\x03R\x06shopId\x12\x12\n" +
|
||||
"\aplayers\x18\x01 \x01(\v2\v.pb.PlayersR\aplayers\"\xc3\x04\n" +
|
||||
"\x10SearchPlayersReq\x12\x17\n" +
|
||||
"\x04page\x18\x01 \x01(\x03H\x00R\x04page\x88\x01\x01\x12\x19\n" +
|
||||
"\x05limit\x18\x02 \x01(\x03H\x01R\x05limit\x88\x01\x01\x12\x13\n" +
|
||||
"\x02id\x18\x03 \x01(\x03H\x02R\x02id\x88\x01\x01\x12\x1b\n" +
|
||||
"\x06userId\x18\x04 \x01(\x03H\x03R\x06userId\x88\x01\x01\x12\x1b\n" +
|
||||
"\x06status\x18\x05 \x01(\tH\x04R\x06status\x88\x01\x01\x12\x1b\n" +
|
||||
"\x06rating\x18\x06 \x01(\x01H\x05R\x06rating\x88\x01\x01\x12%\n" +
|
||||
"\vtotalOrders\x18\a \x01(\x03H\x06R\vtotalOrders\x88\x01\x01\x12-\n" +
|
||||
"\x0fcompletedOrders\x18\b \x01(\x03H\aR\x0fcompletedOrders\x88\x01\x01\x12\x1b\n" +
|
||||
"\x06shopId\x18\t \x01(\x03H\bR\x06shopId\x88\x01\x01\x12\x12\n" +
|
||||
"\x04tags\x18\n" +
|
||||
" \x03(\tR\x04tags\x12\x14\n" +
|
||||
"\x05games\x18\v \x03(\x03R\x05games\x12\x1c\n" +
|
||||
"\tcreatedAt\x18\f \x01(\x03R\tcreatedAt\x12\x1c\n" +
|
||||
"\tupdatedAt\x18\r \x01(\x03R\tupdatedAt\x12\x16\n" +
|
||||
"\x06gender\x18\x0e \x01(\x03R\x06gender\":\n" +
|
||||
"\x05games\x18\v \x03(\x03R\x05games\x12!\n" +
|
||||
"\tcreatedAt\x18\f \x01(\x03H\tR\tcreatedAt\x88\x01\x01\x12!\n" +
|
||||
"\tupdatedAt\x18\r \x01(\x03H\n" +
|
||||
"R\tupdatedAt\x88\x01\x01\x12\x1b\n" +
|
||||
"\x06gender\x18\x0e \x01(\x03H\vR\x06gender\x88\x01\x01B\a\n" +
|
||||
"\x05_pageB\b\n" +
|
||||
"\x06_limitB\x05\n" +
|
||||
"\x03_idB\t\n" +
|
||||
"\a_userIdB\t\n" +
|
||||
"\a_statusB\t\n" +
|
||||
"\a_ratingB\x0e\n" +
|
||||
"\f_totalOrdersB\x12\n" +
|
||||
"\x10_completedOrdersB\t\n" +
|
||||
"\a_shopIdB\f\n" +
|
||||
"\n" +
|
||||
"_createdAtB\f\n" +
|
||||
"\n" +
|
||||
"_updatedAtB\t\n" +
|
||||
"\a_gender\":\n" +
|
||||
"\x11SearchPlayersResp\x12%\n" +
|
||||
"\aplayers\x18\x01 \x03(\v2\v.pb.PlayersR\aplayers2\xc6\x05\n" +
|
||||
"\rplayerService\x12H\n" +
|
||||
@@ -1956,6 +1971,7 @@ func file_player_proto_init() {
|
||||
}
|
||||
file_player_proto_msgTypes[3].OneofWrappers = []any{}
|
||||
file_player_proto_msgTypes[14].OneofWrappers = []any{}
|
||||
file_player_proto_msgTypes[20].OneofWrappers = []any{}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
|
||||
Reference in New Issue
Block a user