Files
portal-api/database/migrations/2025_01_31_160440_invoice_item.php
T
2025-07-24 16:18:27 +07:00

54 lines
1.7 KiB
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('invoice_item', function (Blueprint $table) {
$table->id()->autoIncrement();
// $table->bigInteger('invoice_id')->default(0)->index();
// $table->bigInteger('customer_id')->default(0)->index();
// $table->tinyInteger('type_id')->default(0)->index();
// $table->integer('product_id')->nullable();
// $table->integer('billing')->nullable();
// $table->integer('parent_id')->nullable();
// $table->integer('relid')->nullable();
// $table->text('description')->nullable();
// $table->integer('amount')->nullable();
// $table->integer('tax')->default(1);
// $table->integer('due_date');
$table->bigInteger('invoice_id')->default(0)->index();
$table->unsignedBigInteger('product_id')->nullable()->index();
$table->integer('months')->default(0);
$table->unsignedBigInteger('os_id')->nullable()->index();
$table->string('server_name')->nullable();
$table->integer('quantity')->default(1);
$table->tinyInteger('invoice_type')->default(1);
$table->integer('price')->default(0);
$table->tinyInteger('product_type');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('invoice_item');
}
};