table('cdk_record', ['comment' => '兑换记录', 'engine' => 'InnoDB', 'encoding' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci']); $table->addColumn('cdk_code', 'string',['limit'=>10,'default'=>'','comment'=>'兑换码']) ->addColumn('account', 'string',['limit'=>30, 'default'=>'','comment'=>'玩家账号']) ->addColumn('role_id', 'integer',['limit'=>8, 'default'=>0,'comment'=>'角色id']) ->addColumn('money', 'decimal',['limit'=>[8,2], 'default'=>0,'comment'=>'价值']) ->addColumn('agency_account', 'string',['limit'=>30, 'default'=>'','comment'=>'代理账号']) ->addColumn('item_name', 'string',['limit'=>50, 'default'=>'','comment'=>'物品描述']) ->addColumn('type', 'integer',['limit'=>1, 'default'=>0,'comment'=>'兑换类型']) ->addColumn('status', 'boolean',['limit'=>1, 'default'=>0,'comment'=>'状态']) ->addColumn('create_time', 'integer',['limit'=>10, 'default'=>0,'comment'=>'创建时间']) ->addColumn('update_time', 'integer',['limit'=>10, 'default'=>0,'comment'=>'更新时间']) ->create(); } }