add user property to text entity

This commit is contained in:
Yisroel Baum 2026-05-02 21:27:28 +03:00
parent dfa0bc6c00
commit ffef0ddff6
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9
2 changed files with 11 additions and 0 deletions

View file

@ -2,9 +2,12 @@
namespace App\Text;
use App\User\User;
class CreateTextDto
{
public function __construct(
public string $name,
public User $user,
) {}
}

View file

@ -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;
}
}