Lae/database/migrations/2022_08_12_082631_create_transcations_table.php
iVampireSP.com 4918efa597
优化导入,格式化代码
分离出充值系统

修复了充值的问题
2022-11-16 13:16:56 +08:00

46 lines
983 B
PHP

<?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::create('transcations', function (Blueprint $table) {
$table->id();
// remote transaction id
$table->string('remote_id')->index();
// drops id
$table->unsignedBigInteger('drops_id')->index();
$table->foreign('drops_id')->references('id')->on('drops');
// payment
$table->string('payment')->index();
// amount
$table->double('amount', 60, 8)->default(0);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('transcations');
}
};