d2d.emegrendeles.hu/database/migrations/2021_05_17_092917_create_suppliers_table.php

46 lines
1.5 KiB
PHP

<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use App\Enums\DbStatusFieldEnum;
use Illuminate\Database\Migrations\Migration;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('suppliers', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('hooreycaId'); // hooreyca azonosito
$table->string('nameId'); // betu azonosito
$table->string('orderEmail');
$table->string('orderEmail2')->nullable();
$table->string('address');
$table->string('mailingAddress')->nullable();
$table->string('phone');
$table->string('fax')->nullable();
$table->string('customerServicePhone')->nullable();
$table->string('note')->nullable(); // megjegyezes
$table->enum('emailAttachmentType', ['pdf', 'excel', 'none'])->default('pdf');
$table->string('logoFile')->nullable();
$table->boolean('canSee')->default(true);
$table->enum('status', DbStatusFieldEnum::getValues())->default(DbStatusFieldEnum::draft);
$table->timestamps();
$table->softDeletes();
$table->userIdFields();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('suppliers');
}
};