2025_04_04_130150_create_aziendas_table.php 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. return new class extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('aziendas', function (Blueprint $table) {
  15. $table->id();
  16. // General information
  17. $table->string('ragione_sociale');
  18. $table->string('nome_associazione')->nullable();
  19. $table->string('tipologia')->nullable();
  20. $table->string('logo')->nullable();
  21. // Legal address
  22. $table->string('sede_legale_nazione')->nullable();
  23. $table->string('sede_legale_provincia')->nullable();
  24. $table->string('sede_legale_comune')->nullable();
  25. $table->string('sede_legale_indirizzo')->nullable();
  26. $table->string('sede_legale_cap')->nullable();
  27. // Operational address
  28. $table->string('sede_operativa_nazione')->nullable();
  29. $table->string('sede_operativa_provincia')->nullable();
  30. $table->string('sede_operativa_comune')->nullable();
  31. $table->string('sede_operativa_indirizzo')->nullable();
  32. $table->string('sede_operativa_cap')->nullable();
  33. // Contacts
  34. $table->string('email');
  35. $table->string('pec');
  36. $table->string('telefono')->nullable();
  37. $table->string('cellulare');
  38. // Fiscal data
  39. $table->string('partita_iva')->nullable();
  40. $table->string('codice_fiscale')->nullable();
  41. $table->string('codice_sdi')->nullable();
  42. // Accounting configuration
  43. $table->date('chiusura_anno_fiscale')->nullable();
  44. $table->date('scadenza_abbonamenti')->nullable();
  45. $table->date('scadenza_pagamenti_uscita')->nullable();
  46. $table->timestamps();
  47. });
  48. }
  49. /**
  50. * Reverse the migrations.
  51. *
  52. * @return void
  53. */
  54. public function down()
  55. {
  56. Schema::dropIfExists('aziendas');
  57. }
  58. };