113 lines
3.5 KiB
Protocol Buffer
113 lines
3.5 KiB
Protocol Buffer
syntax = "proto3";
|
|
package Contract;
|
|
option go_package = "./;contract";
|
|
//$ protoc --proto_path=. --go_out=./api/contract --go-triple_out=./api/contract ./api/contract/contract.proto
|
|
service Contract {
|
|
rpc FinishContract (FinishContractRequest) returns (FinishContractRespond) {}
|
|
rpc ContractList (ContractListRequest) returns (ContractListRespond) {}
|
|
rpc GetContract (GetContractRequest) returns (ContractData) {}
|
|
rpc ContractTxList (ContractTxListRequest) returns (ContractTxListRespond) {}
|
|
rpc SignContract (SignContractRequest) returns (SignContractRespond) {}
|
|
rpc UpdateContract(UpdateContractRequest) returns (UpdateContractRespond) {}
|
|
rpc UpdateContractTx(UpdateContractTxRequest) returns (UpdateContractTxRespond) {}
|
|
}
|
|
|
|
|
|
|
|
message FinishContractRequest {
|
|
string TransactionId = 1 [json_name="transactionId"];
|
|
|
|
}
|
|
|
|
message FinishContractRespond {
|
|
|
|
}
|
|
|
|
|
|
message ContractListRequest {
|
|
int64 PageSize = 1 [json_name="pageSize"];
|
|
int64 Page = 2 [json_name="page"];
|
|
int64 State = 3 [json_name="state"];
|
|
int64 ID =4 [json_name = "id"];
|
|
}
|
|
|
|
message ContractListRespond {
|
|
repeated ContractData Data =1;
|
|
}
|
|
|
|
message ContractData{
|
|
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 ContractTxListRequest {
|
|
int64 PageSize = 1 [json_name="pageSize"];
|
|
int64 Page = 2 [json_name="page"];
|
|
int64 State = 3 [json_name="state"];
|
|
int64 ID =4 [json_name = "id"];
|
|
}
|
|
|
|
message ContractTxListRespond {
|
|
repeated ContractData Data =1;
|
|
}
|
|
message SignContractRequest {
|
|
int64 ContractId = 1 [json_name="contractId"];
|
|
string HtmlType = 2 [json_name="htmlType"];
|
|
string EnvType = 3 [json_name= "envType"];
|
|
}
|
|
|
|
message SignContractRespond {
|
|
|
|
}
|
|
|
|
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{
|
|
|
|
} |