zhangqian
2023-08-08 a583fb5fdd2ccdc20e22cebf9428237915645c57
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
syntax = "proto3";
 
option go_package = "./product";
 
service productService {
  rpc GetProductInfo(GetProductInfoRequest) returns(GetProductInfoResponse) {}
  rpc GetProductList(GetProductListRequest) returns(GetProductListResponse) {}
}
 
message GetProductInfoRequest{
  string ProductId = 1; //产品id
}
 
message GetProductInfoResponse{
  int32   Code  = 1;
  string  Msg   = 2;
  Product Data = 3;
}
message Product {
  string Number = 1;
  string Name = 2;
  string  Unit = 3;
  bool IsSale = 4; //是否销售
  float SalePrice = 5; //销售价格
  float Amount = 6;//库存剩余量
  int32 MinInventory = 7;//安全库存
  string MaterialMode = 8; //物料类型
  string PurchaseType = 9;//采购类型
}
 
message GetProductListRequest{
  int32 page = 1;
  int32 pageSize = 2;
  string ProductNumber = 3;
  string ProductName = 4;
}
 
message GetProductListResponse{
  int32   Code  = 1;
  string  Msg   = 2;
  repeated Product List = 3;
  int64 Total = 4;
}