feat: introduced plans pricing

This commit is contained in:
2026-07-25 15:31:44 +07:00
parent 633c79e817
commit 2547bcfcba
10 changed files with 144 additions and 7 deletions

View File

@@ -9,11 +9,13 @@ from db.base import Base
class PricingConfig(Base):
__tablename__ = "pricing_configs"
__table_args__ = (
CheckConstraint("id = 1", name="single_row_check"),
)
__table_args__ = (CheckConstraint("id = 1", name="single_row_check"),)
id: Mapped[int] = mapped_column(INTEGER, autoincrement=True, unique=True, nullable=False, primary_key=True)
id: Mapped[int] = mapped_column(
INTEGER, autoincrement=True, unique=True, nullable=False, primary_key=True
)
device_price: Mapped[float] = mapped_column(FLOAT, nullable=False)
updated_at: Mapped[datetime] = mapped_column(TIMESTAMP, server_default=func.now(), onupdate=func.now())
updated_at: Mapped[datetime] = mapped_column(
TIMESTAMP, server_default=func.now(), onupdate=func.now()
)