feat(pay): 增加支付状态paid 已支付
This commit is contained in:
@@ -70,6 +70,7 @@ def upgrade() -> None:
|
||||
sa.UniqueConstraint('user_id', name='uniq_user_id'),
|
||||
comment='用户表'
|
||||
)
|
||||
op.execute("ALTER SEQUENCE system_users RESTART WITH 100000;")
|
||||
op.create_index('wechat_openid', 'system_users', ['wechat_openid'], unique=False)
|
||||
op.create_table('system_user_collections',
|
||||
sa.Column('user_id', sa.Integer(), nullable=False),
|
||||
|
||||
@@ -38,7 +38,7 @@ def upgrade() -> None:
|
||||
sa.Column('total_fee', sa.Integer(), nullable=True, comment='发起的总金额,单位为分'),
|
||||
sa.Column('notify_total_fee', sa.Integer(), nullable=True, comment='回调成功支付的总金额,单位为分'),
|
||||
sa.Column('pay_url', sa.String(length=255), nullable=True, comment='支付地址'),
|
||||
sa.Column('status', sa.Enum('INIT', 'FAIL', 'OK', 'WAIT_PAYMENT', 'CANCEL', name='orderstatustype', inherit_schema=True), server_default='init', nullable=False, comment='订单状态,init:初始化 fail:失败 ok:完成 wait payment:待支付 cancel. 取消'),
|
||||
sa.Column('status', sa.Enum('INIT', 'FAIL', 'OK', 'WAIT_PAYMENT', 'PAID', 'CANCEL', name='orderstatustype', inherit_schema=True), server_default='init', nullable=False, comment='订单状态,init:初始化 fail:失败 ok:完成 wait payment:待支付 cancel. 取消'),
|
||||
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='自增id'),
|
||||
sa.Column('created_at', sa.DateTime(), server_default=sa.text('CURRENT_TIMESTAMP'), nullable=False, comment='创建时间'),
|
||||
sa.Column('updated_at', sa.DateTime(), server_default=sa.text('CURRENT_TIMESTAMP'), nullable=False, comment='更新时间'),
|
||||
|
||||
@@ -38,11 +38,11 @@ def downgrade() -> None:
|
||||
op.alter_column('system_cards', 'source',
|
||||
existing_type=mysql.ENUM('PSA', 'BGS', 'CGC', 'GBTC', 'CCG', 'BCTC', 'OTHER'),
|
||||
comment='来源,PSA、BGS、CGC、GBTC、CCG、BCTC :采集 、OTHER:自定义',
|
||||
existing_comment='来源,PSA、BGS、CGC、GBTC、CCG、BCTC、CIC :采集 、OTHER:自定义',
|
||||
existing_comment='来源,PSA、BGS、CGC、GBTC、CCG、BCTC:采集 、OTHER:自定义',
|
||||
existing_nullable=False)
|
||||
op.alter_column('system_cache_cards', 'source',
|
||||
existing_type=mysql.ENUM('PSA', 'BGS', 'CGC', 'GBTC', 'CCG', 'BCTC'),
|
||||
comment='数据来源:PSA、BGS、CGC、GBTC、CCG、BCTC',
|
||||
existing_comment='数据来源:PSA、BGS、CGC、GBTC、CCG、BCTC、CIC',
|
||||
existing_comment='数据来源:PSA、BGS、CGC、GBTC、CCG、BCTC',
|
||||
existing_nullable=False)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
Reference in New Issue
Block a user