Select Git revision
organizations.proto
organizations.proto 1.38 KiB
syntax = "proto3";
import "google/protobuf/empty.proto";
import "common/common.proto";
option go_package = "git.perx.ru/perxis/perxis-go/organizations;organizations";
package account.organizations;
// Организация
message Organization {
string id = 1; // Идентификатор организации
string name = 2; // Имя организации
string description = 3; // Описание организации
string logo_url = 5; // URI изображения логотипа
optional string owner_id = 6;
}
// Запросы и ответы
message CreateRequest {
Organization org = 1;
}
message CreateResponse {
Organization created = 1;
}
message GetRequest {
string org_id = 1;
}
message GetResponse {
Organization org = 1;
}
message UpdateRequest {
Organization org = 1;
}
message DeleteRequest {
string org_id = 1;
}
message Filter {
repeated string ids = 3;
repeated string names = 4;
}
message FindRequest {
Filter filter = 1;
common.FindOptions opts = 2;
}
message FindResponse {
repeated Organization orgs = 1;
int64 total = 2;
}
service Organizations {
rpc Create(CreateRequest) returns(CreateResponse) {}
rpc Get(GetRequest) returns(GetResponse) {}
rpc Delete(DeleteRequest) returns(google.protobuf.Empty) {}
rpc Find(FindRequest) returns(FindResponse) {}
rpc Update(UpdateRequest) returns(google.protobuf.Empty) {}
}