diff --git a/database/migrations/2022_04_05_144756_create_arcadia_brands_table.php b/database/migrations/2022_04_05_144756_create_arcadia_brands_table.php index f42d374..7eed612 100644 --- a/database/migrations/2022_04_05_144756_create_arcadia_brands_table.php +++ b/database/migrations/2022_04_05_144756_create_arcadia_brands_table.php @@ -16,8 +16,8 @@ class CreateArcadiaBrandsTable extends Migration Schema::create('arcadia_brands', function (Blueprint $table) { $table->id(); - $table->unsignedBigInteger('arcadia_id')->unique(); - $table->string('libelle'); + $table->unsignedBigInteger('arcadia_id')->unique()->comment('L\'id de la marque dans arcadia'); + $table->string('libelle')->comment('Le nom de la marque'); $table->timestamps(); }); diff --git a/database/migrations/2022_04_05_145011_create_services_table.php b/database/migrations/2022_04_05_145011_create_services_table.php index ec4835d..8e9ee80 100644 --- a/database/migrations/2022_04_05_145011_create_services_table.php +++ b/database/migrations/2022_04_05_145011_create_services_table.php @@ -16,10 +16,10 @@ class CreateServicesTable extends Migration Schema::create('services', function (Blueprint $table) { $table->id(); - $table->string('name'); - $table->string('bearer_token')->unique(); - $table->string('bearer_pwd', 312); - $table->timestamp('bearer_token_date'); + $table->string('name')->comment('Le nom du service de la marque.'); + $table->string('bearer_token')->unique()->comment('Token pour identifier le service.'); + $table->string('bearer_pwd', 312)->comment('La clé du service pour l\'Api.'); + $table->timestamp('bearer_token_date')->comment('Date de génération des clés bearer du services'); $table->timestamps(); }); diff --git a/database/migrations/2022_04_08_112055_create_arcadia_brand_service_table.php b/database/migrations/2022_04_08_112055_create_arcadia_brand_service_table.php index a21d73d..7ecaeb6 100644 --- a/database/migrations/2022_04_08_112055_create_arcadia_brand_service_table.php +++ b/database/migrations/2022_04_08_112055_create_arcadia_brand_service_table.php @@ -14,8 +14,8 @@ class CreateArcadiaBrandServiceTable extends Migration public function up() { Schema::create('arcadia_brand_service', function (Blueprint $table) { - $table->foreignId('service_id')->constrained('services'); - $table->foreignId('arcadia_brand_id')->constrained('arcadia_brands'); + $table->foreignId('service_id')->constrained('services')->comment('Clé primaire du service'); + $table->foreignId('arcadia_brand_id')->constrained('arcadia_brands')->comment('Clé primaire de la marque'); }); } diff --git a/database/migrations/2022_04_19_102629_create_xml_incos_table.php b/database/migrations/2022_04_19_102629_create_xml_incos_table.php index e15767d..7298f72 100644 --- a/database/migrations/2022_04_19_102629_create_xml_incos_table.php +++ b/database/migrations/2022_04_19_102629_create_xml_incos_table.php @@ -15,27 +15,27 @@ class CreateXmlIncosTable extends Migration public function up() { Schema::create('xml_incos', function (Blueprint $table) { - $table->id()->comment('Inco ID (NO_ART)'); - $table->string('nom')->nullable(); - $table->boolean('prod_saison'); + $table->id()->comment('Inco ID (NO_ART) venant d\'Arcadia'); + $table->string('nom')->nullable()->comment('Nom du produit'); + $table->boolean('prod_saison')->comment('Le produit est-il de saison ?'); - $table->string('allegations')->nullable(); - $table->text('descriptif')->nullable(); + $table->string('allegations')->nullable()->comment('Agregation des champs allegation'); + $table->text('descriptif')->nullable()->comment('descriptif du produit'); $table->json('pictures'); - $table->text('astuces')->nullable(); - $table->string('lib_conso')->nullable(); - $table->string('nb_portion', 20)->nullable(); - $table->string('typ_portion', 200)->nullable(); - $table->string('pds_moy_theo', 20)->nullable(); + $table->text('astuces')->nullable()->comment('Astuces pour le produit'); + $table->string('lib_conso')->nullable()->comment('Libéllé pour le consommateur'); + $table->string('nb_portion', 20)->nullable()->comment('Nombre de portions (pour x personnes)'); + $table->string('typ_portion', 200)->nullable()->comment('Type de portions parts, sachets, dosettes, etc'); + $table->string('pds_moy_theo', 20)->nullable()->comment('Poids moyen théorique'); - $table->text('conseil_prepa')->nullable(); - $table->text('arg_vente')->nullable(); - $table->text('lst_ing')->nullable(); - $table->text('lib_allergene')->nullable(); + $table->text('conseil_prepa')->nullable()->comment('Conseil de préparation'); + $table->text('arg_vente')->nullable()->comment('Argumentaire de vente pour le consommateur.'); + $table->text('lst_ing')->nullable()->comment('Liste des ingrédients'); + $table->text('lib_allergene')->nullable()->comment('Libéllé des alergenes'); - $table->json('nutritional_values'); + $table->json('nutritional_values')->comment('Tableau des valeurs nutritionelles'); - $table->foreignId('arcadia_brand_id')->constrained('arcadia_brands'); + $table->foreignId('arcadia_brand_id')->constrained('arcadia_brands')->comment('Clé primaire de la marque'); $table->timestamps(); }); diff --git a/database/migrations/2022_04_19_145010_create_service_stats.php b/database/migrations/2022_04_19_145010_create_service_stats.php index f2b05f8..a579fb6 100644 --- a/database/migrations/2022_04_19_145010_create_service_stats.php +++ b/database/migrations/2022_04_19_145010_create_service_stats.php @@ -17,9 +17,10 @@ class CreateServiceStats extends Migration Schema::create('service_stats', function (Blueprint $table) { $table->id(); - $table->foreignId('service_id')->constrained('services'); - $table->date('date'); - $table->unsignedBigInteger('nb_calls')->default(0); + $table->foreignId('service_id')->comment('Le clé primaire du service.')->constrained('services'); + $table->date('date')->comment('Le journée concernée.'); + $table->unsignedBigInteger('nb_calls')->default(0) + ->comment('Le nombre d\'appels du service pour la journée.'); $table->timestamps(); });