item.pb.go 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319
  1. // message结构的属性名请使用 驼峰小写字母开始
  2. // Code generated by protoc-gen-go. DO NOT EDIT.
  3. // versions:
  4. // protoc-gen-go v1.36.8
  5. // protoc v6.31.1
  6. // source: item.proto
  7. package pb
  8. import (
  9. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  10. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  11. reflect "reflect"
  12. sync "sync"
  13. unsafe "unsafe"
  14. )
  15. const (
  16. // Verify that this generated code is sufficiently up-to-date.
  17. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  18. // Verify that runtime/protoimpl is sufficiently up-to-date.
  19. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  20. )
  21. // 道具列表
  22. type ItemList struct {
  23. state protoimpl.MessageState `protogen:"open.v1"`
  24. // 货币列表
  25. Currencies map[int32]*Currency `protobuf:"bytes,1,rep,name=currencies,proto3" json:"currencies,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
  26. // 道具列表
  27. Items map[int32]*Asset `protobuf:"bytes,2,rep,name=items,proto3" json:"items,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
  28. // 药品使用次数 key 药品ID D-道具-药品表药品ID value 当前使用次数
  29. MedicineUses map[int32]int32 `protobuf:"bytes,3,rep,name=medicineUses,proto3" json:"medicineUses,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"`
  30. unknownFields protoimpl.UnknownFields
  31. sizeCache protoimpl.SizeCache
  32. }
  33. func (x *ItemList) Reset() {
  34. *x = ItemList{}
  35. mi := &file_item_proto_msgTypes[0]
  36. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  37. ms.StoreMessageInfo(mi)
  38. }
  39. func (x *ItemList) String() string {
  40. return protoimpl.X.MessageStringOf(x)
  41. }
  42. func (*ItemList) ProtoMessage() {}
  43. func (x *ItemList) ProtoReflect() protoreflect.Message {
  44. mi := &file_item_proto_msgTypes[0]
  45. if x != nil {
  46. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  47. if ms.LoadMessageInfo() == nil {
  48. ms.StoreMessageInfo(mi)
  49. }
  50. return ms
  51. }
  52. return mi.MessageOf(x)
  53. }
  54. // Deprecated: Use ItemList.ProtoReflect.Descriptor instead.
  55. func (*ItemList) Descriptor() ([]byte, []int) {
  56. return file_item_proto_rawDescGZIP(), []int{0}
  57. }
  58. func (x *ItemList) GetCurrencies() map[int32]*Currency {
  59. if x != nil {
  60. return x.Currencies
  61. }
  62. return nil
  63. }
  64. func (x *ItemList) GetItems() map[int32]*Asset {
  65. if x != nil {
  66. return x.Items
  67. }
  68. return nil
  69. }
  70. func (x *ItemList) GetMedicineUses() map[int32]int32 {
  71. if x != nil {
  72. return x.MedicineUses
  73. }
  74. return nil
  75. }
  76. // 货币
  77. type Currency struct {
  78. state protoimpl.MessageState `protogen:"open.v1"`
  79. // 货币id
  80. Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
  81. // 当前数量
  82. Num int64 `protobuf:"varint,2,opt,name=num,proto3" json:"num,omitempty"`
  83. // 最大数量(0表示没有最大值)
  84. MaxNum int64 `protobuf:"varint,3,opt,name=maxNum,proto3" json:"maxNum,omitempty"`
  85. // 最后一次更新时间(毫秒)
  86. UpdateTime int64 `protobuf:"varint,4,opt,name=updateTime,proto3" json:"updateTime,omitempty"`
  87. unknownFields protoimpl.UnknownFields
  88. sizeCache protoimpl.SizeCache
  89. }
  90. func (x *Currency) Reset() {
  91. *x = Currency{}
  92. mi := &file_item_proto_msgTypes[1]
  93. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  94. ms.StoreMessageInfo(mi)
  95. }
  96. func (x *Currency) String() string {
  97. return protoimpl.X.MessageStringOf(x)
  98. }
  99. func (*Currency) ProtoMessage() {}
  100. func (x *Currency) ProtoReflect() protoreflect.Message {
  101. mi := &file_item_proto_msgTypes[1]
  102. if x != nil {
  103. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  104. if ms.LoadMessageInfo() == nil {
  105. ms.StoreMessageInfo(mi)
  106. }
  107. return ms
  108. }
  109. return mi.MessageOf(x)
  110. }
  111. // Deprecated: Use Currency.ProtoReflect.Descriptor instead.
  112. func (*Currency) Descriptor() ([]byte, []int) {
  113. return file_item_proto_rawDescGZIP(), []int{1}
  114. }
  115. func (x *Currency) GetId() int32 {
  116. if x != nil {
  117. return x.Id
  118. }
  119. return 0
  120. }
  121. func (x *Currency) GetNum() int64 {
  122. if x != nil {
  123. return x.Num
  124. }
  125. return 0
  126. }
  127. func (x *Currency) GetMaxNum() int64 {
  128. if x != nil {
  129. return x.MaxNum
  130. }
  131. return 0
  132. }
  133. func (x *Currency) GetUpdateTime() int64 {
  134. if x != nil {
  135. return x.UpdateTime
  136. }
  137. return 0
  138. }
  139. // [请求]道具使用
  140. type ItemUseRequest struct {
  141. state protoimpl.MessageState `protogen:"open.v1"`
  142. // 宝箱道具ID
  143. ItemID int32 `protobuf:"varint,1,opt,name=itemID,proto3" json:"itemID,omitempty"`
  144. // 开启数量
  145. UseNum int64 `protobuf:"varint,2,opt,name=useNum,proto3" json:"useNum,omitempty"`
  146. // (选择道具ID) 仅自选类型宝箱使用
  147. SelectItemID int32 `protobuf:"varint,3,opt,name=selectItemID,proto3" json:"selectItemID,omitempty"`
  148. unknownFields protoimpl.UnknownFields
  149. sizeCache protoimpl.SizeCache
  150. }
  151. func (x *ItemUseRequest) Reset() {
  152. *x = ItemUseRequest{}
  153. mi := &file_item_proto_msgTypes[2]
  154. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  155. ms.StoreMessageInfo(mi)
  156. }
  157. func (x *ItemUseRequest) String() string {
  158. return protoimpl.X.MessageStringOf(x)
  159. }
  160. func (*ItemUseRequest) ProtoMessage() {}
  161. func (x *ItemUseRequest) ProtoReflect() protoreflect.Message {
  162. mi := &file_item_proto_msgTypes[2]
  163. if x != nil {
  164. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  165. if ms.LoadMessageInfo() == nil {
  166. ms.StoreMessageInfo(mi)
  167. }
  168. return ms
  169. }
  170. return mi.MessageOf(x)
  171. }
  172. // Deprecated: Use ItemUseRequest.ProtoReflect.Descriptor instead.
  173. func (*ItemUseRequest) Descriptor() ([]byte, []int) {
  174. return file_item_proto_rawDescGZIP(), []int{2}
  175. }
  176. func (x *ItemUseRequest) GetItemID() int32 {
  177. if x != nil {
  178. return x.ItemID
  179. }
  180. return 0
  181. }
  182. func (x *ItemUseRequest) GetUseNum() int64 {
  183. if x != nil {
  184. return x.UseNum
  185. }
  186. return 0
  187. }
  188. func (x *ItemUseRequest) GetSelectItemID() int32 {
  189. if x != nil {
  190. return x.SelectItemID
  191. }
  192. return 0
  193. }
  194. var File_item_proto protoreflect.FileDescriptor
  195. const file_item_proto_rawDesc = "" +
  196. "\n" +
  197. "\n" +
  198. "item.proto\x12\x02pb\x1a\x0fbase_type.proto\"\x8e\x03\n" +
  199. "\bItemList\x12<\n" +
  200. "\n" +
  201. "currencies\x18\x01 \x03(\v2\x1c.pb.ItemList.CurrenciesEntryR\n" +
  202. "currencies\x12-\n" +
  203. "\x05items\x18\x02 \x03(\v2\x17.pb.ItemList.ItemsEntryR\x05items\x12B\n" +
  204. "\fmedicineUses\x18\x03 \x03(\v2\x1e.pb.ItemList.MedicineUsesEntryR\fmedicineUses\x1aK\n" +
  205. "\x0fCurrenciesEntry\x12\x10\n" +
  206. "\x03key\x18\x01 \x01(\x05R\x03key\x12\"\n" +
  207. "\x05value\x18\x02 \x01(\v2\f.pb.CurrencyR\x05value:\x028\x01\x1aC\n" +
  208. "\n" +
  209. "ItemsEntry\x12\x10\n" +
  210. "\x03key\x18\x01 \x01(\x05R\x03key\x12\x1f\n" +
  211. "\x05value\x18\x02 \x01(\v2\t.pb.AssetR\x05value:\x028\x01\x1a?\n" +
  212. "\x11MedicineUsesEntry\x12\x10\n" +
  213. "\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n" +
  214. "\x05value\x18\x02 \x01(\x05R\x05value:\x028\x01\"d\n" +
  215. "\bCurrency\x12\x0e\n" +
  216. "\x02id\x18\x01 \x01(\x05R\x02id\x12\x10\n" +
  217. "\x03num\x18\x02 \x01(\x03R\x03num\x12\x16\n" +
  218. "\x06maxNum\x18\x03 \x01(\x03R\x06maxNum\x12\x1e\n" +
  219. "\n" +
  220. "updateTime\x18\x04 \x01(\x03R\n" +
  221. "updateTime\"d\n" +
  222. "\x0eItemUseRequest\x12\x16\n" +
  223. "\x06itemID\x18\x01 \x01(\x05R\x06itemID\x12\x16\n" +
  224. "\x06useNum\x18\x02 \x01(\x03R\x06useNum\x12\"\n" +
  225. "\fselectItemID\x18\x03 \x01(\x05R\fselectItemIDB\x05Z\x03/pbb\x06proto3"
  226. var (
  227. file_item_proto_rawDescOnce sync.Once
  228. file_item_proto_rawDescData []byte
  229. )
  230. func file_item_proto_rawDescGZIP() []byte {
  231. file_item_proto_rawDescOnce.Do(func() {
  232. file_item_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_item_proto_rawDesc), len(file_item_proto_rawDesc)))
  233. })
  234. return file_item_proto_rawDescData
  235. }
  236. var file_item_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
  237. var file_item_proto_goTypes = []any{
  238. (*ItemList)(nil), // 0: pb.ItemList
  239. (*Currency)(nil), // 1: pb.Currency
  240. (*ItemUseRequest)(nil), // 2: pb.ItemUseRequest
  241. nil, // 3: pb.ItemList.CurrenciesEntry
  242. nil, // 4: pb.ItemList.ItemsEntry
  243. nil, // 5: pb.ItemList.MedicineUsesEntry
  244. (*Asset)(nil), // 6: pb.Asset
  245. }
  246. var file_item_proto_depIdxs = []int32{
  247. 3, // 0: pb.ItemList.currencies:type_name -> pb.ItemList.CurrenciesEntry
  248. 4, // 1: pb.ItemList.items:type_name -> pb.ItemList.ItemsEntry
  249. 5, // 2: pb.ItemList.medicineUses:type_name -> pb.ItemList.MedicineUsesEntry
  250. 1, // 3: pb.ItemList.CurrenciesEntry.value:type_name -> pb.Currency
  251. 6, // 4: pb.ItemList.ItemsEntry.value:type_name -> pb.Asset
  252. 5, // [5:5] is the sub-list for method output_type
  253. 5, // [5:5] is the sub-list for method input_type
  254. 5, // [5:5] is the sub-list for extension type_name
  255. 5, // [5:5] is the sub-list for extension extendee
  256. 0, // [0:5] is the sub-list for field type_name
  257. }
  258. func init() { file_item_proto_init() }
  259. func file_item_proto_init() {
  260. if File_item_proto != nil {
  261. return
  262. }
  263. file_base_type_proto_init()
  264. type x struct{}
  265. out := protoimpl.TypeBuilder{
  266. File: protoimpl.DescBuilder{
  267. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  268. RawDescriptor: unsafe.Slice(unsafe.StringData(file_item_proto_rawDesc), len(file_item_proto_rawDesc)),
  269. NumEnums: 0,
  270. NumMessages: 6,
  271. NumExtensions: 0,
  272. NumServices: 0,
  273. },
  274. GoTypes: file_item_proto_goTypes,
  275. DependencyIndexes: file_item_proto_depIdxs,
  276. MessageInfos: file_item_proto_msgTypes,
  277. }.Build()
  278. File_item_proto = out.File
  279. file_item_proto_goTypes = nil
  280. file_item_proto_depIdxs = nil
  281. }