192 lines
7.0 KiB
Protocol Buffer
192 lines
7.0 KiB
Protocol Buffer
syntax = "proto3";
|
|
package approval;
|
|
|
|
option go_package = "./;approval";
|
|
|
|
// The approval service definition.
|
|
service Approval {
|
|
|
|
rpc Create(CreateRequest) returns (ApprovalResponse) {};
|
|
rpc Detail(DetailRequest) returns (CreateRequest) {};
|
|
rpc Update(CreateRequest) returns (ApprovalResponse) {};
|
|
rpc Remove(DetailRequest) returns (RemoveResponse) {};
|
|
rpc List(ListRequest) returns (ListResponse) {};
|
|
rpc Information(InformationRequest) returns (InformationResponse) {};
|
|
rpc Viewed(ViewedRequest) returns (ApprovalResponse) {};
|
|
|
|
rpc DetailSetting(DetailSettingRequest) returns (SettingRequest) {};
|
|
rpc UpdateSetting(SettingRequest) returns (SettingResponse) {};
|
|
|
|
}
|
|
|
|
message ListRequest {
|
|
string Domain = 1 [json_name = "domain"];
|
|
uint64 Limit = 2 [json_name = "limit"]; //
|
|
uint64 Offset = 3 [json_name = "offset"]; //
|
|
uint64 Status = 4 [json_name = "status"];//0待审批 1-审批成功 2-拒绝
|
|
string Type = 5 [json_name = "type"]; //类型
|
|
uint64 UserID = 6 [json_name = "userID"]; //
|
|
}
|
|
|
|
message ListResponse {
|
|
uint64 Count = 1 [json_name = "count"];
|
|
repeated CreateRequest data = 2 [json_name = "data"];
|
|
}
|
|
|
|
message ViewedRequest {
|
|
string Domain = 1 [json_name = "domain"];
|
|
uint64 ID = 2 [json_name = "ID"];
|
|
uint64 UserID = 3 [json_name = "userID"];
|
|
}
|
|
|
|
message InformationRequest {
|
|
string Domain = 1 [json_name = "domain"];
|
|
uint64 UserID = 2 [json_name = "userID"];
|
|
string Type = 3 [json_name = "type"];
|
|
}
|
|
|
|
message Information {
|
|
uint64 Total = 1 [json_name = "total"]; // 已提交的审批 (总量)
|
|
uint64 DoingTotal = 2 [json_name = "doingTotal"]; // 正在审批数量
|
|
uint64 SuccessTotal = 3 [json_name = "successTotal"]; // 审批完成数量
|
|
uint64 FailTotal = 4 [json_name = "failTotal"]; // 审批未通过
|
|
}
|
|
|
|
message InformationResponse {
|
|
Information MySubmitInfo = 1 [json_name = "mySubmitInfo"]; // 我提交的;
|
|
Information SubmitMeInfo = 2 [json_name = "submitMeInfo"]; // 提交给我的;
|
|
Information DomainInfo = 3 [json_name = "domainInfo"]; // 大盘数据;
|
|
//Information CopyMeInfo = 4 [json_name = "copyMeInfo"]; // 抄送给我的;
|
|
}
|
|
|
|
message Bundle {
|
|
uint64 ID = 1 [json_name = "ID"];
|
|
string ReturnAt = 2 [json_name = "returnAt"];
|
|
string ReceivedAt = 3 [json_name = "receivedAt"];
|
|
uint64 ApplicationsNum = 4 [json_name = "applicationsNum"];
|
|
}
|
|
|
|
message Show {
|
|
uint64 ID =1 [json_name = "ID"];
|
|
uint64 ArtistNum =2 [json_name = "artistNum"];
|
|
string ShowAt =3 [json_name = "ShowAt"];
|
|
}
|
|
|
|
message ApprovalWork {
|
|
uint64 ID =1 [json_name = "ID"];
|
|
uint64 WorkID =2 [json_name = "WorkID"];
|
|
uint64 ApprovalID =3 [json_name = "ApprovalID"];
|
|
uint64 ArtworkID =4 [json_name = "artworkID"];
|
|
string ArtworkName =5 [json_name = "artworkName"];
|
|
string ArtistName =6 [json_name = "artistName"];
|
|
string ArtworkCover =7 [json_name = "artworkCover"];
|
|
uint64 ArtworkNumber =8 [json_name = "artworkNumber"];
|
|
}
|
|
|
|
message Work {
|
|
uint64 ID =1 [json_name = "ID"];
|
|
string ReturnAt = 2 [json_name = "returnAt"];
|
|
string ReceivedAt = 3 [json_name = "receivedAt"];
|
|
repeated ApprovalWork ApprovalWorks = 4 [json_name = "approvalWorks"];
|
|
}
|
|
|
|
|
|
message ApprovalExhibition {
|
|
uint64 ID =1 [json_name = "ID"];
|
|
uint64 ExhibitionID =2 [json_name = "exhibitionID"];
|
|
uint64 ApprovalID =3 [json_name = "approvalID"];
|
|
string PackageName =4 [json_name = "packageName"];
|
|
uint64 PackageID =5 [json_name = "packageID"];
|
|
uint64 PackageSize =6 [json_name = "packageSize"];
|
|
string PackageNumber =7 [json_name = "packageNumber"];
|
|
}
|
|
|
|
message Exhibition {
|
|
uint64 ID =1 [json_name = "ID"];
|
|
string ReceivedAt =2 [json_name = "receivedAt"];
|
|
string Address =3 [json_name = "address"];
|
|
repeated ApprovalExhibition ApprovalExhibitions = 4 [json_name = "approvalExhibitions"];
|
|
}
|
|
|
|
message CreateRequest {
|
|
uint64 ID = 1 [json_name = "ID"];
|
|
string Domain = 2 [json_name = "domain"];
|
|
uint64 Status = 3 [json_name = "status"];//0待审批 1-审批成功 2-拒绝
|
|
string Type = 4 [json_name = "type"]; //类型
|
|
uint64 ApproverID = 5 [json_name = "approverID"];//申请人
|
|
string ApproverName = 6 [json_name = "approverName"];
|
|
uint64 SubmitterID = 7 [json_name = "submitterID"];//审批人
|
|
string SubmitterName = 8 [json_name = "submitterName"];
|
|
repeated CopyUser CopyUsers = 9 [json_name = "copyName"];//抄送人
|
|
string Content = 10 [json_name = "content"];//申请内容
|
|
string Reply = 11 [json_name = "reply"];//回复
|
|
bool IsViewed = 12 [json_name = "IsViewed"];//抄送人是否查看过
|
|
Work Work = 13 [json_name = "work"];
|
|
Show Show = 14 [json_name = "show"];
|
|
Exhibition Exhibition = 15 [json_name = "exhibition"];
|
|
Bundle Bundle = 16 [json_name = "bundle"];
|
|
}
|
|
|
|
message DetailRequest {
|
|
uint64 ID=1 [json_name = "ID"];
|
|
string Domain=2 [json_name = "domain"];
|
|
}
|
|
|
|
message ApprovalResponse {
|
|
uint64 ID=1 [json_name = "ID"];
|
|
bool Success=2 [json_name = "success"];
|
|
}
|
|
|
|
message RemoveResponse {
|
|
bool Success=1 [json_name = "success"];
|
|
}
|
|
|
|
message ApprovalExhibitionRemove {
|
|
bool Success=1 [json_name = "success"];
|
|
}
|
|
|
|
message ApprovalExhibitionRequest {
|
|
uint64 ID=1 [json_name = "ID"];
|
|
uint64 DeletedAt=2 [json_name = "deletedAt"];
|
|
string CreatedAt=3 [json_name = "createdAt"];
|
|
string UpdatedAt=4 [json_name = "updatedAt"];
|
|
uint64 ApprovalID=5 [json_name = "approvalID"];
|
|
uint64 ExhibitionID=6 [json_name = "exhibitionID"];
|
|
string ExhibitionName=7 [json_name = "exhibitionName"];
|
|
uint64 ArtworkID=8 [json_name = "artworkID"];
|
|
string ExhibitionSize=9 [json_name = "exhibitionSize"];
|
|
string ExhibitionNumber=10 [json_name = "exhibitionNumber"];
|
|
}
|
|
|
|
message ApprovalExhibitionDetail {
|
|
uint64 ID=1 [json_name = "ID"];
|
|
string Domain=2 [json_name = "domain"];
|
|
}
|
|
|
|
message CopyUser {
|
|
uint64 ID =1 [json_name = "ID"];
|
|
string Name =2 [json_name = "name"];
|
|
bool IsViewed =3 [json_name = "isViewed"];
|
|
}
|
|
|
|
message SettingRequest {
|
|
uint64 ID=1 [json_name = "ID"];
|
|
uint64 DeletedAt=2 [json_name = "deletedAt"];
|
|
string CreatedAt=3 [json_name = "createdAt"];
|
|
string UpdatedAt=4 [json_name = "updatedAt"];
|
|
uint64 DepartmentID=5 [json_name = "departmentID"];
|
|
repeated CopyUser CopyUsers=6 [json_name = "copyUsers"];
|
|
uint64 ApproverID=7 [json_name = "approverID"];
|
|
string ApproverName=8 [json_name = "approverName"];
|
|
string Domain=9 [json_name = "domain"];
|
|
}
|
|
|
|
message DetailSettingRequest {
|
|
uint64 DepartmentID=1 [json_name = "departmentID"];
|
|
string Domain=2 [json_name = "domain"];
|
|
}
|
|
|
|
message SettingResponse {
|
|
uint64 ID=1 [json_name = "ID"];
|
|
bool Success=2 [json_name = "success"];
|
|
} |