Ver código fonte

proto: 字段类型

Yi 1 ano atrás
pai
commit
d6e4caf33d

+ 1 - 1
backend/operation/pasture.proto

@@ -137,7 +137,7 @@ message AddForageRequest {
   string name = 2;                      // 饲料名称
   int32 category_id = 3;                // 饲料分类id
   string category_name = 4;             // 饲料分类名称
-  string material_type_key = 5;        // 物料类型key
+  int32 material_type_key = 5;        // 物料类型key
   string material_type_name = 6;        // 物料类型名称
   string unique_encode = 7;              // 唯一编码
   ForageSource.Kind forage_source_id = 8;       // 饲料来源id

+ 4 - 4
proto/go/backend/operation/pasture.pb.go

@@ -1228,7 +1228,7 @@ type AddForageRequest struct {
 	Name               string              `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`                                                                                       // 饲料名称
 	CategoryId         int32               `protobuf:"varint,3,opt,name=category_id,json=categoryId,proto3" json:"category_id,omitempty"`                                                        // 饲料分类id
 	CategoryName       string              `protobuf:"bytes,4,opt,name=category_name,json=categoryName,proto3" json:"category_name,omitempty"`                                                   // 饲料分类名称
-	MaterialTypeKey    string              `protobuf:"bytes,5,opt,name=material_type_key,json=materialTypeKey,proto3" json:"material_type_key,omitempty"`                                        // 物料类型key
+	MaterialTypeKey    int32               `protobuf:"varint,5,opt,name=material_type_key,json=materialTypeKey,proto3" json:"material_type_key,omitempty"`                                       // 物料类型key
 	MaterialTypeName   string              `protobuf:"bytes,6,opt,name=material_type_name,json=materialTypeName,proto3" json:"material_type_name,omitempty"`                                     // 物料类型名称
 	UniqueEncode       string              `protobuf:"bytes,7,opt,name=unique_encode,json=uniqueEncode,proto3" json:"unique_encode,omitempty"`                                                   // 唯一编码
 	ForageSourceId     ForageSource_Kind   `protobuf:"varint,8,opt,name=forage_source_id,json=forageSourceId,proto3,enum=backend.operation.ForageSource_Kind" json:"forage_source_id,omitempty"` // 饲料来源id
@@ -1312,11 +1312,11 @@ func (x *AddForageRequest) GetCategoryName() string {
 	return ""
 }
 
-func (x *AddForageRequest) GetMaterialTypeKey() string {
+func (x *AddForageRequest) GetMaterialTypeKey() int32 {
 	if x != nil {
 		return x.MaterialTypeKey
 	}
-	return ""
+	return 0
 }
 
 func (x *AddForageRequest) GetMaterialTypeName() string {
@@ -3032,7 +3032,7 @@ var file_backend_operation_pasture_proto_rawDesc = []byte{
 	0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x61, 0x74, 0x65,
 	0x67, 0x6f, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x6d, 0x61, 0x74, 0x65,
 	0x72, 0x69, 0x61, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20,
-	0x01, 0x28, 0x09, 0x52, 0x0f, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x54, 0x79, 0x70,
+	0x01, 0x28, 0x05, 0x52, 0x0f, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x54, 0x79, 0x70,
 	0x65, 0x4b, 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x12, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c,
 	0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09,
 	0x52, 0x10, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x4e, 0x61,