157 lines
5.2 KiB
Protocol Buffer
157 lines
5.2 KiB
Protocol Buffer
syntax = "proto3";
|
|
package artistContract;
|
|
option go_package = "./;artistContract";
|
|
//$ protoc --proto_path=. --go_out=./api/contract --go-triple_out=./api/contract ./api/contract/contract.proto
|
|
service ArtistContract {
|
|
rpc CreateContract (CreateContractRequest) returns (CreateContractRespond) {}
|
|
rpc ContractListMgmt (ContractListMgmtRequest) returns (ContractListMgmtRespond) {}
|
|
rpc ContractList (ContractListRequest) returns (ContractListRespond) {}
|
|
rpc SignContract (SignContractRequest) returns (SignContractRespond) {}
|
|
rpc FinishContract (FinishContractRequest) returns (FinishContractRespond) {}
|
|
rpc ContractTxList (ContractTxListRequest) returns (ContractTxListRespond) {}
|
|
rpc GetContractInfoByContractUid (GetContractInfoByContractUidRequest) returns (GetContractInfoByContractUidRespond) {}
|
|
|
|
// rpc GetContract (GetContractRequest) returns (ContractData) {}
|
|
|
|
// rpc UpdateContract(UpdateContractRequest) returns (UpdateContractRespond) {}
|
|
// rpc UpdateContractTx(UpdateContractTxRequest) returns (UpdateContractTxRespond) {}
|
|
}
|
|
|
|
message Contracts{
|
|
string ContractUid = 1 [json_name = "contract_uid"];
|
|
string ArtistUid = 2 [json_name = "artist_uid"];
|
|
string ArtworkUid = 3 [json_name = "artwork_uid"];
|
|
string ContractId = 4 [json_name = "contract_id"];
|
|
string TransactionId = 5 [json_name = "transaction_id"];
|
|
int32 Type = 6 [json_name = "type"];
|
|
string ViewUrl = 7 [json_name = "view_url"];
|
|
string DownloadUrl = 8 [json_name = "download_url"];
|
|
int32 State = 9 [json_name = "state"];
|
|
int32 Status = 10 [json_name = "status"];
|
|
string ExpirationTime = 11 [json_name = "expiration_time"];
|
|
string LockTime = 12 [json_name = "lock_time"];
|
|
string SignTime = 13 [json_name = "sign_time"];
|
|
string BatchName = 14 [json_name = "batch_name"];
|
|
string BatchUid = 15 [json_name = "batch_uid"];
|
|
int32 StType = 16 [json_name = "st_yype"];
|
|
}
|
|
|
|
message CreateContractRequest {
|
|
string ArtistUid = 1 [json_name="artist_uid"];
|
|
repeated string ArtworkUid = 2 [json_name="artwork_uid"];
|
|
int32 Type = 3 [json_name="type"];
|
|
}
|
|
|
|
message CreateContractRespond{
|
|
string Msg = 1 [json_name = "msg"];
|
|
}
|
|
|
|
message ContractListMgmtRequest{
|
|
string ArtistUid = 1 [json_name = "artist_uid"];
|
|
int32 Page = 2 [json_name = "page"];
|
|
int32 Num = 3 [json_name = "num"];
|
|
}
|
|
|
|
message ContractListMgmtRespond{
|
|
repeated Contracts Data = 1 [json_name = "data"];
|
|
string Msg = 2 [json_name = "msg"];
|
|
}
|
|
|
|
message ContractListRequest {
|
|
string ArtistUid = 1 [json_name = "artist_uid"];
|
|
int32 PageSize = 2 [json_name="pageSize"];
|
|
int32 Page = 3 [json_name="page"];
|
|
int32 State = 4 [json_name="state"];
|
|
}
|
|
|
|
message ContractListRespond {
|
|
repeated Contracts Data = 1 [json_name = "data"];
|
|
string Msg = 2 [json_name = "msg"];
|
|
}
|
|
|
|
message SignContractRequest {
|
|
string ArtistUid = 1 [json_name = "artist_uid"];
|
|
string ContractUid = 2 [json_name="contract_uid"];
|
|
string Token = 3 [json_name="token"];
|
|
string HtmlType = 4 [json_name="html_type"];
|
|
string EnvType = 5 [json_name= "env_type"];
|
|
string ViewPdfUrl = 6 [json_name= "view_pdf_url"];
|
|
string DownloadUrl = 7 [json_name= "download_url"];
|
|
string ContractNo = 8 [json_name= "contract_no"];
|
|
string TransactionId = 9 [json_name= "transaction_id"];
|
|
}
|
|
|
|
message SignContractRespond {
|
|
string JumpUrl = 1 [json_name = "jump_url"];
|
|
string Msg = 2 [json_name = "msg"];
|
|
}
|
|
|
|
message FinishContractRequest {
|
|
string transactionId = 1 [json_name="transaction_id"];
|
|
string ContractUid = 2 [json_name="contract_uid"];
|
|
}
|
|
|
|
message FinishContractRespond {
|
|
Contracts Contract = 1 [json_name = "msg"];
|
|
string Msg = 2 [json_name = "msg"];
|
|
}
|
|
|
|
|
|
message ContractTxListRequest {
|
|
int32 ID = 1 [json_name = "id"];
|
|
int32 PageSize = 2 [json_name="page_size"];
|
|
int32 Page = 3 [json_name="page"];
|
|
int32 State = 4 [json_name="state"];
|
|
}
|
|
|
|
message ContractTxListRespond {
|
|
repeated Contracts Data =1;
|
|
string Msg = 2 [json_name = "msg"];
|
|
}
|
|
|
|
|
|
|
|
message GetContractInfoByContractUidRequest {
|
|
string ContractUid = 1 [json_name = "contract_name"];
|
|
}
|
|
|
|
message GetContractInfoByContractUidRespond {
|
|
Contracts Data = 1 [json_name = "data"];
|
|
string Msg = 2 [json_name = "msg"];
|
|
}
|
|
|
|
message GetContractRequest {
|
|
int64 Id = 1 [json_name="id"];
|
|
}
|
|
|
|
|
|
message UpdateContractRequest {
|
|
uint64 ID = 1[json_name="id"];
|
|
int64 UserId = 2[json_name="userId"];
|
|
string CardId = 3[json_name="cardId"];
|
|
string MgmtUserId = 4[json_name="mgmtUserId"];
|
|
string ArtworkId = 5[json_name="artworkId"];
|
|
string ContractId = 6[json_name="contractId"];
|
|
string TransactionId = 7[json_name="transactionId"];
|
|
int64 Type = 8[json_name="type"];
|
|
int64 BatchId = 9[json_name="batchId"];
|
|
string BatchName = 10[json_name="batchName"];
|
|
string ViewUrl = 11[json_name="viewUrl"];
|
|
string DownloadUrl = 12[json_name="downloadUrl"];
|
|
int64 State = 13[json_name="state"];
|
|
string UpdateTime = 14 [json_name="updateTime"];
|
|
string CreateTime = 15[json_name="createTime"];
|
|
string ExpirationTime = 16 [json_name="expirationTime"];
|
|
string SignTime = 17 [json_name="signTime"];
|
|
}
|
|
message UpdateContractRespond{
|
|
|
|
}
|
|
|
|
message UpdateContractTxRequest {
|
|
int64 ID = 1[json_name="id"];
|
|
string TransactionId = 2[json_name="transactionId"];
|
|
}
|
|
message UpdateContractTxRespond{
|
|
|
|
} |