Преглед изворни кода

✨ feat(user): adicionar colunas phone, position_label e sector_label para registro via landing page

Fase: dev | Origin: ajuste-cliente
Gustavo Zanatta пре 1 недеља
родитељ
комит
b94b2ee7c4

+ 3 - 0
app/Models/User.php

@@ -19,6 +19,9 @@ use Carbon\Carbon;
  * @property int $id
  * @property string $name
  * @property string $email
+ * @property string|null $phone
+ * @property string|null $position_label
+ * @property string|null $sector_label
  * @property \Illuminate\Support\Carbon|null $email_verified_at
  * @property string $password
  * @property UserTypeEnum $type

+ 24 - 0
database/migrations/2026_04_23_090702_add_phone_and_labels_to_users_table.php

@@ -0,0 +1,24 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+return new class extends Migration
+{
+    public function up(): void
+    {
+        Schema::table('users', function (Blueprint $table) {
+            $table->string('phone', 20)->nullable()->after('email');
+            $table->string('position_label')->nullable()->after('phone');
+            $table->string('sector_label')->nullable()->after('position_label');
+        });
+    }
+
+    public function down(): void
+    {
+        Schema::table('users', function (Blueprint $table) {
+            $table->dropColumn(['phone', 'position_label', 'sector_label']);
+        });
+    }
+};