37 lines
1.1 KiB
PHP
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');
|
|
}
|
|
};
|