Add beginning of a project management system to placeholders

This commit is contained in:
Alex Cabal 2024-12-14 19:03:04 -06:00
parent e56de4b19d
commit adfe07aad9
42 changed files with 717 additions and 118 deletions

View file

@ -345,6 +345,34 @@ class User{
', [$uuid], User::class)[0] ?? throw new Exceptions\UserNotFoundException();
}
/**
* @return array<User>
*/
public static function GetAllByCanManageProjects(): array{
return Db::Query('
SELECT u.*
from Users u
inner join Benefits b
using (UserId)
where b.CanManageProjects = true
order by Name asc
', [], User::class);
}
/**
* @return array<User>
*/
public static function GetAllByCanReviewProjects(): array{
return Db::Query('
SELECT u.*
from Users u
inner join Benefits b
using (UserId)
where b.CanReviewProjects = true
order by Name asc
', [], User::class);
}
/**
* Get a `User` if they are considered "registered".
*