diff --git a/composer.json b/composer.json index 79c9607..286c077 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,7 @@ }, "require-dev": { "fakerphp/faker": "^1.9.1", - "kitloong/laravel-migrations-generator": "^6.8", + "kitloong/laravel-migrations-generator": "^6.11", "krlove/eloquent-model-generator": "dev-l10-compatibility", "laravel-lang/common": "^4.0", "laravel/pint": "^1.0", diff --git a/composer.lock b/composer.lock index a17fa1b..256449a 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "8311b741696498db68ee35bdd2592280", + "content-hash": "9cb83aff80fee4b44d583fe7d848a32d", "packages": [ { "name": "brick/math", @@ -8092,16 +8092,16 @@ }, { "name": "kitloong/laravel-migrations-generator", - "version": "v6.10.0", + "version": "v6.11.0", "source": { "type": "git", "url": "https://github.com/kitloong/laravel-migrations-generator.git", - "reference": "116f50fab918b7f1363a40ebd954ce250f6aedcd" + "reference": "220b5f17fcb16610a3e9757d68c197319c0f7444" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/kitloong/laravel-migrations-generator/zipball/116f50fab918b7f1363a40ebd954ce250f6aedcd", - "reference": "116f50fab918b7f1363a40ebd954ce250f6aedcd", + "url": "https://api.github.com/repos/kitloong/laravel-migrations-generator/zipball/220b5f17fcb16610a3e9757d68c197319c0f7444", + "reference": "220b5f17fcb16610a3e9757d68c197319c0f7444", "shasum": "" }, "require": { @@ -8155,7 +8155,7 @@ ], "support": { "issues": "https://github.com/kitloong/laravel-migrations-generator/issues", - "source": "https://github.com/kitloong/laravel-migrations-generator/tree/v6.10.0" + "source": "https://github.com/kitloong/laravel-migrations-generator/tree/v6.11.0" }, "funding": [ { @@ -8163,7 +8163,7 @@ "type": "custom" } ], - "time": "2023-03-26T07:37:00+00:00" + "time": "2023-10-10T13:55:26+00:00" }, { "name": "krlove/code-generator", @@ -11330,7 +11330,7 @@ "prefer-stable": true, "prefer-lowest": false, "platform": { - "php": "^8.1" + "php": "^8.2" }, "platform-dev": [], "plugin-api-version": "2.3.0" diff --git a/database/migrations/2023_11_14_142558_create_historical_milestones_table.php b/database/migrations/2023_11_14_142558_create_historical_milestones_table.php new file mode 100644 index 0000000..87bf4a2 --- /dev/null +++ b/database/migrations/2023_11_14_142558_create_historical_milestones_table.php @@ -0,0 +1,44 @@ +id(); + $table->string('title')->comment('Titre du jalon historique'); + $table->string('text')->nullable()->comment('Texte du jalon historique'); + $table->string('picture')->nullable()->comment('Path de l\'image du jalon historique'); + $table->string('picture_alt')->nullable() + ->comment('Attribut alt de l\'image du jalon historique. Obligatoire si l\'image est définie'); + $table->string('picture_title')->nullable() + ->comment('Attribut title de l\'image du jalon historique. Obligatoire si l\'image est définie'); + $table->boolean('button_status')->comment('Le bouton est-il visible ?'); + $table->string('button_label')->nullable() + ->comment('Libellé du bouton. Obligatoire si le bouton est visible. Max: 35 caractères'); + $table->string('button_url')->nullable()->comment('Url du bouton, obligatoire si le bouton est visible'); + $table->boolean('button_new_tab')->comment('Le lien du bouton doit-il s\'ouvrir dans un nouvel onglet ?'); + $table->unsignedSmallInteger('year')->comment('Année du jalon historique'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('historical_milestones'); + } +}; diff --git a/database/migrations/2023_11_14_142558_create_job_videos_table.php b/database/migrations/2023_11_14_142558_create_job_videos_table.php new file mode 100644 index 0000000..a5fbe9a --- /dev/null +++ b/database/migrations/2023_11_14_142558_create_job_videos_table.php @@ -0,0 +1,34 @@ +id(); + $table->string('title')->comment('Titre de la vidéo'); + $table->string('place')->comment('Lieu de la vidéo'); + $table->string('video_id', 11)->comment('Id de la vidéo youtube à afficher'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('job_videos'); + } +}; diff --git a/database/migrations/2023_11_14_142558_create_logo_site_table.php b/database/migrations/2023_11_14_142558_create_logo_site_table.php new file mode 100644 index 0000000..37ed195 --- /dev/null +++ b/database/migrations/2023_11_14_142558_create_logo_site_table.php @@ -0,0 +1,31 @@ +unsignedBigInteger('logo_id'); + $table->unsignedBigInteger('site_id'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('logo_site'); + } +}; diff --git a/database/migrations/2023_11_14_142558_create_logos_table.php b/database/migrations/2023_11_14_142558_create_logos_table.php new file mode 100644 index 0000000..52be58f --- /dev/null +++ b/database/migrations/2023_11_14_142558_create_logos_table.php @@ -0,0 +1,34 @@ +id(); + $table->string('picture')->comment('Path de l\'image du logo'); + $table->string('picture_alt')->comment('Attribut alt de l\'image du logo'); + $table->string('picture_title')->comment('Attribut title de l\'image du logo'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('logos'); + } +}; diff --git a/database/migrations/2023_11_14_142558_create_news_table.php b/database/migrations/2023_11_14_142558_create_news_table.php new file mode 100644 index 0000000..8bc9091 --- /dev/null +++ b/database/migrations/2023_11_14_142558_create_news_table.php @@ -0,0 +1,47 @@ +id(); + $table->string('seo_title')->comment('Utilisé pour la balise title de la page produit'); + $table->string('seo_description')->comment('Utilisé pour la balise meta description de la page produit'); + $table->string('title')->comment('Titre de l\'actualité (h1)'); + $table->string('slug')->unique()->comment('Slug à partir de title'); + $table->text('introduction')->comment('WYSIWYG - Introduction de l\'actualité'); + $table->text('content')->nullable()->comment('WYSIWYG - Contenu de l\'actualité'); + $table->string('linkedin_url')->nullable()->comment('Url du poste linkedin lié'); + $table->string('thumbnail')->comment('Path de la vignette de l\'actualité'); + $table->string('thumbnail_alt')->comment('Attribut alt de la vignette de l\'actualité'); + $table->string('thumbnail_title')->comment('Attribut title de la vignette de l\'actualité'); + $table->string('picture')->comment('Path de l\'image de l\'actualité'); + $table->string('picture_alt')->comment('Attribut alt de l\'image de l\'actualité'); + $table->string('picture_title')->comment('Attribut title de l\'image de l\'actualité'); + $table->boolean('published')->comment('L\'actualité est-elle visible ?'); + $table->timestamp('publish_at')->useCurrent()->comment('Date de publication de l\'actualité'); + $table->timestamp('unpublish_at')->nullable()->comment('Date de dépublication de l\'actualité'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('news'); + } +}; diff --git a/database/migrations/2023_11_14_142558_create_sections_table.php b/database/migrations/2023_11_14_142558_create_sections_table.php new file mode 100644 index 0000000..fc20a63 --- /dev/null +++ b/database/migrations/2023_11_14_142558_create_sections_table.php @@ -0,0 +1,44 @@ +id(); + $table->unsignedTinyInteger('section')->unique() + ->comment('PageSectionEnum. Une seule section par valeur de l\'enum'); + $table->string('h2_title')->comment('Titre h2 de la section'); + $table->text('text')->comment('WYSIWYG - Contenu de la section. + - Optionnel pour les sections Nos missions, Notre Ambition, L\'équipe Volena, La vie chez Volena, + Nos Sites, Histoire, On se dévoile-Engagements + - Avancé optionnel pour Le Pôle Volena, Filière Locale, Vie de l\'entreprise, Alternance, Parité, + On se retruve, Ambition, Elever durablement, Mieux vivre, Respecter la Terre, Bien Nourrir, + On s\'engage-Engagements, On bouge ensemble-Vie de l\'entreprise et engagements, large gamme locale, + retrouvez en GMS, RHD, Export, Qualité + - Avancé obligatoire pour On étudie'); + $table->json('additionnal_content')->comment('Minicrud content'); + $table->unsignedBigInteger('page_id')->comment('Page associée'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('sections'); + } +}; diff --git a/database/migrations/2023_11_14_142558_create_sites_table.php b/database/migrations/2023_11_14_142558_create_sites_table.php new file mode 100644 index 0000000..c84b6c9 --- /dev/null +++ b/database/migrations/2023_11_14_142558_create_sites_table.php @@ -0,0 +1,70 @@ +id(); + $table->string('seo_title')->comment('Utilisé pour la balise title de la page site'); + $table->string('seo_description')->comment('Utilisé pour la balise meta description de la page site'); + $table->string('name')->comment('Nom du site. Utilisé en H1. Min: 3, max: 100'); + $table->string('slug')->unique()->comment('Slug à partir de name'); + $table->string('description')->comment('Premier niveau de description du site'); + $table->string('description_2')->nullable()->comment('Deuxième niveau de description du site'); + $table->unsignedInteger('employees')->comment('Nombre d\'employés du site'); + $table->json('pictos')->comment('Tableau de value d\'enum, entre 0 et n. SpeciesEnum'); + $table->string('address')->comment('Adresse du site'); + $table->string('phone_number')->comment('Numéro de téléphone du site'); + $table->json('access_line')->comment('JSON avec 3 lignes (string) de texte décrivant l\'accès au site'); + $table->string('director_name')->comment('Nom du directeur du site'); + $table->text('director_speach')->comment('WYSIWYG - Le mot du directeur du site'); + $table->string('employee_name')->nullable()->comment('Nom de l\'employé associé au speach'); + $table->string('employee_function')->nullable()->comment('Fonction de l\'employé associé au speach'); + $table->text('employee_speach')->nullable()->comment('WYSIWYG - Speach de l\'employé'); + $table->text('highlights')->nullable()->comment('WYSIWYG - Texte points forts'); + $table->double('latitude')->comment('Latitude du site en degrés'); + $table->double('longitude')->comment('Longitude du site en degrés'); + $table->string('logo')->comment('Path du logo du site'); + $table->string('logo_alt')->comment('Attribut alt du logo du site'); + $table->string('logo_title')->comment('Attribut title du logo du site'); + $table->string('picture_1')->comment('Path de la première image du site'); + $table->string('picture_1_alt')->comment('Attribut alt de la première image du site'); + $table->string('picture_1_title')->comment('Attribut title de la première image du site'); + $table->string('picture_2')->nullable()->comment('Path de la deuxième image du site'); + $table->string('picture_2_alt')->nullable() + ->comment('Attribut alt de la deuxième image du site. Obligatoire si picture_2 est définie'); + $table->string('picture_2_title')->nullable() + ->comment('Attribut title de la deuxième image du site. Obligatoire si picture_2 est définie'); + $table->string('picture_3')->nullable()->comment('Path de la troisième image du site'); + $table->string('picture_3_alt')->nullable() + ->comment('Attribut alt de la troisième image du site. Obligatoire si picture_3 est définie'); + $table->string('picture_3_title')->nullable() + ->comment('Attribut title de la troisième image du site. Obligatoire si picture_3 est définie'); + $table->string('map_picture')->comment('Path de l\'image de la carte'); + $table->string('map_picture_alt')->comment('Attribut alt de l\'image de la carte'); + $table->string('map_picture_title')->comment('Attribut title de l\'image de la carte'); + $table->integer('order')->comment('Numéro permettant d\'ordonner les sites'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('sites'); + } +}; diff --git a/database/migrations/2023_11_14_142558_create_slides_table.php b/database/migrations/2023_11_14_142558_create_slides_table.php new file mode 100644 index 0000000..9905e57 --- /dev/null +++ b/database/migrations/2023_11_14_142558_create_slides_table.php @@ -0,0 +1,45 @@ +id(); + $table->unsignedTinyInteger('slider')->unique()->comment('SliderTypeEnum'); + $table->string('title')->nullable() + ->comment('Titre de la slide. Optionnel si le slider est home, sinon obligatoire'); + $table->string('content')->nullable()->comment('Descriptif de la slide. Texte multi-line'); + $table->string('video_id', 11)->nullable() + ->comment('Id de la video Youtube. Optionnel si le slider est home, sinon le champ reste vide.'); + $table->boolean('button_status')->comment('Le bouton est-il visible ?'); + $table->string('button_label')->nullable() + ->comment('Libellé du bouton. Obligatoire si le bouton est visible. Max: 35 caractères'); + $table->string('button_url')->nullable()->comment('Url du bouton, obligatoire si le bouton est visible'); + $table->boolean('button_new_tab')->comment('Le lien du bouton doit-il s\'ouvrir dans un nouvel onglet ?'); + $table->string('picture')->comment('Path de l\'image de la slide'); + $table->string('picture_alt')->comment('Attribut alt de l\'image de la slide'); + $table->string('picture_title')->comment('Attribut title de l\'image de la slide'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('slides'); + } +}; diff --git a/database/migrations/2023_11_14_142558_create_strips_table.php b/database/migrations/2023_11_14_142558_create_strips_table.php new file mode 100644 index 0000000..3c07340 --- /dev/null +++ b/database/migrations/2023_11_14_142558_create_strips_table.php @@ -0,0 +1,37 @@ +id(); + $table->unsignedTinyInteger('picto')->comment('PictoEnum'); + $table->text('text')->comment('WYSIWYG minimal (gras + soulignement). Contenu du bandeau. Min 3, max 255'); + $table->unsignedBigInteger('news_id')->nullable()->comment('News associée, optionnelle'); + $table->boolean('published')->comment('Le bandeau est-il visible ?'); + $table->timestamp('publish_at')->nullable()->comment('Date de publication du bandeau'); + $table->timestamp('unpublish_at')->nullable()->comment('Date de dépublication du bandeau'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('strips'); + } +}; diff --git a/database/migrations/2023_11_14_142558_create_testimonials_table.php b/database/migrations/2023_11_14_142558_create_testimonials_table.php new file mode 100644 index 0000000..3ee8890 --- /dev/null +++ b/database/migrations/2023_11_14_142558_create_testimonials_table.php @@ -0,0 +1,38 @@ +id(); + $table->string('name')->comment('Nom de la personne témoignant'); + $table->string('job')->nullable()->comment('Fonction de la personne témoignant'); + $table->text('content')->comment('WYSIWYG - Texte du témoignage'); + $table->unsignedTinyInteger('type')->comment('TypeEnum'); + $table->string('picture')->comment('Path de l\'image du témoignage'); + $table->string('picture_alt')->comment('Attribut alt de l\'image du témoignage'); + $table->string('picture_title')->comment('Attribut title de l\'image du témoignage'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('testimonials'); + } +}; diff --git a/database/migrations/2023_11_14_142601_add_foreign_keys_to_logo_site_table.php b/database/migrations/2023_11_14_142601_add_foreign_keys_to_logo_site_table.php new file mode 100644 index 0000000..80b7b48 --- /dev/null +++ b/database/migrations/2023_11_14_142601_add_foreign_keys_to_logo_site_table.php @@ -0,0 +1,34 @@ +foreign(['logo_id'])->references(['id'])->on('sites')->onUpdate('NO ACTION')->onDelete('NO ACTION'); + $table->foreign(['site_id'])->references(['id'])->on('logos')->onUpdate('NO ACTION')->onDelete('NO ACTION'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('logo_site', function (Blueprint $table) { + $table->dropForeign('logo_site_logo_id_foreign'); + $table->dropForeign('logo_site_site_id_foreign'); + }); + } +}; diff --git a/database/migrations/2023_11_14_142601_add_foreign_keys_to_sections_table.php b/database/migrations/2023_11_14_142601_add_foreign_keys_to_sections_table.php new file mode 100644 index 0000000..2f4e81d --- /dev/null +++ b/database/migrations/2023_11_14_142601_add_foreign_keys_to_sections_table.php @@ -0,0 +1,33 @@ +foreign(['page_id'])->references(['id'])->on('static_pages') + ->onUpdate('NO ACTION')->onDelete('NO ACTION'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('sections', function (Blueprint $table) { + $table->dropForeign('sections_page_id_foreign'); + }); + } +}; diff --git a/database/migrations/2023_11_14_142601_add_foreign_keys_to_strips_table.php b/database/migrations/2023_11_14_142601_add_foreign_keys_to_strips_table.php new file mode 100644 index 0000000..38f8e5b --- /dev/null +++ b/database/migrations/2023_11_14_142601_add_foreign_keys_to_strips_table.php @@ -0,0 +1,32 @@ +foreign(['news_id'])->references(['id'])->on('news')->onUpdate('NO ACTION')->onDelete('SET NULL'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('strips', function (Blueprint $table) { + $table->dropForeign('strips_news_id_foreign'); + }); + } +};