mirror of https://github.com/kcal-app/kcal.git
73 lines
2.3 KiB
PHP
73 lines
2.3 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
use Illuminate\Foundation\Auth\User as Authenticatable;
|
|
use Illuminate\Notifications\Notifiable;
|
|
|
|
/**
|
|
* App\Models\User
|
|
*
|
|
* @property int $id
|
|
* @property string $name
|
|
* @property string $email
|
|
* @property \Illuminate\Support\Carbon|null $email_verified_at
|
|
* @property string $password
|
|
* @property string|null $remember_token
|
|
* @property \Illuminate\Support\Carbon|null $created_at
|
|
* @property \Illuminate\Support\Carbon|null $updated_at
|
|
* @property-read \Illuminate\Notifications\DatabaseNotificationCollection|\Illuminate\Notifications\DatabaseNotification[] $notifications
|
|
* @property-read int|null $notifications_count
|
|
* @method static \Illuminate\Database\Eloquent\Builder|User newModelQuery()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|User newQuery()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|User query()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|User whereCreatedAt($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|User whereEmail($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|User whereEmailVerifiedAt($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|User whereId($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|User whereName($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|User wherePassword($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|User whereRememberToken($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|User whereUpdatedAt($value)
|
|
* @mixin \Eloquent
|
|
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\Goal[] $goals
|
|
* @property-read int|null $goals_count
|
|
*/
|
|
final class User extends Authenticatable
|
|
{
|
|
use HasFactory, Notifiable;
|
|
|
|
/**
|
|
* @inheritdoc
|
|
*/
|
|
protected $fillable = [
|
|
'name',
|
|
'email',
|
|
'password',
|
|
];
|
|
|
|
/**
|
|
* @inheritdoc
|
|
*/
|
|
protected $hidden = [
|
|
'password',
|
|
'remember_token',
|
|
];
|
|
|
|
/**
|
|
* @inheritdoc
|
|
*/
|
|
protected $casts = [
|
|
'email_verified_at' => 'datetime',
|
|
];
|
|
|
|
/**
|
|
* Get the User's goals.
|
|
*/
|
|
public function goals(): HasMany {
|
|
return $this->hasMany(Goal::class);
|
|
}
|
|
}
|