From 0d06cce559a9ba267a0c9fcbd97f1e048a2f9751 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Munsch?= Date: Fri, 1 Sep 2023 09:30:01 +0200 Subject: [PATCH] contact props hint and comment update --- app/Models/Contact.php | 6 +++--- .../2023_08_25_093125_upgrade_contacts_table.php | 8 ++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/app/Models/Contact.php b/app/Models/Contact.php index 3c43938..49414e5 100644 --- a/app/Models/Contact.php +++ b/app/Models/Contact.php @@ -17,12 +17,12 @@ use Kwaadpepper\Enum\Traits\CastsEnums; * @property integer $app_user_id * @property string $id * @property string $email - * @property string $lastname - * @property string $firstname + * @property string|null $lastname + * @property string|null $firstname * @property string|null $phone * @property array<\App\Lib\Inputs\Definition\Input> $data * @property string|null $notes - * @property array>|null $visits + * @property array> $visits */ class Contact extends Model { diff --git a/database/migrations/2023_08_25_093125_upgrade_contacts_table.php b/database/migrations/2023_08_25_093125_upgrade_contacts_table.php index 0e37587..e124c6b 100644 --- a/database/migrations/2023_08_25_093125_upgrade_contacts_table.php +++ b/database/migrations/2023_08_25_093125_upgrade_contacts_table.php @@ -26,6 +26,14 @@ class UpgradeContactsTable extends Migration * Keep columns, id, notes, visits, app_user_id */ Schema::table('contacts', function (Blueprint $table) { + $table->string('email')->comment('Email du contact, Form Status: System')->change(); + $table->string('lastname')->nullable()->comment('Nom du contact, Form Status: Locked')->change(); + $table->string('firstname')->nullable()->comment('Prénom du contact, Form Status: Locked')->change(); + $table->string('phone')->nullable()->comment('Téléphone du contact, Form Status: Locked')->change(); + $table->string('notes')->nullable()->comment('Notes sur un contact')->change(); + $table->string('visits')->default('[]') + ->comment('Visite d\'un contact, Array<{title:string,note:string}>')->change(); + $table->dropColumn('type'); $table->dropColumn('other'); $table->dropColumn('select1');