Add API for managing tariff configurator / Improved version 0.4.0 (Alpha)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from datetime import datetime
|
||||
from typing import Any
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
@@ -13,6 +14,19 @@ class TariffBase(BaseModel):
|
||||
is_active: bool = True
|
||||
subgroup_title: str | None = None
|
||||
sort_order: int | None = None
|
||||
vless: bool = False
|
||||
external_squad: str | None = None
|
||||
|
||||
configurable: bool = False
|
||||
|
||||
device_options: list[int] | None = None
|
||||
traffic_options_gb: list[int] | None = None
|
||||
|
||||
device_step_rub: int | None = None
|
||||
device_overrides: dict[str, int] | None = None
|
||||
|
||||
traffic_step_rub: int | None = None
|
||||
traffic_overrides: dict[str, int] | None = None
|
||||
|
||||
|
||||
class TariffResponse(TariffBase):
|
||||
@@ -34,6 +48,19 @@ class TariffUpdate(BaseModel):
|
||||
is_active: bool | None = None
|
||||
subgroup_title: str | None = None
|
||||
sort_order: int | None = None
|
||||
vless: bool | None = None
|
||||
external_squad: str | None = None
|
||||
|
||||
configurable: bool | None = None
|
||||
|
||||
device_options: list[int] | None = None
|
||||
traffic_options_gb: list[int] | None = None
|
||||
|
||||
device_step_rub: int | None = None
|
||||
device_overrides: dict[str, int] | None = None
|
||||
|
||||
traffic_step_rub: int | None = None
|
||||
traffic_overrides: dict[str, int] | None = None
|
||||
|
||||
class Config:
|
||||
from_attributes = True
|
||||
|
||||
Reference in New Issue
Block a user