fonchain-artistinfo/pb/artistinfoArtwork.proto
2023-03-15 18:08:37 +08:00

177 lines
6.0 KiB
Protocol Buffer
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

syntax = "proto3";
package artistinfo;
option go_package = "./;artistInfoArtwork";
import "validate.proto";
import public "google/protobuf/timestamp.proto";
import "google/protobuf/empty.proto"; //使用 google.protobuf.Empty
// protoc -I . -I ./pb --proto_path=. --go_out=./pb/artistInfoArtwork --go-triple_out=./pb/artistInfoArtwork --validate_out="lang=go:./pb/artistInfoArtwork" ./pb/artistinfoArtwork.proto
service ArtistInfoArtwork {
//画作相关
rpc CreateArtworkLockRecord(CreateArtworkLockRecordReq)returns(ArtworkCommonNoParams){} //创建画作锁状态记录
rpc ArtworkLockAction(ArtworkLockActionRequest)returns(ArtworkCommonNoParams){} //修改状态锁
rpc GetArtworkLockRecords(GetArtworkLockRecordsRequest)returns(ArtworkLockList){} //获取画作uid列表
rpc GetArtworkLockHistoryGroup(GetArtworkLockHistoryRequest)returns(GetArtworkLockHistoryResponse){}//获取化作锁定时间分组记录
rpc DeleteArtworkRecord(DeleteArtworkRecordRequest)returns(ArtworkCommonNoParams){} //删除画作锁记录
rpc GetArtworkLockDetail(GetArtworkLockDetailRequest)returns(ArtistLockInfo){}//查询画作锁定详情
rpc UpdateArtworkAuditStatus(UpdateArtworkAuditStatusRequest)returns(ArtworkCommonNoParams){}//更新画作审批状态
rpc CheckArtworkBaseInfoEditable(ArtworkUidRequest)returns(CheckArtworkEditableResponse){}//查询画作基本信息是否可编辑
rpc CheckArtworkSupplementInfoEditable(ArtworkUidRequest)returns(CheckArtworkEditableResponse){}//查询画作补充信息是否可编辑
rpc GenerateArtworkSupplementInfo(ArtworkUidsRequest)returns(google.protobuf.Empty){}//查询画作补充信息是否可编辑
rpc ArtistArtworkStatic(ArtistArtworkStaticRequest)returns(ArtistArtworkStaticResponse){}//查询审核通过的画作数量统计
}
message ArtworkCommonNoParams{}
message ArtworkUidRequest{
string ArtworkUid =1 [(validate.rules).message.required = true]; //画作uid
}
message ArtworkUidsRequest{
repeated string ArtworkUids =1 [(validate.rules).message.required = true]; //画作uid列表
}
message CreateArtworkLockRecordReq{
string artistUid=1 [(validate.rules).message.required = true];//画家uid
string artworkUid=2 [(validate.rules).message.required = true];//画作uid
int64 status=3;//画作锁定状态,按业务逻辑不用传
string lockTime=4;
}
message ArtworkLockActionRequest{
string artistUid =1 ;//画家uid
int32 lock =2; //2=锁定 3=解锁
string lockTime=3;//锁定时间与sys_user表的latest_lock_time一致。
}
enum ArtworkQueryMode {
Non=0;
NowPreSaveArtwork = 1; //当前暂存的画作
NowLockedArtwork = 2; //当前已锁定的画作
NowPreSaveAndLocked=3;//当前暂存的和已锁定的画作
NowAuditFlowOfBase= 4; //当前处于基本数据审核流程中的画作
NowAuditFlowOfSupplementing = 5; //当前处于数据补充流程中的画作
AllUnlockArtwork = 6; //所有已解锁的画作(历史画作)
AllAuditPassArtwork=7; //所有审批已通过的画作
}
message GetArtworkLockRecordsRequest{
string artistUid =1 [(validate.rules).message.required = true];//画家uid
ArtworkQueryMode queryType =2 ; //查询模式
int64 AuditStatus =3; //审批状态 可选
}
message ArtistLockInfo{
string artistUid=1;
string artworkUid=2;
int64 status=3;
string lockTime=4;
int64 createdAt=5;
int64 updatedAt=6;
int64 deletedAt=7;
//基本信息审批状态
int32 baseAuditStatus=12;
string baseAuditMark=13;
string baseAuditMark2=14;
//补充信息审批状态
int32 supplementAuditStatus=15;
string supplementAuditMark=16;
string supplementAuditMark2=17;
// 当前审批流位置
int32 auditFlowIndex =18;
//是否用户可编辑
bool baseEditable =19;
bool supplementEditable=20;
}
message ArtworkLockList{
repeated ArtistLockInfo data =1; //画作uid列表
}
message ArtworkUidList{
repeated string artworkUids =1 ;
}
message DeleteArtworkRecordRequest{
repeated string artworkUids =1 ;
}
message GetArtworkLockHistoryRequest{
string artistUid=1;
}
message GetArtworkLockDetailRequest{
string artworkUid=1 [(validate.rules).message.required = true];//画作uid;
}
//----
message ArtworkPreviewInfo {
string artistUuid=1;
string artworkName=2;
int32 length=3;
int32 width=4;
int32 ruler=5;
repeated string createdAddress=6;
string artistPhoto=7;
string hdPic=8;
string artworkUid=9;
string createdDate=10;
int32 lockStatus=11;
//基本信息审批状态
int32 baseAuditStatus=12;
string baseAuditMark=13;
string baseAuditMark2=14;
//补充信息审批状态
int32 supplementAuditStatus=15;
string supplementAuditMark=16;
string supplementAuditMark2=17;
// 当前审批流位置
int32 auditFlowIndex =18;
int64 createdAt=19;
int64 updatedAt=20;
int64 deletedAt=21;
}
message GetArtworkLockHistoryResponse{
repeated ArtworkLockRecord groupList =1;
}
message ArtworkLockRecord{
string lockGroup =1;
repeated ArtworkPreviewInfo dataList =2;
}
message UpdateArtworkAuditStatusRequest{
string artworkUid =1;
int64 auditStatus=5;
string auditMark=6;
string auditMark2=7;
int64 flowIndex=8;//当前流程 2=基本信息审核 3=补充信息审核
repeated string artworkUids=9; //画作批处理 与 artworkUid二选一
}
message CheckArtworkEditableResponse{
bool editable =1;
}
message ArtistArtworkStaticRequest{
int64 page=1;
int64 pageSize=2;
string artistKeyWords=3; //包括通过 画家名称 、画家tnum、画家手机号、关联的经纪人来查询画家 。
int32 artistGender=5; //画家性别
string artworkName=4; //画作名称
}
message ArtistArtworkStaticStaticData{
int64 Idx=1;
bool IsLock=2;
string ArtistUid=3;
string LatestLockTime=4;
string LatestUpdatedAt=6;
string RealName=7;
string PenName=8;
string StageName=9;
int64 ArtworkTotal=10;
int64 RulerTotal=11;
int64 PassedRulerTotal=12;
int64 PassedArtworkTotal=13;
}
message ArtistArtworkStaticResponse{
repeated ArtistArtworkStaticStaticData data =1;
int64 page=2;
int64 pageSize=3;
int64 total=4;
}