From ffef0ddff6aefcd78327fc88c4d1d16e6c38d31a Mon Sep 17 00:00:00 2001 From: Yisroel Baum Date: Sat, 2 May 2026 21:27:28 +0300 Subject: [PATCH] add user property to text entity --- app/Text/CreateTextDto.php | 3 +++ app/Text/Text.php | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/app/Text/CreateTextDto.php b/app/Text/CreateTextDto.php index 31e68e8..6dcda1e 100644 --- a/app/Text/CreateTextDto.php +++ b/app/Text/CreateTextDto.php @@ -2,9 +2,12 @@ namespace App\Text; +use App\User\User; + class CreateTextDto { public function __construct( public string $name, + public User $user, ) {} } diff --git a/app/Text/Text.php b/app/Text/Text.php index 63f4403..27031f0 100644 --- a/app/Text/Text.php +++ b/app/Text/Text.php @@ -2,11 +2,14 @@ namespace App\Text; +use App\User\User; + class Text { public function __construct( private int $id, private string $name, + private User $user, ) {} public function getId(): int @@ -18,4 +21,9 @@ class Text { return $this->name; } + + public function getUser(): User + { + return $this->user; + } }