syntax = "proto3"; package backend.operation; option go_package = ".;operationPb"; import "backend/operation/enum.proto"; import "backend/operation/pagination.proto"; message AddPastureRequest { int32 id = 1; string name = 2; // 牧场名称 string account = 3; // 登录账号名称 string manager_user = 4; // 牧场负责人名称 string manager_phone = 5; // 牧场负责人手机号 string address = 6; // 牧场地址 IsShow.Kind is_show = 7; // 是否启用 int32 created_at = 8; // 创建时间 string created_at_format = 9; // 创建时间格式化 } message SearchPastureRequest { string name = 1; // 牧场名称 string manager_user = 2; // 牧场负责人名称 string manager_phone = 3; // 牧场负责人手机号 uint32 start_time = 4; // 开始时间 uint32 end_time = 5; // 结束时间 PaginationModel pagination = 6; // 分页 } message SearchPastureResponse { int32 code = 1; string msg = 2; SearchPastureData data = 3; } message SearchPastureData { int32 page = 1; int32 total = 2; int32 page_size = 3; repeated AddPastureRequest list = 4; } message UserPasture { int32 id = 1; string name = 2; } message IsShowGroupPasture { int32 pasture_id = 1; // 牧场id IsShow.Kind is_show = 2; // 是否开启 } // 添加牧畜分类 message AddCattleCategoryRequest { uint32 id = 1; CattleCategoryParent.Kind parent_id = 2; // 父类id string parent_name = 3; // 父类名称 string name = 4; // 牧畜分类名称 string number = 5; // 畜牧类别编号 IsShow.Kind is_show = 6; // 是否启用 uint32 created_at = 7; // 创建时间 string created_at_format = 8; // 创建时间格式 } // 是否启用 message IsShowCattleCategory { int32 cattle_category_id = 1; IsShow.Kind is_show = 2; } // 畜牧分类查询列表 message SearchCattleCategoryRequest { string parent_name = 1; IsShow.Kind is_show = 2; string name = 3; PaginationModel pagination = 4; // 分页 } message SearchCattleCategoryResponse { int32 code = 1; string msg = 2; SearchCattleCategoryData data = 3; } message SearchCattleCategoryData { int32 page = 1; int32 total = 2; repeated AddCattleCategoryRequest list = 3; } // 添加饲料分类 message AddForageCategoryRequest { uint32 id = 1; ForageCategoryParent.Kind parent_id = 2; // 父类id string parent_name = 3; // 父类名称 string name = 4; // 牧畜分类名称 string number = 5; // 畜牧类别编号 IsShow.Kind is_show = 6; // 是否启用 uint32 created_at = 7; // 创建时间 string created_at_format = 8; // 创建时间格式 } // 是否启用 message IsShowForageCategory { int32 forage_category_id = 1; IsShow.Kind is_show = 2; } // 饲料分类查询列表 message SearchForageCategoryRequest { string parent_name = 1; IsShow.Kind is_show = 2; string name = 3; PaginationModel pagination = 4; // 分页 } message SearchForageCategoryResponse { int32 code = 1; string msg = 2; SearchForageCategoryData data = 3; } message SearchForageCategoryData { int32 page = 1; int32 total = 2; repeated AddForageCategoryRequest list = 3; } // 饲料列表 message AddForageRequest { uint32 id = 1; string name = 2; // 饲料名称 uint32 category_id = 3; // 饲料分类id string category_name = 4; // 饲料分类名称 uint32 material_type = 5; // 物料类型 string unique_encode = 7; // 唯一编码 ForageSource.Kind forage_source_id = 8; // 饲料来源 ForagePlanType.Kind plan_type_id = 9; // 计划类型 string small_material_scale = 10; // 小料称 uint32 allow_error = 11; // 允许误差 (单位kg) uint32 package_weight = 12; // 包装重量 (单位kg) uint32 price = 13; // 单价(单位分) uint32 jump_weight = 14; // 跳转重量域(单位kg) JumpDelaType.Kind jump_delay = 15; // 跳转延迟 IsShow.Kind confirm_start = 16; // 确认开始 uint32 relay_locations = 17; // 继电器位置 IsShow.Kind jmp = 18; // 无上域 string backup1 = 19; // 备用字段1 string backup2 = 20; // 备用字段2 string backup3 = 21; // 备用字段3 uint32 created_at = 22; // 创建时间 string created_at_format = 23; // 创建时间格式化 IsShow.Kind is_show = 24; // 是否启用 } message SearchForageListRequest { string name = 1; // 饲料名称 string category_id = 2; // 饲料分类id uint32 forage_source_id = 3; // 饲料来源 IsShow.Kind is_show = 4; // 是否启用 uint32 allow_error = 5; // 允许误差 uint32 jump_weight = 6; // 跳转重量域 JumpDelaType.Kind jump_delay = 7; // 跳转延迟 PaginationModel pagination = 8; // 分页 } message SearchForageListResponse { int32 page = 1; int32 page_size = 2; int32 total = 3; repeated AddForageRequest list = 4; } // 是否启用 message IsShowForage { int32 forage_id = 1; IsShow.Kind is_show = 2; } message ForageEnumList { repeated ForageSourceEnum forage_source = 1; repeated ForagePlanTypeEnum forage_plan_type = 2; repeated JumpDelaTypeEnum jump_dela_type = 3; repeated CattleParentCategoryEnum cattle_parent_category = 4; repeated ForageParentCategoryEnum forage_parent_category = 5; repeated IsShowEnum is_show = 6; } message ForageSourceEnum { ForageSource.Kind value = 1; string label = 2; } message ForagePlanTypeEnum { ForagePlanType.Kind value = 1; string label = 2; } message JumpDelaTypeEnum { JumpDelaType.Kind value = 1; string label = 2; } message CattleParentCategoryEnum { CattleCategoryParent.Kind value = 1; string label = 2; } message ForageParentCategoryEnum { ForageCategoryParent.Kind value = 1; string label = 2; } message IsShowEnum { IsShow.Kind value = 1; string label = 2; }