syntax = "proto3"; package backend.operation; option go_package = ".;operationPb"; import "backend/operation/enum.proto"; import "backend/operation/pagination.proto"; import "backend/operation/pasture.proto"; // 用户角色 message AddRoleRequest { int64 id = 1; string name = 2; // 角色名称 string remarks = 3; // 角色备注 IsShow.Kind is_show = 4; // 是否启用 repeated int64 pasture_id = 5; // 牧场id repeated int64 menu_id = 6; // 菜单id repeated int64 mobile_id = 7; // 移动端id string create_user = 8; // 创建用户 int64 created_at = 9; // 创建时间 string crated_at_format = 10; // 创建时间格式化 } message SearchRoleRequest { string name = 3; // 角色名称 PaginationModel pagination = 2; // 分页 } message SearchRoleResponse { int32 page = 1; int32 total = 2; repeated AddRoleRequest list = 3; } // 用户token message SystemToken { string token = 1; } // 用户登录 message UserAuth { string user_name = 1; // 用户名称 string password = 2; // 用户密码 string phone = 3; // 用户手机号 repeated UserRole roles = 4; // 用户角色 string employee_name = 5; // 员工名称 } message UserRole { int64 id = 1; // 角色id string name = 2; // 角色名称 } message AddSystemUser { int64 id = 1; // 用户id string name = 2; // 用户名称 string phone = 3; // 用户手机号 repeated UserRole roles = 4; // 角色 IsShow.Kind is_show = 5; // 是否开启 string employee_name = 6; // 员工姓名 string create_user = 7; // 创建人 int64 created_at = 8; // 创建时间 string crated_at_format = 9; // 创建时间格式化 } // 查询用户 message SearchUserRequest { string name = 1; // 用户名称 string employee_name = 2; // 员工姓名 IsShow.Kind is_show = 3; // 是否启用 int64 created_start_time = 4; // 开始时间 int64 created_end_time = 5; // 结束时间 PaginationModel pagination = 6; // 分页 } message SearchUserResponse { int32 page = 1; int32 total = 2; repeated AddSystemUser list = 3; } message IsShowSystemUserRequest { int64 user_id = 1; // 用户id IsShow.Kind is_show = 2; // is_show } // 系统菜单权限 message AddMenuRequest { int64 id = 1; string name = 2; // 名称 int64 parent_id = 3; // 父id int32 menu_type = 4; // 菜单类型 1 菜单 2 按钮 string title = 5; // 标题 string path = 6; // 路径 path IsShow.Kind is_show = 7; // 是否显示 string component = 8; // 组件 string icon = 9; // 图标 int32 sort = 10; // 排序 string redirect = 11; // 重定向 int64 created_at = 12; // 创建时间 string crated_at_format = 13; // 创建时间格式化 } message IsShowSystemMenuRequest { int64 menu_id = 1; // 角色id IsShow.Kind is_show = 2; // is_show } // 查询菜单权限 message SearchMenuRequest { string name = 1; // 菜单名称 PaginationModel pagination = 2; // 分页 } message SearchMenuResponse { int32 page = 1; int32 total = 2; repeated AddMenuRequest list = 3; } // 系统用户权限相关 message SystemUserMenuPermissions { repeated AddPastureRequest pasture_list = 1; // 牧场列表 repeated AddMenuRequest menu_list = 2; // 菜单列表 repeated AddMobileRequest mobile_list = 3; // 移动端权限 } // 移动端 message AddMobileRequest { int64 id = 1; // id string name = 2; // 名称 }