syntax = "proto3"; // package声明符,用来防止不同的消息类型有命名冲突 package pb_v1; // 用于生成指定语言go的包名称 option go_package = "cp-system-management/pb/v1"; message CreateUserRequest{ string username = 1; string password = 2; } message CreateUserReply { int64 uid = 1; } message LoginRequest{ string username = 1; string password = 2; } message LoginReply { int64 uid = 1; } message ChangePasswordRequest{ int64 uid = 1; string password = 2; string old = 3; } message ChangePasswordReply { } message CreateOrganizationRequest{ string organization_name = 1; int64 month = 2; bool is_disable = 3; } message CreateOrganizationReply { string organization_code = 1; } message DeleteOrganizationRequest{ string organization_code = 1; } message DeleteOrganizationReply { } message Organization { string organization_name = 1; string organization_code = 2; int64 end_time = 3; bool is_disable = 4; bool is_expire = 5; string key = 6; } message UpdateOrganizationRequest{ string organization_name = 1; int64 month = 2; bool is_disable = 3; string organization_code = 4; } message UpdateOrganizationReply { UpdateOrganizationRequest origin = 1; } message OrganizationListRequest{ int64 page = 1; int64 page_size = 2; string filter = 3; } message OrganizationListReply { int64 total = 1; int64 page=2; repeated Organization list = 3; } message CreateOrganizationUserRequest{ string organization_code = 1; string username = 2; string password = 3; string phone = 4; string email = 5; } message CreateOrganizationUserReply { int64 uid = 1; } message OrganizationUserListRequest { int64 page = 1; int64 page_size = 2; string organization_code = 3; } message OrganizationUserItem { string organization_code = 1; string username = 2; string phone = 3; string email = 4; int64 id = 5; string created_at = 6; } message OrganizationUserListReply { int64 total = 1; int64 page = 2; repeated OrganizationUserItem list = 3; } message OrganizationUserUpdateRequest { string organization_code = 1; string username = 2; string phone = 3; string email = 4; int64 id = 5; string password = 6; } message OrganizationUserUpdateReply { OrganizationUserUpdateRequest origin = 1; } message OrganizationUserResetPasswordRequest { string organization_code = 1; int64 id = 2; string password = 3; } message OrganizationUserResetPasswordReply { } message SystemLogAddRequest { string username = 1; int64 uid = 2; string action = 3; string module = 4; int64 created_at = 6; string origin = 7; string target = 8; } message SystemLogAddReply { } message SystemLogListRequest { int64 page = 1; int64 page_size = 2; string username = 3; string action = 4; string filter = 5; string module = 6; int64 start = 7; int64 end = 8; } message SystemLogItem { // 账号名 string username = 1; // 账号id int64 uid = 2; // 行为 string action = 3; // 模块 string module = 4; // 时间 string created_at = 6; // 修改前信息 string origin = 7; // 修改后信息 string target = 8; // 日志id int64 id = 9; } message SystemLogListReply { int64 total = 1; int64 page = 2; repeated SystemLogItem list = 3; } message OrganizationKeyAuthRequest { string key = 1; } message OrganizationKeyAuthReply { string organization_code = 1; string organization_name = 2; int64 end_time = 3; bool is_disable = 4; }