syntax = "proto3"; package bet.beteran.c2se.site; import "protobuf/rpc.proto"; import "protobuf/pagination.proto"; import "models/site.proto"; message CreateSiteRequest { string url = 1; optional string name = 2; optional string path = 3; bool show = 4; bool can_use = 5; optional string memo = 6; optional uint64 expires_at = 7; } message CreateSiteResponse { message Result { bet.beteran.site.Site site = 1; } optional bet.protobuf.rpc.Error error = 1; optional Result result = 2; } message ListSitesRequest { message Search { optional string url_like = 1; optional string name_like = 2; optional string path_like = 3; optional bool show = 4; optional bool can_use = 5; optional string memo_like = 6; } optional bet.protobuf.pagination.Pagination pagination = 1; repeated bet.protobuf.pagination.Sort sorts = 2; optional Search search = 3; } message ListSitesResponse { message Result { repeated bet.beteran.site.Site sites = 1; } optional bet.protobuf.rpc.Error error = 1; optional Result result = 2; } message GetSiteRequest { string id = 1; } message GetSiteResponse { message Result { bet.beteran.site.Site site = 1; } optional bet.protobuf.rpc.Error error = 1; optional Result result = 2; } message UpdateSiteRequest { string id = 1; string url = 2; optional string name = 3; optional string path = 4; bool show = 5; bool can_use = 6; optional string memo = 7; optional uint64 expires_at = 8; } message UpdateSiteResponse { message Result { bet.beteran.site.Site site = 1; } optional bet.protobuf.rpc.Error error = 1; optional Result result = 2; } message DeleteSiteRequest { string id = 1; } message DeleteSiteResponse { message Result { } optional bet.protobuf.rpc.Error error = 1; optional Result result = 2; }