feat(orders): integrate Pally payment and order management

This commit is contained in:
2026-07-31 13:42:14 +07:00
parent 2547bcfcba
commit 8fbd739697
20 changed files with 661 additions and 36 deletions

View File

@@ -0,0 +1,42 @@
"""+invoice table
Revision ID: e237f7c5cb9a
Revises: bb542353b092
Create Date: 2026-07-31 11:45:00.530489
"""
from typing import Sequence, Union
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision: str = 'e237f7c5cb9a'
down_revision: Union[str, Sequence[str], None] = 'bb542353b092'
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('invoices',
sa.Column('id', sa.INTEGER(), autoincrement=True, nullable=False),
sa.Column('creator_id', sa.BIGINT(), nullable=False),
sa.Column('amount', sa.FLOAT(), nullable=False),
sa.Column('status', sa.Enum('EXPIRED', 'ACTIVE', 'PAID', name='invoicestatus'), nullable=False),
sa.ForeignKeyConstraint(['creator_id'], ['users.id'], ),
sa.PrimaryKeyConstraint('id'),
sa.UniqueConstraint('id')
)
op.create_unique_constraint(None, 'addons', ['id'])
# ### end Alembic commands ###
def downgrade() -> None:
"""Downgrade schema."""
# ### commands auto generated by Alembic - please adjust! ###
op.drop_constraint(None, 'addons', type_='unique')
op.drop_table('invoices')
# ### end Alembic commands ###