feat: Add UserDeadline Relation

This commit is contained in:
2024-03-20 18:10:53 +01:00
parent fffe1b4717
commit 95ece0f614
2 changed files with 40 additions and 33 deletions

View File

@@ -63,6 +63,11 @@ class User extends Authenticatable implements MustVerifyEmail
return $this->hasMany(Vote::class);
}
public function deadlinesProgress()
{
return $this->hasMany(UserDeadline::class);
}
public function mustVerifyEmail(): bool
{
return $this instanceof MustVerifyEmail && !$this->hasVerifiedEmail();