connector)->create('pipi_owner_contracts', static function (Blueprint $table) { $table->id(); $table->boolean('is_group')->default(false)->comment('Это группа'); $table->string('code')->nullable()->comment('Код'); $table->string('name')->nullable()->comment('Наименование'); $table->string('comments')->nullable()->comment('Комментарий'); $table->string('organization')->nullable()->comment('Организация'); $table->string('contract_number')->nullable()->comment('Номер договора'); $table->date('contract_date')->nullable()->comment('Дата договора'); $table->date('started_at')->nullable()->comment('Дата начала действия'); $table->date('ended_at')->nullable()->comment('Дата окончания'); $table->string('payment_type')->nullable()->comment('Условия оплаты'); $table->timestamps(); $table->softDeletes(); $table->unsignedBigInteger('parent_id'); $table->foreign('parent_id')->references('id')->on('pipi_owner_contracts'); }); } } };