Skip to content

Commit

Permalink
fix: git commit error in db file
Browse files Browse the repository at this point in the history
  • Loading branch information
Cat committed Dec 12, 2022
1 parent 25611f5 commit aef9567
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions db/migrations/20000101000000_init_database.php.new
Original file line number Diff line number Diff line change
Expand Up @@ -324,15 +324,15 @@ final class InitDatabase extends AbstractMigration

$this->table('gift_card', [ 'id' => false, 'primary_key' => [ 'id' ]])
->addColumn('id', 'biginteger', [ 'identity' => true,'signed' => false ])
->addColumn('card', 'text', array('comment' => '卡号'))
->addColumn('balance', 'integer', array('comment' => '余额'))
->addColumn('created_at', 'integer', array('comment' => '创建时间'))
->addColumn('status', 'integer', array('comment' => '使用状态'))
->addColumn('used_at', 'integer', array('comment' => '使用时间'))
->addColumn('use_user', 'integer', array('comment' => '使用用户'))
->create();
->addColumn('status', 'text', [ 'comment' => '订单状态' ])
->addColumn('card', 'text', ['comment' => '卡号'])
->addColumn('balance', 'integer', ['comment' => '余额'])
->addColumn('create_time', 'integer', ['comment' => '创建时间'])
->addColumn('status', 'integer', ['comment' => '使用状态'])
->addColumn('use_time', 'integer', ['comment' => '使用时间'])
->addColumn('use_user', 'integer', ['comment' => '使用用户'])
->addIndex([ 'id' ])
->addIndex([ 'status' ])
->create();
}

public function down(): void
Expand Down
4 changes: 2 additions & 2 deletions src/Controllers/Admin/NodeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,12 @@ public function add(Request $request, Response $response, array $args): Response

$node->node_class = $request->getParam('node_class');

if ($request->getParam('node_bandwidth_limit') === null || $request->getParam('node_bandwidth_limit') === '') {
if ($request->getParam('node_bandwidth_limit') === null || $request->getParam('node_bandwidth_limit') === '') {
$node->node_bandwidth_limit = 0;
} else {
$node->node_bandwidth_limit = $request->getParam('node_bandwidth_limit') * 1024 * 1024 * 1024;
}

$node->bandwidthlimit_resetday = $request->getParam('bandwidthlimit_resetday');
$node->password = Tools::genRandomChar(32);

Expand Down

0 comments on commit aef9567

Please sign in to comment.