id(); $table->string('name')->nullable(); $table->string('business_name')->nullable(); $table->string('code')->nullable(); $table->unsignedBigInteger('group_id')->nullable(); $table->foreign('group_id')->nullable()->references('id')->on('company_groups')->onUpdate('cascade')->onDelete('cascade'); /*$table->unsignedBigInteger('activity_id')->nullable(); $table->foreign('activity_id')->nullable()->references('id')->on('company_activities')->onUpdate('cascade')->onDelete('cascade'); $table->unsignedBigInteger('activity_id')->nullable(); $table->foreign('activity_id')->nullable()->references('id')->on('company_activities')->onUpdate('cascade')->onDelete('cascade');*/ $table->string('address')->nullable(); $table->string('zip')->nullable(); $table->unsignedBigInteger('city_id')->nullable(); $table->foreign('city_id')->nullable()->references('id')->on('cities')->onUpdate('cascade')->onDelete('cascade'); $table->unsignedBigInteger('country_id')->nullable(); $table->foreign('country_id')->nullable()->references('id')->on('countries')->onUpdate('cascade')->onDelete('cascade'); $table->string('fiscal_code')->nullable(); $table->string('vat')->nullable(); $table->string('sdi')->nullable(); $table->string('ateco')->nullable(); $table->string('channel')->nullable(); $table->string('website')->nullable(); $table->string('email')->nullable(); $table->string('pec')->nullable(); $table->string('phone')->nullable(); $table->string('first_name')->nullable(); $table->string('last_name')->nullable(); $table->string('email')->nullable(); $table->string('phone')->nullable(); $table->boolean('enabled')->default(1); $table->softDeletes(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('customers'); } };