feat(auth): include expires_at in token responses and KeyPair DTO

This commit is contained in:
2026-07-24 13:25:04 +07:00
parent 9187fbb970
commit d59f96473d
9 changed files with 110 additions and 3 deletions

View File

@@ -0,0 +1,32 @@
"""create pricing_configs table
Revision ID: 2e27aeb65f28
Revises: 086c8d206446
Create Date: 2026-07-24 13:22:30.845968
"""
from typing import Sequence, Union
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision: str = '2e27aeb65f28'
down_revision: Union[str, Sequence[str], None] = '086c8d206446'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None
def upgrade() -> None:
"""Upgrade schema."""
# ### commands auto generated by Alembic - please adjust! ###
pass
# ### end Alembic commands ###
def downgrade() -> None:
"""Downgrade schema."""
# ### commands auto generated by Alembic - please adjust! ###
pass
# ### end Alembic commands ###

View File

@@ -0,0 +1,47 @@
"""create pricing_configs table frn ow
Revision ID: 74bd9cedebdd
Revises: 2e27aeb65f28
Create Date: 2026-07-24 13:23:52.427837
"""
from typing import Sequence, Union
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision: str = '74bd9cedebdd'
down_revision: Union[str, Sequence[str], None] = '2e27aeb65f28'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None
def upgrade() -> None:
"""Upgrade schema."""
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('pricing_configs',
sa.Column('id', sa.INTEGER(), autoincrement=True, nullable=False),
sa.Column('device_price', sa.FLOAT(), nullable=False),
sa.Column('updated_at', sa.TIMESTAMP(), server_default=sa.text('now()'), nullable=False),
sa.CheckConstraint('id = 1', name='single_row_check'),
sa.PrimaryKeyConstraint('id'),
sa.UniqueConstraint('id')
)
# ### end Alembic commands ###
op.execute(
"""
INSERT INTO pricing_configs (id, device_price)
VALUES (1, 50.00)
ON CONFLICT (id) DO NOTHING;
"""
)
def downgrade() -> None:
"""Downgrade schema."""
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('pricing_configs')
# ### end Alembic commands ###