Files
CMS/src/CMSMicroservice.Protobuf/Protos/transactions.proto

149 lines
3.8 KiB
Protocol Buffer
Raw Normal View History

syntax = "proto3";
package transactions;
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.Transactions";
service TransactionsContract
{
rpc CreateNewTransactions(CreateNewTransactionsRequest) returns (CreateNewTransactionsResponse){
option (google.api.http) = {
post: "/CreateNewTransactions"
body: "*"
};
};
rpc UpdateTransactions(UpdateTransactionsRequest) returns (google.protobuf.Empty){
option (google.api.http) = {
put: "/UpdateTransactions"
body: "*"
};
};
rpc DeleteTransactions(DeleteTransactionsRequest) returns (google.protobuf.Empty){
option (google.api.http) = {
delete: "/DeleteTransactions"
body: "*"
};
};
rpc GetTransactions(GetTransactionsRequest) returns (GetTransactionsResponse){
option (google.api.http) = {
get: "/GetTransactions"
};
};
rpc GetAllTransactionsByFilter(GetAllTransactionsByFilterRequest) returns (GetAllTransactionsByFilterResponse){
option (google.api.http) = {
get: "/GetAllTransactionsByFilter"
};
};
}
message CreateNewTransactionsRequest
{
2025-11-24 23:22:18 +03:30
int64 amount = 1;
string description = 2;
oneof PaymentStatus_item
{
2025-11-24 23:22:18 +03:30
messages.PaymentStatus payment_status = 3;
}
2025-11-24 23:22:18 +03:30
google.protobuf.Timestamp payment_date = 4;
google.protobuf.StringValue ref_id = 5;
oneof Type_item
{
2025-11-24 23:22:18 +03:30
messages.TransactionType type = 6;
}
}
message CreateNewTransactionsResponse
{
int64 id = 1;
}
message UpdateTransactionsRequest
{
int64 id = 1;
2025-11-24 23:22:18 +03:30
int64 amount = 2;
string description = 3;
oneof PaymentStatus_item
{
2025-11-24 23:22:18 +03:30
messages.PaymentStatus payment_status = 4;
}
2025-11-24 23:22:18 +03:30
google.protobuf.Timestamp payment_date = 5;
google.protobuf.StringValue ref_id = 6;
oneof Type_item
{
2025-11-24 23:22:18 +03:30
messages.TransactionType type = 7;
}
}
message DeleteTransactionsRequest
{
int64 id = 1;
}
message GetTransactionsRequest
{
int64 id = 1;
}
message GetTransactionsResponse
{
int64 id = 1;
2025-11-24 23:22:18 +03:30
int64 amount = 2;
string description = 3;
oneof PaymentStatus_item
{
2025-11-24 23:22:18 +03:30
messages.PaymentStatus payment_status = 4;
}
2025-11-24 23:22:18 +03:30
google.protobuf.Timestamp payment_date = 5;
google.protobuf.StringValue ref_id = 6;
oneof Type_item
{
2025-11-24 23:22:18 +03:30
messages.TransactionType type = 7;
}
}
message GetAllTransactionsByFilterRequest
{
messages.PaginationState pagination_state = 1;
google.protobuf.StringValue sort_by = 2;
GetAllTransactionsByFilterFilter filter = 3;
}
message GetAllTransactionsByFilterFilter
{
google.protobuf.Int64Value id = 1;
2025-11-24 23:22:18 +03:30
google.protobuf.Int64Value amount = 2;
google.protobuf.StringValue description = 3;
oneof PaymentStatus_item
{
2025-11-24 23:22:18 +03:30
messages.PaymentStatus payment_status = 4;
}
2025-11-24 23:22:18 +03:30
google.protobuf.Timestamp payment_date = 5;
google.protobuf.StringValue ref_id = 6;
oneof Type_item
{
2025-11-24 23:22:18 +03:30
messages.TransactionType type = 7;
}
}
message GetAllTransactionsByFilterResponse
{
messages.MetaData meta_data = 1;
repeated GetAllTransactionsByFilterResponseModel models = 2;
}
message GetAllTransactionsByFilterResponseModel
{
int64 id = 1;
2025-11-24 23:22:18 +03:30
int64 amount = 2;
string description = 3;
oneof PaymentStatus_item
{
2025-11-24 23:22:18 +03:30
messages.PaymentStatus payment_status = 4;
}
2025-11-24 23:22:18 +03:30
google.protobuf.Timestamp payment_date = 5;
google.protobuf.StringValue ref_id = 6;
oneof Type_item
{
2025-11-24 23:22:18 +03:30
messages.TransactionType type = 7;
}
}