table('extension_balpay_log', ['commonts' => '余额支付日志']); $table->addColumn('user_id', 'integer', ['signed' => false, 'comment' => '用户ID']) ->addColumn('order_id', 'integer', ['signed' => false, 'default' => 0, 'comment' => '订单ID(可为0)']) ->addColumn('type', 'integer', ['signed' => false, 'default' => 0, 'comment' => '流水类型:1-充值 2-消费 3-退款 4-冻结 5-解冻']) ->addColumn('amount', 'decimal', ['precision' => 10, 'scale' => 2, 'comment' => '金额']) ->addColumn('balance', 'decimal', ['precision' => 10, 'scale' => 2, 'comment' => '当前余额']) ->addColumn('description', 'string', ['limit' => 255, 'comment' => '描述']) ->addTimestamps('create_time', 'update_time') ->create(); } }