57 lines
1.9 KiB
Protocol Buffer
57 lines
1.9 KiB
Protocol Buffer
syntax = "proto3";
|
|
package artistinfo;
|
|
option go_package = "./;artistInfoArtwork";
|
|
|
|
import "validate.proto";
|
|
import public "google/protobuf/timestamp.proto";
|
|
// 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 DeleteArtworkRecord(DeleteArtworkRecordRequest)returns(ArtworkCommonNoParams){} //删除画作锁记录
|
|
}
|
|
|
|
message ArtworkCommonNoParams{}
|
|
|
|
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=解锁
|
|
}
|
|
enum ArtworkQueryMode {
|
|
NowPreSaveArtwork = 0; //当前暂存的画作
|
|
NowLockedArtwork = 1; //当前已锁定的画作
|
|
ArtistCanSee = 2; //画家能看到的画作
|
|
AllUnlockArtwork = 3; //所有已解锁的画作(历史画作)
|
|
}
|
|
message GetArtworkLockRecordsRequest{
|
|
string artistUid =1 [(validate.rules).message.required = true];//画家uid
|
|
ArtworkQueryMode queryType =2 ; //查询模式
|
|
}
|
|
|
|
message ArtistLockInfo{
|
|
string artistUid=1;
|
|
string artworkUid=2;
|
|
int64 status=3;
|
|
string lockTime=4;
|
|
}
|
|
|
|
message ArtworkLockList{
|
|
repeated ArtistLockInfo data =1; //画作uid列表
|
|
}
|
|
|
|
message ArtworkUidList{
|
|
repeated string artworkUids =1 ;
|
|
}
|
|
|
|
message DeleteArtworkRecordRequest{
|
|
repeated string artworkUids =1 ;
|
|
} |