20260525090006_create_vcc_payment_cate.php 1.5 KB

1234567891011121314151617181920212223242526
  1. <?php
  2. use Phinx\Db\Adapter\MysqlAdapter;
  3. use think\migration\Migrator;
  4. class CreateVccPaymentCate extends Migrator
  5. {
  6. public function change(): void {
  7. $table = $this->table('vcc_payment_cate', [
  8. 'engine' => 'InnoDB',
  9. 'collation' => 'utf8mb4_general_ci',
  10. 'comment' => 'VCC返点/提成付款申请类型字典表',
  11. ]);
  12. $table
  13. ->addColumn('type', 'integer', ['limit' => MysqlAdapter::INT_TINY, 'null' => false, 'default' => 0, 'comment' => '类型:1付款方式'])
  14. ->addColumn('title', 'string', ['limit' => 100, 'null' => false, 'default' => '', 'comment' => '名称'])
  15. ->addColumn('value', 'integer', ['null' => false, 'default' => 0, 'comment' => '业务值(同type内唯一,申请单存此值)'])
  16. ->addColumn('is_other', 'integer', ['limit' => MysqlAdapter::INT_TINY, 'null' => false, 'default' => 0, 'comment' => '是否为其他选项:1是(选中后需填备注)'])
  17. ->addColumn('sort', 'integer', ['null' => false, 'default' => 0, 'comment' => '排序'])
  18. ->addColumn('status', 'integer', ['limit' => MysqlAdapter::INT_TINY, 'null' => false, 'default' => 1, 'comment' => '状态:0禁用,1启用'])
  19. ->addColumn('create_time', 'biginteger', ['null' => false, 'default' => 0, 'comment' => '创建时间'])
  20. ->addColumn('delete_time', 'biginteger', ['null' => false, 'default' => 0, 'comment' => '删除时间'])
  21. ->create();
  22. }
  23. }