table('cdk_code', ['comment' => '兑换码', 'engine' => 'InnoDB', 'encoding' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci']); $table->addColumn('cdk_code', 'string',['limit'=>10,'default'=>'','comment'=>'兑换码']) ->addColumn('type', 'integer',['limit'=>1, 'default'=>0,'comment'=>'兑换类型']) ->addColumn('money', 'decimal',['limit'=>[8,2], 'default'=>0,'comment'=>'价值']) ->addColumn('item_id', 'integer',['limit'=>8, 'default'=>0,'comment'=>'物品id']) ->addColumn('item_name', 'string',['limit'=>50, 'default'=>'','comment'=>'物品描述']) ->addColumn('mail', 'string',['limit'=>150, 'default'=>'','comment'=>'邮件物品']) ->addColumn('num', 'integer',['limit'=>5, '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(); } }