48 lines
1.1 KiB
PHP
48 lines
1.1 KiB
PHP
<?php
|
|
|
|
/**
|
|
* Laravel Schematics
|
|
*
|
|
* WARNING: removing @tag value will disable automated removal
|
|
*
|
|
* @package Laravel-schematics
|
|
* @author Maarten Tolhuijs <mtolhuys@protonmail.com>
|
|
* @url https://github.com/mtolhuys/laravel-schematics
|
|
* @tag laravel-schematics-invoices-model
|
|
*/
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
class CreateInvoicesTable extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('invoices', static function (Blueprint $table) {
|
|
$table->increments('id');
|
|
$table->integer('user_id');
|
|
$table->boolean('status_id', true);
|
|
$table->decimal('subtotal', 10, 2);
|
|
$table->decimal('total', 10, 2);
|
|
$table->decimal('shipping', 10, 2);
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('invoices');
|
|
}
|
|
}
|