This commit is contained in:
Masroor Ehsan 2024-12-30 22:15:59 +06:00
parent d30bf29b13
commit d1f8a2ef53
2 changed files with 11 additions and 5 deletions

View File

@ -27,14 +27,14 @@ public function __construct()
$this->category = Category::GENERAL; $this->category = Category::GENERAL;
} }
public function performedOn(Study $study): static public function on(Study $study): static
{ {
$this->studyId = $study->id; $this->studyId = $study->id;
return $this; return $this;
} }
public function causedBy(Authenticatable|int $user): static public function by(Authenticatable|int $user): static
{ {
if ($user == null) { if ($user == null) {
return $this; return $this;
@ -77,9 +77,9 @@ public function notes(string $notes): static
return $this; return $this;
} }
public function withAgent(): static public function ua(?string $agent = null): static
{ {
$this->userAgent = request()->userAgent(); $this->userAgent = $agent ?? request()->userAgent();
return $this; return $this;
} }

View File

@ -4,5 +4,11 @@
final class Category final class Category
{ {
public const int GENERAL = 1; public const int GENERAL = 10;
public const int SYSTEM = 20;
public const int PACS = 30;
public const int AUTH = 40;
} }