2025-10-13 14:57:11 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
2026-01-08 21:54:11 +01:00
|
|
|
use Illuminate\Database\Eloquent\Collection;
|
2025-10-13 14:57:11 +02:00
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
|
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
|
|
|
use Illuminate\Foundation\Auth\User as Authenticatable;
|
|
|
|
|
use Illuminate\Notifications\Notifiable;
|
2026-01-06 20:59:16 +01:00
|
|
|
use Laravel\Cashier\Billable;
|
2025-10-13 14:57:11 +02:00
|
|
|
use Laravel\Sanctum\HasApiTokens;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @property int $id
|
|
|
|
|
* @property static PlannerFactory factory($count = null, $state = [])
|
2026-01-08 21:54:11 +01:00
|
|
|
* @property Collection<User> $users
|
2026-01-04 03:58:47 +01:00
|
|
|
* @method static first()
|
2026-01-08 00:37:33 +01:00
|
|
|
* @method static create(array $array)
|
2025-10-13 14:57:11 +02:00
|
|
|
*/
|
|
|
|
|
class Planner extends Authenticatable
|
|
|
|
|
{
|
2026-01-06 20:59:16 +01:00
|
|
|
use Billable, HasApiTokens, HasFactory, Notifiable;
|
2025-10-13 14:57:11 +02:00
|
|
|
|
|
|
|
|
protected $fillable = [
|
|
|
|
|
'name', 'email', 'password',
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
protected $hidden = [
|
|
|
|
|
'password', 'remember_token',
|
|
|
|
|
];
|
|
|
|
|
|
2025-12-28 20:18:27 +01:00
|
|
|
protected $casts = [
|
|
|
|
|
'password' => 'hashed',
|
|
|
|
|
];
|
|
|
|
|
|
2025-10-13 14:57:11 +02:00
|
|
|
public function schedules(): HasMany
|
|
|
|
|
{
|
|
|
|
|
return $this->hasMany(Schedule::class);
|
|
|
|
|
}
|
2026-01-08 21:54:11 +01:00
|
|
|
|
|
|
|
|
public function users(): HasMany
|
|
|
|
|
{
|
|
|
|
|
return $this->hasMany(User::class);
|
|
|
|
|
}
|
2025-10-13 14:57:11 +02:00
|
|
|
}
|