feat(auth): include expires_at in token responses and KeyPair DTO
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from .pricing import PricingConfig
|
||||
from .sessions import Session
|
||||
from .users import User
|
||||
|
||||
__all__ = ["Session", "User"]
|
||||
__all__ = ["PricingConfig", "Session", "User"]
|
||||
|
||||
19
db/models/pricing.py
Normal file
19
db/models/pricing.py
Normal file
@@ -0,0 +1,19 @@
|
||||
from datetime import datetime
|
||||
|
||||
from sqlalchemy import FLOAT, INTEGER, TIMESTAMP, CheckConstraint, func
|
||||
from sqlalchemy.orm import Mapped, mapped_column
|
||||
|
||||
from db.base import Base
|
||||
|
||||
|
||||
class PricingConfig(Base):
|
||||
__tablename__ = "pricing_configs"
|
||||
|
||||
__table_args__ = (
|
||||
CheckConstraint("id = 1", name="single_row_check"),
|
||||
)
|
||||
|
||||
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())
|
||||
Reference in New Issue
Block a user