2022-07-28 09:18:01 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
package approval;
|
2022-08-04 03:07:55 +00:00
|
|
|
import "github.com/mwitkow/go-proto-validators/validator.proto";
|
2022-07-28 09:18:01 +00:00
|
|
|
|
|
|
|
option go_package = "./;approval";
|
|
|
|
|
|
|
|
// The approval service definition.
|
|
|
|
service Approval {
|
|
|
|
|
2022-07-29 09:08:00 +00:00
|
|
|
rpc Create(CreateRequest) returns (ApprovalResponse) {};
|
2022-10-14 08:48:45 +00:00
|
|
|
rpc UsedNumByUser(UsedNumByUserRequest) returns (UsedNumByUserResponse) {};//获取此用户能创建多少个画展包
|
|
|
|
rpc UpdateExhibitionApplyID(UpdateEhApplyIDRequest) returns (UpdateEhApplyIDResponse) {};//同步画展包的ID
|
|
|
|
|
2022-07-29 09:08:00 +00:00
|
|
|
rpc Detail(DetailRequest) returns (CreateRequest) {};
|
|
|
|
rpc Update(CreateRequest) returns (ApprovalResponse) {};
|
2022-08-18 05:26:14 +00:00
|
|
|
rpc Remove(RemoveRequest) returns (RemoveResponse) {};
|
|
|
|
rpc MyWork(ListRequest) returns (ListResponse) {};// 我的工作---待处理
|
|
|
|
rpc MySubmit(ListRequest) returns (ListResponse) {};// 我的提交
|
2022-08-16 10:45:28 +00:00
|
|
|
rpc NowLevelByInfo(NowLevelByInfoRequest) returns (WorkFlowResponse) {};
|
2022-07-29 07:40:30 +00:00
|
|
|
rpc Information(InformationRequest) returns (InformationResponse) {};
|
|
|
|
rpc Viewed(ViewedRequest) returns (ApprovalResponse) {};
|
2022-08-04 03:58:33 +00:00
|
|
|
rpc SetStatus(StatusRequest) returns (StatusResponse) {};
|
2022-07-28 09:18:01 +00:00
|
|
|
rpc DetailSetting(DetailSettingRequest) returns (SettingRequest) {};
|
|
|
|
rpc UpdateSetting(SettingRequest) returns (SettingResponse) {};
|
|
|
|
|
2022-08-16 10:45:28 +00:00
|
|
|
rpc CreateType(CreateTypeRequest) returns (TypeResponse) {};
|
|
|
|
rpc DetailType(TypeResponse) returns (CreateTypeRequest) {};
|
|
|
|
rpc UpdateType(CreateTypeRequest) returns (TypeResponse) {};
|
|
|
|
rpc AllType(CommonRequest) returns (AllTypeResponse) {};
|
2022-08-23 08:20:06 +00:00
|
|
|
rpc RemoveType(RemoveRequest) returns (StatusResponse) {};
|
2022-08-16 10:45:28 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2022-10-14 08:48:45 +00:00
|
|
|
message UpdateEhApplyIDRequest {
|
|
|
|
string Domain = 1 [json_name = "domain"];
|
|
|
|
uint64 ApprovalID = 2 [json_name = "approvalID"];
|
|
|
|
uint64 ApplyId = 3 [json_name = "applyId"];
|
|
|
|
}
|
|
|
|
|
|
|
|
message UpdateEhApplyIDResponse {
|
|
|
|
}
|
|
|
|
|
|
|
|
message UsedNumByUserRequest {
|
|
|
|
string Domain = 1 [json_name = "domain"];
|
|
|
|
uint64 SubmitterID = 2 [json_name = "submitterID"];
|
|
|
|
}
|
|
|
|
|
|
|
|
message UsedNumByUserResponse {
|
|
|
|
uint64 total = 1 [json_name = "total"];
|
|
|
|
}
|
|
|
|
|
2022-08-16 10:45:28 +00:00
|
|
|
message NowLevelByInfoRequest {
|
|
|
|
string Domain = 1 [json_name = "domain"];
|
|
|
|
uint64 ApprovalID = 2 [json_name = "ApprovalID"];
|
|
|
|
}
|
|
|
|
|
|
|
|
message WorkFlowResponse {
|
|
|
|
uint64 ID = 2 [json_name = "ID"];
|
|
|
|
string Reply = 3 [json_name = "Reply"];
|
|
|
|
uint64 Status = 5 [json_name = "status"];
|
|
|
|
uint64 UserID = 7 [json_name = "userID"];
|
|
|
|
}
|
|
|
|
|
|
|
|
message CommonRequest {
|
|
|
|
string Domain = 1 [json_name = "domain"];
|
2022-08-18 05:26:14 +00:00
|
|
|
uint64 Page = 2 [json_name = "Page"];
|
|
|
|
uint64 PageSize = 3 [json_name = "pageSize"];
|
2022-08-16 10:45:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message CreateTypeRequest {
|
|
|
|
string Domain = 1 [json_name = "domain"];
|
|
|
|
uint64 ID = 2 [json_name = "ID"];
|
|
|
|
string Title = 3 [json_name = "title"];
|
2022-08-25 07:11:03 +00:00
|
|
|
string Remark = 5 [json_name = "remark"];
|
|
|
|
string KeyWord = 6 [json_name = "keyWord"];
|
2022-08-16 10:45:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message TypeResponse {
|
|
|
|
uint64 ID = 1;
|
|
|
|
string Domain = 2;
|
2022-08-04 03:58:33 +00:00
|
|
|
}
|
2022-08-16 10:45:28 +00:00
|
|
|
|
|
|
|
message AllTypeResponse {
|
|
|
|
repeated CreateTypeRequest Data = 1;
|
|
|
|
uint64 Count = 2;
|
|
|
|
}
|
|
|
|
|
2022-08-04 03:58:33 +00:00
|
|
|
message StatusRequest {
|
2022-08-16 10:45:28 +00:00
|
|
|
string Domain = 1 [json_name = "domain"];
|
|
|
|
uint64 ID = 2 [json_name = "ID"];
|
|
|
|
string Reply = 3 [json_name = "Reply"];
|
|
|
|
uint64 WorkFlowId = 4 [json_name = "workFlowId"];
|
2022-09-08 07:28:28 +00:00
|
|
|
uint64 Status = 5 [json_name = "status",(validator.field) = {int_lt: 4,int_gt: 0,human_error: "70008"}];
|
2022-08-16 10:45:28 +00:00
|
|
|
uint64 Level = 6 [json_name = "level"];
|
2022-08-04 03:58:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message StatusResponse {
|
|
|
|
|
2022-07-29 07:40:30 +00:00
|
|
|
}
|
2022-07-28 09:18:01 +00:00
|
|
|
|
2022-07-30 08:44:54 +00:00
|
|
|
message ListRequest {
|
2022-09-08 07:28:28 +00:00
|
|
|
string Domain = 1 [json_name = "domain",(validator.field) = {string_not_empty: true,human_error: "70001"} ];
|
2022-08-12 05:24:33 +00:00
|
|
|
uint64 PageSize = 2 [json_name = "PageSize"]; //
|
|
|
|
uint64 Page = 3 [json_name = "Page"]; //
|
2022-08-18 05:26:14 +00:00
|
|
|
uint64 Status = 4 [json_name = "status"];//0待审批 1-审批成功 2-拒绝 4-是所有
|
2022-07-30 08:44:54 +00:00
|
|
|
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"];
|
|
|
|
}
|
|
|
|
|
2022-07-29 07:40:30 +00:00
|
|
|
message ViewedRequest {
|
|
|
|
string Domain = 1 [json_name = "domain"];
|
|
|
|
uint64 ID = 2 [json_name = "ID"];
|
|
|
|
uint64 UserID = 3 [json_name = "userID"];
|
|
|
|
}
|
2022-07-28 09:18:01 +00:00
|
|
|
|
2022-07-29 07:40:30 +00:00
|
|
|
message InformationRequest {
|
|
|
|
string Domain = 1 [json_name = "domain"];
|
|
|
|
uint64 UserID = 2 [json_name = "userID"];
|
|
|
|
string Type = 3 [json_name = "type"];
|
|
|
|
}
|
2022-07-28 09:18:01 +00:00
|
|
|
|
2022-07-29 07:40:30 +00:00
|
|
|
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"]; // 抄送给我的;
|
2022-07-28 09:18:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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"];
|
2022-07-29 07:40:30 +00:00
|
|
|
uint64 WorkID =2 [json_name = "WorkID"];
|
|
|
|
uint64 ApprovalID =3 [json_name = "ApprovalID"];
|
|
|
|
uint64 ArtworkID =4 [json_name = "artworkID"];
|
2022-07-28 09:18:01 +00:00
|
|
|
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"];
|
2022-07-29 07:40:30 +00:00
|
|
|
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"];
|
2022-10-14 08:48:45 +00:00
|
|
|
string Address =8 [json_name = "address"];
|
2022-07-28 09:18:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message Exhibition {
|
2022-08-18 05:26:14 +00:00
|
|
|
uint64 ID =1 [json_name = "ID"];
|
|
|
|
string ReceivedAt =2 [json_name = "receivedAt"];
|
|
|
|
string Address =3 [json_name = "address"];
|
|
|
|
uint64 PidApprovalID =4 [json_name = "pidApprovalID"];
|
|
|
|
repeated ApprovalExhibition ApprovalExhibitions = 5 [json_name = "approvalExhibitions"];
|
2022-10-14 08:48:45 +00:00
|
|
|
uint64 Num = 6 [json_name = "num"];
|
|
|
|
uint64 ApplyID = 7 [json_name = "applyID"];
|
2022-07-28 09:18:01 +00:00
|
|
|
}
|
|
|
|
|
2022-07-29 09:08:00 +00:00
|
|
|
message CreateRequest {
|
2022-08-16 10:45:28 +00:00
|
|
|
uint64 ID = 1 [json_name = "ID"];
|
2022-09-08 07:28:28 +00:00
|
|
|
string Domain = 2 [json_name = "domain",(validator.field) = {string_not_empty: true,human_error: "70001"} ];
|
2022-08-18 05:26:14 +00:00
|
|
|
uint64 Status = 3 [json_name = "status"];
|
2022-09-08 07:28:28 +00:00
|
|
|
string Type = 4 [json_name = "type",(validator.field) = {string_not_empty: true,human_error: "70009"} ];
|
2022-08-16 10:45:28 +00:00
|
|
|
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"];//回复
|
2022-08-23 08:20:06 +00:00
|
|
|
bool CanView = 12 [json_name = "canView"];//是否可以阅读
|
2022-08-16 10:45:28 +00:00
|
|
|
Work Work = 13 [json_name = "work"];
|
|
|
|
Show Show = 14 [json_name = "show"];
|
|
|
|
Exhibition Exhibition = 15 [json_name = "exhibition"];
|
|
|
|
Bundle Bundle = 16 [json_name = "bundle"];
|
|
|
|
repeated ApprovalUser ApprovalUsers= 17 [json_name = "approvalUsers"];//审批的人
|
|
|
|
bool CanApproval = 18 [json_name = "canApproval"];//审批的人
|
|
|
|
repeated WorkFlow WorkFlows = 19 [json_name = "workFlows"];//审批的人
|
2022-08-18 05:26:14 +00:00
|
|
|
uint64 AllStatus = 20 [json_name = "allStatus"];//状态 0 1 2 3已阅读 4-待阅读
|
|
|
|
uint64 NowUserId = 21 [json_name = "nowUserId"];
|
|
|
|
string NowUserName = 22 [json_name = "nowUserName"];
|
|
|
|
uint64 Level = 23 [json_name = "level"];
|
|
|
|
uint64 NowLevel = 24 [json_name = "nowLevel"];
|
2022-08-23 08:20:06 +00:00
|
|
|
string CreatedAt = 25 [json_name = "createdAt"];
|
2022-08-16 10:45:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message WorkFlow {
|
|
|
|
uint64 ID = 1 [json_name = "ID"];
|
|
|
|
uint64 UserID = 3 [json_name = "userID"];
|
|
|
|
string Name = 4 [json_name = "name"];
|
|
|
|
uint64 Level = 5 [json_name = "level"];
|
|
|
|
uint64 Status = 6 [json_name = "status"];
|
|
|
|
string Reply = 7 [json_name = "reply"];
|
|
|
|
string OperatedAt = 8 [json_name = "operatedAt"];
|
2022-07-28 09:18:01 +00:00
|
|
|
}
|
|
|
|
|
2022-07-29 09:08:00 +00:00
|
|
|
message DetailRequest {
|
2022-07-28 09:18:01 +00:00
|
|
|
uint64 ID=1 [json_name = "ID"];
|
|
|
|
string Domain=2 [json_name = "domain"];
|
2022-08-18 05:26:14 +00:00
|
|
|
uint64 UserId=3 [json_name = "userId"];
|
2022-07-28 09:18:01 +00:00
|
|
|
}
|
|
|
|
|
2022-08-18 05:26:14 +00:00
|
|
|
message RemoveRequest {
|
|
|
|
repeated uint64 IDs=1 [json_name = "IDs"];
|
|
|
|
string Domain=2 [json_name = "domain"];
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-07-28 09:18:01 +00:00
|
|
|
message ApprovalResponse {
|
|
|
|
uint64 ID=1 [json_name = "ID"];
|
|
|
|
bool Success=2 [json_name = "success"];
|
|
|
|
}
|
|
|
|
|
2022-07-29 09:08:00 +00:00
|
|
|
message RemoveResponse {
|
2022-07-28 09:18:01 +00:00
|
|
|
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"];
|
2022-07-29 07:40:30 +00:00
|
|
|
uint64 ApprovalID=5 [json_name = "approvalID"];
|
|
|
|
uint64 ExhibitionID=6 [json_name = "exhibitionID"];
|
2022-07-28 09:18:01 +00:00
|
|
|
string ExhibitionName=7 [json_name = "exhibitionName"];
|
2022-07-29 07:40:30 +00:00
|
|
|
uint64 ArtworkID=8 [json_name = "artworkID"];
|
2022-07-28 09:18:01 +00:00
|
|
|
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 {
|
2022-07-30 03:41:22 +00:00
|
|
|
uint64 ID =1 [json_name = "ID"];
|
|
|
|
string Name =2 [json_name = "name"];
|
|
|
|
bool IsViewed =3 [json_name = "isViewed"];
|
2022-07-28 09:18:01 +00:00
|
|
|
}
|
|
|
|
|
2022-08-16 10:45:28 +00:00
|
|
|
message ApprovalUser {
|
|
|
|
uint64 ID =1 [json_name = "ID"];
|
|
|
|
string Name =2 [json_name = "name"];
|
|
|
|
string Level =3 [json_name = "Level"];
|
|
|
|
}
|
|
|
|
|
2022-07-28 09:18:01 +00:00
|
|
|
message SettingRequest {
|
2022-08-16 10:45:28 +00:00
|
|
|
uint64 ID = 1 [json_name = "ID"];
|
|
|
|
uint64 DeletedAt = 2 [json_name = "deletedAt"];
|
|
|
|
string CreatedAt = 3 [json_name = "createdAt"];
|
|
|
|
string UpdatedAt = 4 [json_name = "updatedAt"];
|
|
|
|
string KeyWord = 5 [json_name = "keyWord"];
|
|
|
|
repeated CopyUser CopyUsers = 6 [json_name = "copyUsers"];
|
|
|
|
repeated ApprovalUser ApprovalUsers = 9 [json_name = "approvalUsers"];
|
|
|
|
string Domain = 10 [json_name = "domain"];
|
2022-07-28 09:18:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message DetailSettingRequest {
|
2022-08-16 10:45:28 +00:00
|
|
|
string KeyWord=1 [json_name = "keyWord"];
|
2022-07-28 09:18:01 +00:00
|
|
|
string Domain=2 [json_name = "domain"];
|
|
|
|
}
|
|
|
|
|
|
|
|
message SettingResponse {
|
|
|
|
uint64 ID=1 [json_name = "ID"];
|
|
|
|
bool Success=2 [json_name = "success"];
|
|
|
|
}
|