add seed_points_per_hour + improve calculateUserSeedBonus

This commit is contained in:
xiaomlove
2023-07-12 03:17:19 +08:00
parent 2bccfe58c8
commit 1d560d9aca
7 changed files with 148 additions and 111 deletions

View File

@@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('users', function (Blueprint $table) {
$table->decimal('seed_points_per_hour',20, 1)->after("seed_points")->default(0);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('users', function (Blueprint $table) {
$table->dropColumn("seed_points_per_hour");
});
}
};