pasture.proto 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289
  1. syntax = "proto3";
  2. package backend.operation;
  3. option go_package = ".;operationPb";
  4. import "backend/operation/enum.proto";
  5. import "backend/operation/pagination.proto";
  6. message AddPastureRequest {
  7. int32 id = 1;
  8. string name = 2; // 牧场名称
  9. string account = 3; // 登录账号名称
  10. string manager_user = 4; // 牧场负责人名称
  11. string manager_phone = 5; // 牧场负责人手机号
  12. string address = 6; // 牧场地址
  13. IsShow.Kind is_show = 7; // 是否启用
  14. int32 created_at = 8; // 创建时间
  15. string created_at_format = 9; // 创建时间格式化
  16. string domain = 10; // 牧场端域名或者ip
  17. int32 pasture_id = 11; // 牧场端id (兼容历史数据)
  18. }
  19. message SearchPastureRequest {
  20. string name = 1; // 牧场名称
  21. string manager_user = 2; // 牧场负责人名称
  22. string manager_phone = 3; // 牧场负责人手机号
  23. uint32 start_time = 4; // 开始时间
  24. uint32 end_time = 5; // 结束时间
  25. PaginationModel pagination = 6; // 分页
  26. }
  27. message SearchPastureResponse {
  28. int32 code = 1;
  29. string msg = 2;
  30. SearchPastureData data = 3;
  31. }
  32. message SearchPastureData {
  33. int32 page = 1;
  34. int32 total = 2;
  35. int32 page_size = 3;
  36. repeated AddPastureRequest list = 4;
  37. }
  38. message UserPasture {
  39. int32 id = 1;
  40. string name = 2;
  41. }
  42. message IsShowGroupPasture {
  43. int32 pasture_id = 1; // 牧场id
  44. IsShow.Kind is_show = 2; // 是否开启
  45. }
  46. // 添加牧畜分类
  47. message AddCattleCategoryRequest {
  48. uint32 id = 1;
  49. CattleCategoryParent.Kind parent_id = 2; // 父类id
  50. string parent_name = 3; // 父类名称
  51. string name = 4; // 牧畜分类名称
  52. string number = 5; // 畜牧类别编号
  53. IsShow.Kind is_show = 6; // 是否启用
  54. uint32 created_at = 7; // 创建时间
  55. string created_at_format = 8; // 创建时间格式
  56. }
  57. // 是否启用
  58. message IsShowCattleCategory {
  59. int32 cattle_category_id = 1;
  60. IsShow.Kind is_show = 2;
  61. }
  62. // 畜牧分类查询列表
  63. message SearchCattleCategoryRequest {
  64. int32 parent_id = 1;
  65. IsShow.Kind is_show = 2;
  66. string name = 3;
  67. PaginationModel pagination = 4; // 分页
  68. }
  69. message SearchCattleCategoryResponse {
  70. int32 code = 1;
  71. string msg = 2;
  72. SearchCattleCategoryData data = 3;
  73. }
  74. message SearchCattleCategoryData {
  75. int32 page = 1;
  76. int32 total = 2;
  77. int32 page_size = 3;
  78. repeated AddCattleCategoryRequest list = 4;
  79. }
  80. // 添加饲料分类
  81. message AddForageCategoryRequest {
  82. uint32 id = 1;
  83. ForageCategoryParent.Kind parent_id = 2; // 父类id
  84. string parent_name = 3; // 父类名称
  85. string name = 4; // 牧畜分类名称
  86. string number = 5; // 畜牧类别编号
  87. IsShow.Kind is_show = 6; // 是否启用
  88. uint32 created_at = 7; // 创建时间
  89. string created_at_format = 8; // 创建时间格式
  90. }
  91. // 是否启用
  92. message IsShowForageCategory {
  93. int32 forage_category_id = 1;
  94. IsShow.Kind is_show = 2;
  95. }
  96. // 饲料分类查询列表
  97. message SearchForageCategoryRequest {
  98. int32 parent_id = 1;
  99. IsShow.Kind is_show = 2;
  100. string name = 3;
  101. string number = 4;
  102. PaginationModel pagination = 5; // 分页
  103. }
  104. message SearchForageCategoryResponse {
  105. int32 code = 1;
  106. string msg = 2;
  107. SearchForageCategoryData data = 3;
  108. }
  109. message SearchForageCategoryData {
  110. int32 page = 1;
  111. int32 total = 2;
  112. int32 page_size = 3;
  113. repeated AddForageCategoryRequest list = 4;
  114. }
  115. // 饲料列表
  116. message AddForageRequest {
  117. int32 id = 1;
  118. string name = 2; // 饲料名称
  119. int32 category_id = 3; // 饲料分类id
  120. string category_name = 4; // 饲料分类名称
  121. int32 material_type = 5; // 物料类型
  122. string unique_encode = 7; // 唯一编码
  123. ForageSource.Kind forage_source_id = 8; // 饲料来源id
  124. string forage_source_name = 9; // 饲料来源名称
  125. ForagePlanType.Kind plan_type_id = 10; // 计划类型id
  126. string plan_type_name = 11; // 计划类型名称
  127. string small_material_scale = 12; // 小料称
  128. int32 allow_error = 13; // 允许误差 (单位kg)
  129. int32 package_weight = 14; // 包装重量 (单位kg)
  130. int32 price = 15; // 单价(单位分)
  131. int32 jump_weight = 16; // 跳转重量域(单位kg)
  132. JumpDelaType.Kind jump_delay = 17; // 跳转延迟
  133. IsShow.Kind confirm_start = 18; // 确认开始
  134. int32 relay_locations = 19; // 继电器位置
  135. IsShow.Kind jmp = 20; // 无上域
  136. string backup1 = 21; // 备用字段1
  137. string backup2 = 22; // 备用字段2
  138. string backup3 = 23; // 备用字段3
  139. int32 created_at = 24; // 创建时间
  140. string created_at_format = 25; // 创建时间格式化
  141. IsShow.Kind is_show = 26; // 是否启用
  142. }
  143. message SearchForageListRequest {
  144. string name = 1; // 饲料名称
  145. int32 category_id = 2; // 饲料分类id
  146. uint32 forage_source_id = 3; // 饲料来源
  147. IsShow.Kind is_show = 4; // 是否启用
  148. uint32 allow_error = 5; // 允许误差
  149. uint32 jump_weight = 6; // 跳转重量域
  150. JumpDelaType.Kind jump_delay = 7; // 跳转延迟
  151. PaginationModel pagination = 8; // 分页
  152. }
  153. message ForageListSortRequest {
  154. repeated ForageListSort list = 1;
  155. }
  156. message ForageListSort {
  157. int64 id = 1;
  158. int64 sort = 2;
  159. }
  160. message SmallMaterialRequest {
  161. string api_name = 1; // 牧场端接口标识名称
  162. int32 pasture_id = 2; // 牧场id
  163. string info_name = 3; //
  164. }
  165. message SearchForageListResponse {
  166. int32 code = 1;
  167. string msg = 2;
  168. SearchForageList data = 3;
  169. }
  170. message SearchForageList {
  171. int32 page = 1;
  172. int32 page_size = 2;
  173. int32 total = 3;
  174. repeated AddForageRequest list = 4;
  175. }
  176. // 是否启用
  177. message IsShowForage {
  178. int32 forage_id = 1;
  179. IsShow.Kind is_show = 2;
  180. }
  181. message ForageEnumListResponse {
  182. int32 code = 1;
  183. string msg = 2;
  184. ForageEnumList data = 3;
  185. }
  186. message ForageEnumList {
  187. repeated ForageSourceEnum forage_source = 1; // 饲料来源
  188. repeated ForagePlanTypeEnum forage_plan_type = 2; // 饲料计划类型
  189. repeated JumpDelaTypeEnum jump_dela_type = 3; // 跳转延迟类型
  190. repeated CattleParentCategoryEnum cattle_parent_category = 4; // 畜牧分类
  191. repeated ForageParentCategoryEnum forage_parent_category = 5; // 饲料分类
  192. repeated IsShowEnum is_show = 6;
  193. repeated FormulaTypeEnum formula_type = 7; // 配方类型
  194. repeated FormulaOptionEnum formula_list = 8; // 所有配方列表
  195. repeated IsShowEnum confirm_start = 9; // 确认开始
  196. repeated FormulaOptionEnum formulation_evaluation = 10; // 配方评估查询方式
  197. repeated FormulaOptionEnum use_materials_list = 11; // 用料分析-列表显示
  198. repeated FormulaOptionEnum use_materials_type = 12; // 用料分析-统计类型
  199. repeated FormulaOptionEnum price_materials_type = 13; // 价格分析-统计类型
  200. repeated FormulaOptionEnum jump_type = 14; // 准确性-跳转方式
  201. repeated FormulaOptionEnum statistics_type = 15; // 准确性-统计类型
  202. }
  203. message ForageSourceEnum {
  204. ForageSource.Kind value = 1;
  205. string label = 2;
  206. }
  207. message ForagePlanTypeEnum {
  208. ForagePlanType.Kind value = 1;
  209. string label = 2;
  210. }
  211. message JumpDelaTypeEnum {
  212. JumpDelaType.Kind value = 1;
  213. string label = 2;
  214. }
  215. message CattleParentCategoryEnum {
  216. CattleCategoryParent.Kind value = 1;
  217. string label = 2;
  218. }
  219. message ForageParentCategoryEnum {
  220. ForageCategoryParent.Kind value = 1;
  221. string label = 2;
  222. }
  223. message IsShowEnum {
  224. IsShow.Kind value = 1;
  225. string label = 2;
  226. }
  227. message FormulaTypeEnum {
  228. FormulaType.Kind value = 1;
  229. string label = 2;
  230. }
  231. message FormulaOptionEnum {
  232. int32 value = 1;
  233. string label = 2;
  234. }
  235. // 牧场端分类数据同步
  236. message CategorySyncRequest {
  237. string key_word = 1; // 关键字
  238. int32 pasture_id = 2; // 牧场id
  239. int32 parent_id = 3; // 一类id
  240. string parent_name = 4; // 一类名称
  241. string name = 5; // 分类名称
  242. string number = 6; // 分类编号
  243. IsShow.Kind is_show = 7; // 是否展示
  244. IsShow.Kind is_delete = 8; // 是否删除
  245. int32 id = 9; // 牧场端数据id
  246. }
  247. // 牧场端分类数据删除
  248. message CategoryDeleteRequest {
  249. string key_word = 1; // 关键字
  250. int32 pasture_id = 2; // 牧场id
  251. int32 data_id = 3;
  252. }