This commit is contained in:
masoodafar-web
2025-11-18 22:38:50 +03:30
parent dba8aecc97
commit f6dcd43346
76 changed files with 3778 additions and 1386 deletions

View File

@@ -0,0 +1,99 @@
syntax = "proto3";
package pruducttag;
import "public_messages.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/wrappers.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";
import "google/api/annotations.proto";
option csharp_namespace = "CMSMicroservice.Protobuf.Protos.PruductTag";
service PruductTagContract
{
rpc CreateNewPruductTag(CreateNewPruductTagRequest) returns (CreateNewPruductTagResponse){
option (google.api.http) = {
post: "/CreateNewPruductTag"
body: "*"
};
};
rpc UpdatePruductTag(UpdatePruductTagRequest) returns (google.protobuf.Empty){
option (google.api.http) = {
put: "/UpdatePruductTag"
body: "*"
};
};
rpc DeletePruductTag(DeletePruductTagRequest) returns (google.protobuf.Empty){
option (google.api.http) = {
delete: "/DeletePruductTag"
body: "*"
};
};
rpc GetPruductTag(GetPruductTagRequest) returns (GetPruductTagResponse){
option (google.api.http) = {
get: "/GetPruductTag"
};
};
rpc GetAllPruductTagByFilter(GetAllPruductTagByFilterRequest) returns (GetAllPruductTagByFilterResponse){
option (google.api.http) = {
get: "/GetAllPruductTagByFilter"
};
};
}
message CreateNewPruductTagRequest
{
string product_id = 1;
string tag_id = 2;
}
message CreateNewPruductTagResponse
{
int64 id = 1;
}
message UpdatePruductTagRequest
{
int64 id = 1;
string product_id = 2;
string tag_id = 3;
}
message DeletePruductTagRequest
{
int64 id = 1;
}
message GetPruductTagRequest
{
int64 id = 1;
}
message GetPruductTagResponse
{
int64 id = 1;
string product_id = 2;
string tag_id = 3;
}
message GetAllPruductTagByFilterRequest
{
messages.PaginationState pagination_state = 1;
google.protobuf.StringValue sort_by = 2;
GetAllPruductTagByFilterFilter filter = 3;
}
message GetAllPruductTagByFilterFilter
{
google.protobuf.Int64Value id = 1;
google.protobuf.StringValue product_id = 2;
google.protobuf.StringValue tag_id = 3;
}
message GetAllPruductTagByFilterResponse
{
messages.MetaData meta_data = 1;
repeated GetAllPruductTagByFilterResponseModel models = 2;
}
message GetAllPruductTagByFilterResponseModel
{
int64 id = 1;
string product_id = 2;
string tag_id = 3;
}

View File

@@ -0,0 +1,114 @@
syntax = "proto3";
package tag;
import "public_messages.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/wrappers.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";
import "google/api/annotations.proto";
option csharp_namespace = "CMSMicroservice.Protobuf.Protos.Tag";
service TagContract
{
rpc CreateNewTag(CreateNewTagRequest) returns (CreateNewTagResponse){
option (google.api.http) = {
post: "/CreateNewTag"
body: "*"
};
};
rpc UpdateTag(UpdateTagRequest) returns (google.protobuf.Empty){
option (google.api.http) = {
put: "/UpdateTag"
body: "*"
};
};
rpc DeleteTag(DeleteTagRequest) returns (google.protobuf.Empty){
option (google.api.http) = {
delete: "/DeleteTag"
body: "*"
};
};
rpc GetTag(GetTagRequest) returns (GetTagResponse){
option (google.api.http) = {
get: "/GetTag"
};
};
rpc GetAllTagByFilter(GetAllTagByFilterRequest) returns (GetAllTagByFilterResponse){
option (google.api.http) = {
get: "/GetAllTagByFilter"
};
};
}
message CreateNewTagRequest
{
string name = 1;
string title = 2;
string description = 3;
bool is_active = 4;
int32 sort_order = 5;
}
message CreateNewTagResponse
{
int64 id = 1;
}
message UpdateTagRequest
{
int64 id = 1;
string name = 2;
string title = 3;
string description = 4;
bool is_active = 5;
int32 sort_order = 6;
}
message DeleteTagRequest
{
int64 id = 1;
}
message GetTagRequest
{
int64 id = 1;
}
message GetTagResponse
{
int64 id = 1;
string name = 2;
string title = 3;
string description = 4;
bool is_active = 5;
int32 sort_order = 6;
}
message GetAllTagByFilterRequest
{
messages.PaginationState pagination_state = 1;
google.protobuf.StringValue sort_by = 2;
GetAllTagByFilterFilter filter = 3;
}
message GetAllTagByFilterFilter
{
google.protobuf.Int64Value id = 1;
google.protobuf.StringValue name = 2;
google.protobuf.StringValue title = 3;
google.protobuf.StringValue description = 4;
google.protobuf.BoolValue is_active = 5;
google.protobuf.Int32Value sort_order = 6;
}
message GetAllTagByFilterResponse
{
messages.MetaData meta_data = 1;
repeated GetAllTagByFilterResponseModel models = 2;
}
message GetAllTagByFilterResponseModel
{
int64 id = 1;
string name = 2;
string title = 3;
string description = 4;
bool is_active = 5;
int32 sort_order = 6;
}