tariffs/docs/proto/service.proto

50 lines
1.1 KiB
Protocol Buffer
Raw Permalink Normal View History

syntax = "proto3";
package tariff;
option go_package = "gitea.pena/PenaSide/tariffs/internal/proto/tariffs";
import "google/protobuf/timestamp.proto";
message Privilege {
string id = 1;
string name = 2;
string privilege_id = 3;
string service_key = 4;
string description = 5;
string type = 6;
string value = 7;
double price = 8;
double amount = 9;
google.protobuf.Timestamp created_at = 10;
google.protobuf.Timestamp updated_at = 11;
bool is_deleted = 12;
google.protobuf.Timestamp deleted_at = 13;
}
message Tariff {
string id = 1;
string name = 2;
string user_id = 3;
string description = 4;
int32 price = 5;
int32 order = 6;
bool is_custom = 7;
repeated Privilege privileges = 8;
bool is_deleted = 9;
google.protobuf.Timestamp created_at = 10;
google.protobuf.Timestamp updated_at = 11;
google.protobuf.Timestamp deleted_at = 12;
}
message GetTariffRequest {
string id = 1;
}
message GetTariffResponse {
Tariff tariff = 1;
}
service TariffService {
rpc GetTariff(GetTariffRequest) returns (GetTariffResponse);
}