diff --git a/database/migrations/2023_10_18_180112_create_commitments_table.php b/database/migrations/2023_10_18_180112_create_commitments_table.php new file mode 100644 index 0000000..2aaeb9d --- /dev/null +++ b/database/migrations/2023_10_18_180112_create_commitments_table.php @@ -0,0 +1,37 @@ +id(); + $table->string('title')->comment('Titre de l\'engagement'); + $table->string('picture')->comment('Path de l\'image de l\'engagement (185px * 185px)'); + $table->string('picture_alt')->comment('Attribut alt de l\'image de l\'engagement'); + $table->string('picture_title')->comment('Attribut title de l\'image de l\'engagement'); + $table->boolean('published')->comment('L\'engagement est-il visible ?'); + $table->unsignedInteger('order')->comment('Numéro permettant d\'ordonner les engagements'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('commitments'); + } +}; diff --git a/database/migrations/2023_10_18_180112_create_convictionpages_table.php b/database/migrations/2023_10_18_180112_create_convictionpages_table.php new file mode 100644 index 0000000..c0cbe59 --- /dev/null +++ b/database/migrations/2023_10_18_180112_create_convictionpages_table.php @@ -0,0 +1,39 @@ +id(); + $table->float('key_feed')->comment('Chiffre clé \'bien nourrir\''); + $table->float('key_earth_1')->comment('Chiffre clé \'respecter la terre\' 1'); + $table->float('key_earth_2')->comment('Chiffre clé \'respecter la terre\' 2'); + $table->float('key_together_1')->comment('Chiffre clé \'vivre ensemble\' 1'); + $table->float('key_together_2')->comment('Chiffre clé \'vivre ensemble\' 2'); + $table->float('key_together_3')->comment('Chiffre clé \'vivre ensemble\' 3'); + $table->float('key_together_4')->comment('Chiffre clé \'vivre ensemble\' 4'); + $table->float('key_territory')->comment('Chiffre clé \'intégrer son territoire\''); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('convictionpages'); + } +}; diff --git a/database/migrations/2023_10_18_180112_create_explorerpage_commitment_table.php b/database/migrations/2023_10_18_180112_create_explorerpage_commitment_table.php new file mode 100644 index 0000000..cf7aa6f --- /dev/null +++ b/database/migrations/2023_10_18_180112_create_explorerpage_commitment_table.php @@ -0,0 +1,31 @@ +unsignedBigInteger('explorerpage_id'); + $table->unsignedBigInteger('commitment_id'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('explorerpage_commitment'); + } +}; diff --git a/database/migrations/2023_10_18_180112_create_explorerpages_table.php b/database/migrations/2023_10_18_180112_create_explorerpages_table.php new file mode 100644 index 0000000..485407e --- /dev/null +++ b/database/migrations/2023_10_18_180112_create_explorerpages_table.php @@ -0,0 +1,40 @@ +id(); + $table->string('picture_1')->comment('Path de la première illustration'); + $table->string('picture_1_alt')->comment('Attribut alt de l\'image 1'); + $table->string('picture_1_title')->comment('Attribut title de l\'image 1'); + $table->string('picture_2')->comment('Path de la deuxième illustration'); + $table->string('picture_2_alt')->comment('Attribut alt de l\'image 2'); + $table->string('picture_2_title')->comment('Attribut title de l\'image 2'); + $table->string('picture_3')->comment('Path de la troisième illustration'); + $table->string('picture_3_alt')->comment('Attribut alt de l\'image 3'); + $table->string('picture_3_title')->comment('Attribut title de l\'image 3'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('explorerpages'); + } +}; diff --git a/database/migrations/2023_10_18_180112_create_homepages_table.php b/database/migrations/2023_10_18_180112_create_homepages_table.php new file mode 100644 index 0000000..a18a509 --- /dev/null +++ b/database/migrations/2023_10_18_180112_create_homepages_table.php @@ -0,0 +1,40 @@ +id(); + $table->string('title_part1')->comment('Première partie du titre h1 de l\'accueil'); + $table->string('title_part2')->comment('Deuxième partie du titre h1 de l\'accueil'); + $table->string('title_part3')->comment('Dernière partie du titre h1 de l\'accueil'); + $table->string('picture')->comment('Path de l\'image de la page d\'accueil (640px * 390px)'); + $table->string('picture_alt')->comment('Attribut alt de l\'image de la page d\'accueil'); + $table->string('picture_title')->comment('Attribut title de l\'image de la page d\'accueil'); + $table->string('presentation_title')->comment('Titre de la partie \'présentation\' de la page d\'accueil'); + $table->text('presentation_content') + ->comment('WYSIWYG - Contenu de la partie présentation de la page d\'accueil'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('homepages'); + } +}; diff --git a/database/migrations/2023_10_18_180112_create_joinuspages_table.php b/database/migrations/2023_10_18_180112_create_joinuspages_table.php new file mode 100644 index 0000000..7d01094 --- /dev/null +++ b/database/migrations/2023_10_18_180112_create_joinuspages_table.php @@ -0,0 +1,32 @@ +id(); + $table->string('video_url')->comment('Lien de la vidéo youtube à afficher'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('joinuspages'); + } +}; diff --git a/database/migrations/2023_10_18_180112_create_news_table.php b/database/migrations/2023_10_18_180112_create_news_table.php new file mode 100644 index 0000000..6b2827b --- /dev/null +++ b/database/migrations/2023_10_18_180112_create_news_table.php @@ -0,0 +1,52 @@ +id(); + $table->string('seo_title')->comment('Utilisé pour la balise title de la page'); + $table->string('seo_description')->comment('Utilisé pour la balise meta description de la page'); + $table->string('title')->comment('Balise h1 de la page'); + $table->string('slug')->unique()->comment('Slug à partir de title'); + $table->unsignedTinyInteger('category') + ->comment('Catégorie de la news (enum \\App\\Enums\\News\\CategoryEnum)'); + $table->string('picture_thumbnail')->nullable() + ->comment('Path de la vignette de l\'actualité (265px * 354px)'); + $table->string('picture_thumbnail_alt')->nullable() + ->comment('Attribut alt de la vignette de l\'actualité'); + $table->string('picture_thumbnail_title')->nullable() + ->comment('Attribut title de la vignette de l\'actualité'); + $table->string('picture')->comment('Path de l\'illustration de l\'actualité (1002px * 565 px)'); + $table->string('picture_alt')->comment('Attribut alt de l\'illustration de l\'actualité'); + $table->string('picture_title')->comment('Attribut title de l\'illustration de l\'actualité'); + $table->string('subtitle')->comment('Sous-titre de l\'actualité. Chaine vide possible'); + $table->text('content')->comment('WYSIWYG - Texte de l\'actualité'); + $table->boolean('published')->comment('L\'actualité est-elle visible ?'); + $table->timestamp('publish_at')->nullable()->comment('Date de publication de l\'actualité'); + $table->timestamp('unpublish_at')->nullable()->comment('Date de dépublication de l\'actualité'); + $table->unsignedInteger('order')->comment('Numéro permettant d\'ordonner les actualités'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('news'); + } +}; diff --git a/database/migrations/2023_10_18_180112_create_product_commitment_table.php b/database/migrations/2023_10_18_180112_create_product_commitment_table.php new file mode 100644 index 0000000..34a649d --- /dev/null +++ b/database/migrations/2023_10_18_180112_create_product_commitment_table.php @@ -0,0 +1,31 @@ +unsignedBigInteger('product_id'); + $table->unsignedBigInteger('commitment_id'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('product_commitment'); + } +}; diff --git a/database/migrations/2023_10_18_180112_create_products_table.php b/database/migrations/2023_10_18_180112_create_products_table.php new file mode 100644 index 0000000..7619f2c --- /dev/null +++ b/database/migrations/2023_10_18_180112_create_products_table.php @@ -0,0 +1,54 @@ +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 du produit'); + $table->string('slug')->unique()->comment('Slug à partir de title'); + $table->string('subtitle')->comment('Sous-titre du produit'); + $table->string('picture_thumbnail')->comment('Path de la vignette du produit (332px * 252px)'); + $table->string('picture_thumbnail_alt')->comment('Attribut alt de la vignette du produit'); + $table->string('picture_thumbnail_title')->comment('Attribut title de la vignette du produit'); + $table->string('picture_ambiance')->comment('Path du visuel d\'ambiance du produit (774px * 515px)'); + $table->string('picture_ambiance_alt')->comment('Attribut alt du visuel d\'ambiance'); + $table->string('picture_ambiance_title')->comment('Attribut title du visuel d\'ambiance'); + $table->string('picture_packshot')->comment('Path de l\'image du packshot (327px * 252px)'); + $table->string('picture_packshot_alt')->comment('Attribut alt de l\'image du packshot'); + $table->string('picture_packshot_title')->comment('Attribut title de l\'image du packshot'); + $table->text('description')->comment('WYSIWYG - Description du produit'); + $table->unsignedTinyInteger('cooking_mode') + ->comment('Mode de cuisson (enum \\App\\Enums\\Products\\CookingModeEnum)'); + $table->text('cooking_advice')->comment('WYSIWYG - Conseil de réchauffage'); + $table->text('ingredients')->comment('WYSIWYG - Ingrédients qui composent le produit'); + $table->json('nutrionnal_values')->comment('JSON des valeurs nutritionnelles pour 100g'); + $table->boolean('published')->comment('Le produit est-il visible ?'); + $table->unsignedInteger('order')->comment('Numéro permettant d\'ordonner les produits'); + $table->unsignedBigInteger('range_id'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('products'); + } +}; diff --git a/database/migrations/2023_10_18_180112_create_ranges_table.php b/database/migrations/2023_10_18_180112_create_ranges_table.php new file mode 100644 index 0000000..84a7dee --- /dev/null +++ b/database/migrations/2023_10_18_180112_create_ranges_table.php @@ -0,0 +1,52 @@ +id(); + $table->string('seo_title')->comment('Utilisé pour la balise title de la page'); + $table->string('seo_description')->comment('Utilisé pour la balise méta description de la page'); + $table->string('title')->comment('Balise h1 de la page'); + $table->string('slug')->unique()->comment('Slug à partir de title'); + $table->string('subtitle')->comment('Sous-titre de la gamme'); + $table->string('tagline')->comment('Titre d\'accroche de la gamme'); + $table->text('description')->comment('WYSIWYG - Description de la gamme'); + $table->string('picture')->comment('Path de l\'image de la gamme (466px * 440px)'); + $table->string('picture_alt')->comment('Attribut alt pour l\'image picture'); + $table->string('picture_title')->comment('Attribut title pour l\'image picture'); + $table->string('picture_productsheet') + ->comment('Path de l\'image à afficher sur les fiches produits de cette gamme (332px * 442px)'); + $table->string('picture_productsheet_alt') + ->comment('Attribut alt de l\'image à afficher sur les fiches produits'); + $table->string('picture_productsheet_title') + ->comment('Attribut title de l\'image à afficher sur les fiches produits'); + $table->string('picture_thumbnail')->comment('Path de la vignette de la gamme (246px * 337px)'); + $table->string('picture_thumbnail_alt')->comment('Attribut alt de la vignette de la gamme '); + $table->string('picture_thumbnail_title')->comment('Attribut title de la vignette de la gamme '); + $table->unsignedInteger('order')->comment('Numéro permettant d\'ordonner les gammes'); + $table->boolean('published')->comment('La gamme est-elle publiée ?'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('ranges'); + } +}; diff --git a/database/migrations/2023_10_18_180112_create_seasonal_section_table.php b/database/migrations/2023_10_18_180112_create_seasonal_section_table.php new file mode 100644 index 0000000..d19954b --- /dev/null +++ b/database/migrations/2023_10_18_180112_create_seasonal_section_table.php @@ -0,0 +1,41 @@ +id(); + $table->string('title')->comment('Titre de la section saisonnière'); + $table->text('text')->comment('WYSIWYG - Texte de la section saisonnière'); + $table->string('picture')->comment('Path de l\'image de la section saisonnière (362px * 542px)'); + $table->string('picture_alt')->comment('Attribut alt de l\'image'); + $table->string('picture_title')->comment('Attribut title de l\'image'); + $table->unsignedTinyInteger('background') + ->comment('Fond de la section saisonnière (enum \\App\\Enums\\SeasonalSection\\BackgroundEnum)'); + $table->boolean('published')->comment('La section est-elle visible ?'); + $table->timestamp('publish_at')->nullable()->comment('Date de publication de la section'); + $table->timestamp('unpublish_at')->nullable()->comment('Date de dépublication de la section'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('seasonal_section'); + } +}; diff --git a/database/migrations/2023_10_18_180112_create_stamps_table.php b/database/migrations/2023_10_18_180112_create_stamps_table.php new file mode 100644 index 0000000..abd8076 --- /dev/null +++ b/database/migrations/2023_10_18_180112_create_stamps_table.php @@ -0,0 +1,35 @@ +id(); + $table->string('picture')->comment('Path de l\'image du tampon (120px * 120px)'); + $table->string('picture_alt')->comment('Attribut alt de l\'image du tampon'); + $table->string('picture_title')->comment('Attribut title de l\'image du tampon'); + $table->boolean('published')->comment('Le tampon est-il visible ?'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('stamps'); + } +}; diff --git a/database/migrations/2023_10_18_180112_create_static_pages_table.php b/database/migrations/2023_10_18_180112_create_static_pages_table.php new file mode 100644 index 0000000..5683ab4 --- /dev/null +++ b/database/migrations/2023_10_18_180112_create_static_pages_table.php @@ -0,0 +1,37 @@ +id(); + $table->unsignedTinyInteger('type')->unique() + ->comment('Type de la page (enum \\App\\Enums\\StaticPage\\PageTypeEnum)'); + $table->string('seo_title')->comment('Utilisé pour la balise title de la page'); + $table->string('seo_description')->comment('Utilisé pour la balise meta description de la page'); + $table->string('title')->comment('Utilisé pour la balise h1 de la page'); + $table->text('content')->comment('WYSIWYG - Contenu de la page. Peut être une chaîne vide selon le type'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('static_pages'); + } +}; diff --git a/database/migrations/2023_10_18_180112_create_testimonials_table.php b/database/migrations/2023_10_18_180112_create_testimonials_table.php new file mode 100644 index 0000000..0a16b5e --- /dev/null +++ b/database/migrations/2023_10_18_180112_create_testimonials_table.php @@ -0,0 +1,38 @@ +id(); + $table->string('picture')->comment('Path de l\'illustration du témoignage (292px * 417px)'); + $table->string('picture_alt')->comment('Attribut alt de l\'illustration'); + $table->string('picture_title')->comment('Attribut title de l\'illustration'); + $table->string('description')->comment('Texte du témoignage'); + $table->string('job')->comment('Métier de la personne témoignant'); + $table->string('statut')->comment('Statut de la personne témoignant'); + $table->unsignedInteger('order')->comment('Numéro permettant d\'ordonner les témoignages'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('testimonials'); + } +}; diff --git a/database/migrations/2023_10_18_180115_add_foreign_keys_to_explorerpage_commitment_table.php b/database/migrations/2023_10_18_180115_add_foreign_keys_to_explorerpage_commitment_table.php new file mode 100644 index 0000000..04ab240 --- /dev/null +++ b/database/migrations/2023_10_18_180115_add_foreign_keys_to_explorerpage_commitment_table.php @@ -0,0 +1,34 @@ +foreign(['explorerpage_id'])->references(['id'])->on('explorerpages'); + $table->foreign(['commitment_id'])->references(['id'])->on('commitments'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('explorerpage_commitment', function (Blueprint $table) { + $table->dropForeign('explorerpage_commitment_explorerpage_id_foreign'); + $table->dropForeign('explorerpage_commitment_commitment_id_foreign'); + }); + } +}; diff --git a/database/migrations/2023_10_18_180115_add_foreign_keys_to_product_commitment_table.php b/database/migrations/2023_10_18_180115_add_foreign_keys_to_product_commitment_table.php new file mode 100644 index 0000000..0295c21 --- /dev/null +++ b/database/migrations/2023_10_18_180115_add_foreign_keys_to_product_commitment_table.php @@ -0,0 +1,34 @@ +foreign(['product_id'])->references(['id'])->on('products'); + $table->foreign(['commitment_id'])->references(['id'])->on('commitments'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('product_commitment', function (Blueprint $table) { + $table->dropForeign('product_commitment_product_id_foreign'); + $table->dropForeign('product_commitment_commitment_id_foreign'); + }); + } +}; diff --git a/database/migrations/2023_10_18_180115_add_foreign_keys_to_products_table.php b/database/migrations/2023_10_18_180115_add_foreign_keys_to_products_table.php new file mode 100644 index 0000000..22bf481 --- /dev/null +++ b/database/migrations/2023_10_18_180115_add_foreign_keys_to_products_table.php @@ -0,0 +1,32 @@ +foreign(['range_id'])->references(['id'])->on('ranges'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('products', function (Blueprint $table) { + $table->dropForeign('products_range_id_foreign'); + }); + } +};