139 lines
4.9 KiB
Protocol Buffer
139 lines
4.9 KiB
Protocol Buffer
|
syntax = "proto3";
|
||
|
package Artwork;
|
||
|
option go_package = "./;artwork";
|
||
|
//$ protoc --proto_path=. --go_out=./api/artwork --go-triple_out=./api/artwork ./api/artwork/artwork.proto
|
||
|
service Artwork {
|
||
|
rpc ArtworkAdd (ArtworkAddRequest) returns (ArtworkAddRespond) {}
|
||
|
rpc CheckUserLock (CheckUserLockRequest) returns (CheckUserLockRespond) {}
|
||
|
rpc UpdateArtwork (UpdateArtworkRequest) returns (UpdateArtworkRespond) {}
|
||
|
rpc GetArtworkList (GetArtworkListRequest) returns (GetArtworkListRespond) {}
|
||
|
rpc GetArtwork (GetArtworkRequest) returns (GetArtworkRespond) {}
|
||
|
rpc DelArtwork (DelArtworkRequest) returns (DelArtworkRespond) {}
|
||
|
rpc UploadArtwork (UploadArtworkRequest) returns (UploadArtworkRespond) {}
|
||
|
}
|
||
|
|
||
|
message ListInterfaceRespond {
|
||
|
int64 Total = 1 [json_name = "total"];
|
||
|
// repeated []byte Data = 2 [json_name = "data"];
|
||
|
bytes Data = 2 [json_name = "data"];
|
||
|
string Msg = 3 [json_name = "msg"];
|
||
|
}
|
||
|
|
||
|
message ArtworkListRequest {
|
||
|
int64 BatchId = 1 [json_name = "batchId"];
|
||
|
int64 ArtistId = 2 [json_name = "artistId"];
|
||
|
string Name = 3 [json_name = "name"];
|
||
|
string ArtistName = 4 [json_name = "artistName"];
|
||
|
string InvitedName = 5 [json_name = "invitedName"];
|
||
|
int64 IsImport = 6 [json_name ="isImport"];
|
||
|
int64 State = 7 [json_name = "state"];
|
||
|
int64 Page = 8 [json_name = "page"];
|
||
|
int64 Num = 9 [json_name = "num"];
|
||
|
}
|
||
|
|
||
|
message ArtworkAddRequest {
|
||
|
uint64 ID = 1 [json_name = "id"];
|
||
|
uint64 ArtistId = 2 [json_name = "artistId"];
|
||
|
string Name = 3 [json_name = "name"];
|
||
|
string ModelYear = 4 [json_name = "modelYear"];
|
||
|
string Photo = 5 [json_name = "photo"];
|
||
|
string ArtistPhoto = 6 [json_name = "artistPhoto"];
|
||
|
uint64 Width = 7 [json_name = "width"];
|
||
|
repeated string CreateAddress = 8 [json_name = "createAddress"];
|
||
|
uint64 Height = 9 [json_name = "height"];
|
||
|
uint64 Ruler = 10 [json_name = "ruler"];
|
||
|
string Introduct = 11 [json_name = "introduct"];
|
||
|
string AgeOfCreation = 12 [json_name = "ageOfCreation"];
|
||
|
string CreateAt = 13 [json_name = "createAt"];
|
||
|
bool NetworkTrace = 14 [json_name = "networkTrace"];
|
||
|
string Url = 15 [json_name = "url"];
|
||
|
uint64 State = 16 [json_name = "state"];
|
||
|
}
|
||
|
|
||
|
message ArtworkAddRespond {
|
||
|
|
||
|
}
|
||
|
|
||
|
message CheckUserLockRequest {
|
||
|
uint64 ID = 1 [json_name = "id"];
|
||
|
}
|
||
|
|
||
|
message CheckUserLockRespond {
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
message UpdateArtworkRequest {
|
||
|
uint64 ID = 1 [json_name = "id"];
|
||
|
uint64 ArtistId = 2 [json_name = "artistId"];
|
||
|
string Name = 3 [json_name = "name"];
|
||
|
string ModelYear = 4 [json_name = "modelYear"];
|
||
|
string Photo = 5 [json_name = "photo"];
|
||
|
string ArtistPhoto = 6 [json_name = "artistPhoto"];
|
||
|
uint64 Width = 7 [json_name = "width"];
|
||
|
repeated string CreateAddress = 8 [json_name = "createAddress"];
|
||
|
uint64 Height = 9 [json_name = "height"];
|
||
|
uint64 Ruler = 10 [json_name = "ruler"];
|
||
|
string Introduct = 11 [json_name = "introduct"];
|
||
|
string AgeOfCreation = 12 [json_name = "ageOfCreation"];
|
||
|
string CreateAt = 13 [json_name = "createAt"];
|
||
|
bool NetworkTrace = 14 [json_name = "networkTrace"];
|
||
|
string Url = 15 [json_name = "url"];
|
||
|
uint64 State = 16 [json_name = "state"];
|
||
|
}
|
||
|
|
||
|
message UpdateArtworkRespond {
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
message GetArtworkListRequest {
|
||
|
uint64 ID = 1 [json_name = "id"];
|
||
|
}
|
||
|
|
||
|
message GetArtworkListRespond {
|
||
|
repeated UpdateArtworkRequest Data = 1 [json_name = "data"];
|
||
|
}
|
||
|
message GetArtworkRequest {
|
||
|
uint64 ID = 1 [json_name = "id"];
|
||
|
}
|
||
|
|
||
|
message GetArtworkRespond {
|
||
|
uint64 ID = 1 [json_name = "id"];
|
||
|
uint64 ArtistId = 2 [json_name = "artistId"];
|
||
|
string Name = 3 [json_name = "name"];
|
||
|
string ModelYear = 4 [json_name = "modelYear"];
|
||
|
string Photo = 5 [json_name = "photo"];
|
||
|
string ArtistPhoto = 6 [json_name = "artistPhoto"];
|
||
|
uint64 Width = 7 [json_name = "width"];
|
||
|
repeated string CreateAddress = 8 [json_name = "createAddress"];
|
||
|
uint64 Height = 9 [json_name = "height"];
|
||
|
uint64 Ruler = 10 [json_name = "ruler"];
|
||
|
string Introduct = 11 [json_name = "introduct"];
|
||
|
string AgeOfCreation = 12 [json_name = "ageOfCreation"];
|
||
|
string CreateAt = 13 [json_name = "createAt"];
|
||
|
bool NetworkTrace = 14 [json_name = "networkTrace"];
|
||
|
string Url = 15 [json_name = "url"];
|
||
|
uint64 State = 16 [json_name = "state"];
|
||
|
}
|
||
|
|
||
|
|
||
|
message DelArtworkRequest {
|
||
|
uint64 Id = 1 [json_name = "id"];
|
||
|
uint64 ArtistId =2[json_name = "artistId"];
|
||
|
}
|
||
|
|
||
|
message DelArtworkRespond {
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
message UploadArtworkRequest {
|
||
|
uint64 ID = 1 [json_name = "id"];
|
||
|
}
|
||
|
|
||
|
message UploadArtworkRespond {
|
||
|
|
||
|
|
||
|
}
|