change copperConvertPage
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
if (Schema::hasTable('copper_convert_requests')) {
|
||||
return;
|
||||
}
|
||||
|
||||
Schema::create('copper_convert_requests', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('customer_id')->index();
|
||||
$table->string('status', 20)->default('pending')->index();
|
||||
$table->string('source', 20);
|
||||
$table->unsignedBigInteger('source_product_id');
|
||||
$table->string('asset_unit', 32);
|
||||
$table->decimal('consumed_amount', 16, 4);
|
||||
$table->decimal('leftover_amount', 16, 4)->default(0);
|
||||
$table->unsignedBigInteger('source_unit_price');
|
||||
$table->unsignedBigInteger('wire15_product_id')->nullable();
|
||||
$table->unsignedInteger('wire15_rings')->default(0);
|
||||
$table->unsignedBigInteger('wire15_unit_price')->default(0);
|
||||
$table->unsignedBigInteger('wire25_product_id')->nullable();
|
||||
$table->unsignedInteger('wire25_rings')->default(0);
|
||||
$table->unsignedBigInteger('wire25_unit_price')->default(0);
|
||||
$table->unsignedBigInteger('sell_order_id')->nullable();
|
||||
$table->unsignedBigInteger('buy15_order_id')->nullable();
|
||||
$table->unsignedBigInteger('buy25_order_id')->nullable();
|
||||
$table->unsignedBigInteger('admin_id')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('copper_convert_requests');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user