lk.zachem.info/database/migrations/2024_10_23_141203_create_companies_table.php
2024-11-25 15:39:54 +03:00

36 lines
1.0 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.
*/
public function up(): void
{
Schema::create('companies', function (Blueprint $table) {
$table->id();
$table->enum('type',['AGENCY','SELFEMP','SOLEPROP'])->nullable(); /* AGENT - агент в компании, SELFEMP - самозанятый, SOLEPROP - инд. предприниматель */
$table->string('name');
$table->string('inn');
$table->string('full_name')->nullable();
$table->string('email');
$table->string('address')->nullable();
$table->string('legal_address')->nullable();
$table->json('details')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('companies');
}
};