add user property to text entity
This commit is contained in:
parent
dfa0bc6c00
commit
ffef0ddff6
2 changed files with 11 additions and 0 deletions
|
|
@ -2,9 +2,12 @@
|
|||
|
||||
namespace App\Text;
|
||||
|
||||
use App\User\User;
|
||||
|
||||
class CreateTextDto
|
||||
{
|
||||
public function __construct(
|
||||
public string $name,
|
||||
public User $user,
|
||||
) {}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue