syntax = "proto3"; // package声明符,用来防止不同的消息类型有命名冲突 package pb_v1; // 用于生成指定语言go的包名称 option go_package = "cp-organization-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; } message ChangePasswordReply { } message CreateOrganizationRequest{ string organization_name = 1; int64 month = 2; int64 state = 3; } message CreateOrganizationReply { int64 uid = 1; } message DeleteOrganizationRequest{ string organization_code = 1; } message DeleteOrganizationReply { } message Organization { string organization_name = 1; string organization_code = 2; int64 state = 3; // "1 有效,2 停用,3过期,"` int64 end_time = 4; } message UpdateOrganizationRequest{ string organization_name = 1; int64 month = 2; int64 state = 3; string organization_code = 4; } message UpdateOrganizationReply { } message OrganizationListRequest{ int64 page = 1; int64 page_size = 2; } message OrganizationListReply { int64 count = 1; int64 page=2; repeated Organization organization = 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 OrganizationKeyAuthRequest { string key = 1; } message OrganizationKeyAuthReply { string organization_code = 1; string organization_name = 2; int64 end_time = 3; bool is_disable = 4; }