101 lines
1.7 KiB
Protocol Buffer
101 lines
1.7 KiB
Protocol Buffer
syntax = "proto3";
|
|
package pressreleases;
|
|
//import "descriptor.proto";
|
|
//import "validator.proto";
|
|
|
|
option go_package = "./;pressreleases";
|
|
|
|
service PressReleases{
|
|
rpc List(ListReq) returns (ListResp) {}
|
|
rpc Display(DisplayReq) returns (DisplayResp) {}
|
|
rpc Edit(EditReq) returns (EditResp) {}
|
|
rpc Create(CreateReq) returns (CreateResp) {}
|
|
rpc Delete(DeleteReq) returns (DeleteResp) {}
|
|
rpc Get(GetReq) returns (GetResp) {}
|
|
}
|
|
|
|
message Item{
|
|
uint32 id = 1;
|
|
string title = 2;
|
|
uint64 createdAt = 3;
|
|
uint32 sort = 4;
|
|
string content = 5;
|
|
string attachment = 6;
|
|
uint64 updatedAt = 7;
|
|
string operator = 8;
|
|
int32 operatorId = 9;
|
|
}
|
|
|
|
message ListReq{
|
|
string title = 1;
|
|
uint64 startTime = 2;
|
|
uint64 endTime = 3;
|
|
uint32 status = 4;
|
|
uint32 display = 5;
|
|
int32 page = 6;
|
|
int32 pageSize = 7;
|
|
}
|
|
|
|
message ListResp{
|
|
uint64 total = 1;
|
|
repeated Item data = 2;
|
|
}
|
|
|
|
message DisplayReq{
|
|
|
|
}
|
|
|
|
message DisplayResp{
|
|
repeated Item data = 1;
|
|
}
|
|
|
|
message EditReq{
|
|
uint32 id = 1;
|
|
string title = 2;
|
|
uint64 createdAt = 3;
|
|
uint32 sort = 4;
|
|
string content = 5;
|
|
string attachment = 6;
|
|
uint32 status = 7;
|
|
string operator = 8;
|
|
int32 operatorId = 9;
|
|
|
|
}
|
|
|
|
message EditResp{
|
|
}
|
|
|
|
message CreateReq{
|
|
string title = 1;
|
|
uint64 createdAt = 2;
|
|
uint32 sort = 3;
|
|
string content = 4;
|
|
string attachment = 5;
|
|
uint32 status = 6;
|
|
string operator = 7;
|
|
int32 operatorId = 8;
|
|
}
|
|
|
|
message CreateResp{
|
|
|
|
}
|
|
|
|
message DeleteReq{
|
|
uint32 id = 1;
|
|
}
|
|
|
|
message DeleteResp{
|
|
|
|
}
|
|
|
|
message GetReq{
|
|
int64 id = 1;
|
|
}
|
|
|
|
message GetResp{
|
|
uint32 id = 1;
|
|
string title = 2;
|
|
uint64 createdAt = 3;
|
|
string content = 4;
|
|
string attachment = 5;
|
|
} |