lk.zachem.info/database/migrations/2024_10_23_141203_create_companies_table.php
2025-02-05 08:25:10 +08:00

37 lines
1.1 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']); /* 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');
}
};