syntax = "proto3"; // package声明符,用来防止不同的消息类型有命名冲突 package pb_v1; // 用于生成指定语言go的包名称 option go_package = "property-applete-gateway/pb/v1"; message SystemGroupPermissionData { // 父code,若没有则填空 string pcode = 1; // 组件路径 string path = 2; // 权限名字 string name = 3; // 路由 string router = 4; string code = 5; string applete_path = 6; } message LoginRequest { string username = 1; string password = 2; // 是否来源于员工小程序 bool applete = 3; } message LoginReply { int64 uid = 1; string user_name = 2; int64 cid = 3; int64 garden_id = 4; int64 group_id = 5; bool is_super_group = 6; string garden_name = 7; string user_permission_time = 8; string global_permission_time = 9; repeated SystemGroupPermissionData permissions = 10; } message LoginByPhoneRequest { string phone = 1; string password = 2; // 是否来源于员工小程序 bool applete = 3; } message LoginByPhoneReply { repeated LoginReply list = 1; } message CheckPhoneRequest { string phone = 1; } message CheckPhoneReply { } message UserAddRequest { string user_name = 1; string password = 2; string email = 3; string phone = 4; int64 group_id = 5; bool enable = 6; int64 garden_id = 7; int64 cid = 8; string garden_name = 9; bool by_company = 10; int64 uid = 11; string real_name = 12; int64 department_id = 13; int32 base_permission = 14; } message UserAddReply { int64 id = 1; } message UserUpdateRequest { string user_name = 1; string password = 2; string email = 3; string phone = 4; bool enable = 5; int64 id = 6; int64 garden_id = 7; int64 cid = 8; string garden_name = 9; int64 group_id = 10; bool by_company = 11; int64 uid = 12; string real_name = 13; int64 department_id = 14; int32 base_permission = 15; } message UserUpdateReply { UserUpdateRequest origin = 1; } message UserDelRequest { int64 id = 1; int64 cid = 2; bool by_company = 3; int64 uid = 4; int64 garden_id = 5; } message UserDelReply { UserUpdateRequest origin = 1; } message UserListRequest { int64 cid = 1; int64 garden_id = 2; int64 page = 3; int64 page_size = 4; string garden_name = 5; string user_name = 6; bool by_company = 7; int64 group_id = 8; string phone = 9; repeated int64 ids = 10; } message UserItem { string user_name = 1; string password = 2; string email = 3; string phone = 4; bool super = 5; bool enable = 6; int64 id = 7; int64 garden_id = 8; int64 cid = 9; string garden_name = 10; string created_at = 11; int64 group_id = 12; string group_name = 13; string department_name = 14; string real_name = 15; int32 base_permission = 16; } message UserListReply { int64 total = 1; int64 page = 2; repeated UserItem list = 3; } message SuperGroupRequest { int64 cid = 1; int64 garden_id = 2; } message SuperGroupReply { int64 id = 1; } message UserGardenChangeRequest { int64 garden_id = 1; string garden_name = 2; } message UserGardenChangeReply { } message GroupAddRequest { int64 garden_id = 1; int64 cid = 2; repeated string permission_codes = 3; bool is_super = 4; string group_name = 5; string group_desc = 6; } message GroupAddReply { int64 id = 1; } message GroupUpdateRequest { int64 id = 1; string group_name = 2; repeated string permission_codes = 3; int64 garden_id = 4; int64 cid = 5; string group_desc = 6; } message GroupUpdateReply { GroupUpdateRequest origin = 1; } message GroupDelRequest { int64 id = 1; int64 garden_id = 2; int64 cid = 3; } message GroupDelReply { GroupUpdateRequest origin = 1; } message GroupItem { int64 id = 1; string group_name = 2; string group_desc = 3; int64 user_count = 4; } message GroupListRequest { int64 garden_id = 1; int64 cid = 2; } message GroupListReply { repeated GroupItem list = 1; } message GroupInfoRequest { int64 id = 1; } message SystemGroupPermissionItem { // 父code,若没有则填空 string pcode = 1; // 小程序组件路径 string applete_path = 2; // 权限名字 string name = 3; // 是否拥有该权限 bool selected = 4; // 路由 string router = 5; string code = 6; // 组件路径 string path = 7; repeated SystemGroupPermissionItem childs = 8; } message GroupInfoReply { repeated SystemGroupPermissionItem list = 1; } message ResetPasswordRequest { string phone = 1; int64 uid = 2; uint32 vcode = 3; string password = 5; } message ResetPasswordData { // 用户id int64 uid = 1; // 用户名 string username = 2; // 小区名 string garden_name = 3; } message ResetPasswordReply { repeated ResetPasswordData list = 1; } message ChangePasswordRequest { int64 uid = 1; string old_password = 2; string new_password = 3; bool by_company = 4; } message ChangePasswordReply { } message DepartmentAddRequest { int64 garden_id = 1; int64 cid = 2; string department_name = 3; string desc = 4; } message DepartmentAddReply { int64 id = 1; } message DepartmentUpdateRequest { int64 garden_id = 1; string department_name = 2; string desc = 3; int64 id = 4; } message DepartmentUpdateReply { DepartmentUpdateRequest origin = 1; } message DepartmentDelRequest { int64 garden_id = 1; int64 id = 2; } message DepartmentDelReply { DepartmentUpdateRequest origin = 1; } message DepartmentItem { int64 id = 1; string department_name = 2; string desc = 3; string created_at = 4; } message DepartmentListRequest { int64 page = 1; int64 page_size = 2; int64 garden_id = 3; } message DepartmentListReply { int64 page = 1; int64 total = 2; repeated DepartmentItem list = 3; } message CompanyEnterGardenRequest { int64 garden_id = 1; int64 cid = 2; } message CompanyEnterGardenReply { string garden_name = 1; repeated SystemGroupPermissionData permissions = 2; } message GardenInfosRequest { repeated int64 ids = 1; } message GardenItem { // 物业公司id int64 cid = 1; // 省 string province = 2; string province_code = 3; // 市 string city = 4; string city_code = 5; // 区 string area = 6; string area_code = 7; // 街道 string street = 8; string street_code = 9; // 社区 string committee = 10; string committee_code = 11; // 小区名字 string garden_name = 12; // 小区地址 string garden_addr = 13; // 物业联系人 string property_person = 14; // 物业联系人手机号 string property_phone = 15; int64 id = 16; string garden_pic = 17; string garden_desc = 18; bool in_use = 19; // 经度 double lnt = 20; // 纬度 double lat = 21; repeated string appendix = 22; int32 status = 23; string feedback = 24; } message GardenInfosReply { repeated GardenItem list = 1; } message GardenAddRequest { // 物业公司id int64 cid = 1; // 省 string province = 2; string province_code = 3; // 市 string city = 4; string city_code = 5; // 区 string area = 6; string area_code = 7; // 街道 string street = 8; string street_code = 9; // 社区 string committee = 10; string committee_code = 11; // 小区名字 string garden_name = 12; // 小区地址 string garden_addr = 13; // 物业联系人 string property_person = 14; // 物业联系人手机号 string property_phone = 15; // 免费小区个数 int32 free_garden_count = 16; string garden_pic = 17; string garden_desc = 18; // 经度 double lnt = 19; // 纬度 double lat = 20; repeated string appendix = 21; } message GardenAddReply { int64 id = 1; } message GardenListRequest { int64 page = 1; int64 page_size = 2; int64 cid = 3; string committee_code = 4; bool need_appendix = 5; bool not_approved = 6; } message GardenListReply { int64 page = 1; int64 total = 2; repeated GardenItem list = 3; } message GardenUpdateRequest { // id int64 id = 1; // 省 string province = 2; string province_code = 3; // 市 string city = 4; string city_code = 5; // 区 string area = 6; string area_code = 7; // 街道 string street = 8; string street_code = 9; // 社区 string committee = 10; string committee_code = 11; // 小区名字 string garden_name = 12; // 小区地址 string garden_addr = 13; // 物业联系人 string property_person = 14; // 物业联系人手机号 string property_phone = 15; int64 cid = 16; string garden_pic = 17; string garden_desc = 18; // 经度 double lnt = 19; // 纬度 double lat = 20; } message GardenUpdateReply { GardenUpdateRequest origin = 1; } message GardenKeyInfoChangeRequest { int64 id = 1; int64 cid = 2; string province = 3; string province_code = 4; // 市 string city = 5; string city_code = 6; // 区 string area = 7; string area_code = 8; // 街道 string street = 9; string street_code = 10; // 社区 string committee = 11; string committee_code = 12; string garden_name = 13; } message GardenKeyInfoChangeReply { } message GardenKeyInfoChangeListRequest { int64 cid = 1; int64 garden_id = 2; int32 status = 3; int64 page = 4; int64 page_size = 5; } message GardenKeyInfoData { int32 status = 1; string garden_name = 2; string garden_detail = 3; int64 cid = 4; int64 garden_id = 5; int64 id = 6; string feedback = 7; repeated GardenKeyInfoItem list = 8; } message GardenKeyInfoItem { string field_name = 1; string field_value_src = 2; string field_value_dst = 3; } message GardenKeyInfoChangeListReply { int64 page = 1; int64 total = 2; repeated GardenKeyInfoData list = 3; } message GardenKeyInfoApproveRequest { int64 id = 1; string feedback = 2; bool status = 3; } message GardenKeyInfoApproveReply { } message GardenApproveRequest { int64 id = 1; string feedback = 2; bool status = 3; int64 cid = 4; } message GardenApproveReply { } message GardenDelRequest { int64 id = 1; int64 cid = 2; } message GardenDelReply { GardenUpdateRequest origin = 1; } message GardenChangeCompanyRequest { int64 garden_id = 1; int64 cid = 2; } message GardenChangeCompanyReply { GardenChangeCompanyRequest origin = 1; }