Package system sms

This commit is contained in:
Simon Pocrnjič
2025-10-26 12:57:09 +01:00
parent 266af6595e
commit 369af34ad4
29 changed files with 2639 additions and 330 deletions
@@ -2,6 +2,7 @@
namespace Database\Factories\Person;
use App\Enums\PersonPhoneType;
use App\Models\Person\PhoneType;
use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
@@ -22,6 +23,33 @@ public function definition(): array
'nu' => $this->faker->numerify('06########'),
'type_id' => PhoneType::factory(),
'user_id' => User::factory(),
'validated' => $this->faker->boolean(80),
'phone_type' => PersonPhoneType::Mobile->value,
];
}
public function mobile(): self
{
return $this->state(fn () => ['phone_type' => PersonPhoneType::Mobile->value]);
}
public function landline(): self
{
return $this->state(fn () => ['phone_type' => PersonPhoneType::Landline->value]);
}
public function voip(): self
{
return $this->state(fn () => ['phone_type' => PersonPhoneType::Voip->value]);
}
public function validated(): self
{
return $this->state(fn () => ['validated' => true]);
}
public function notValidated(): self
{
return $this->state(fn () => ['validated' => false]);
}
}