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