/
vladislavts
/
gcppmsp
Обзор
Документация
Войти
/
vladislavts
/
gcppmsp
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
prod
src/Entity/UserService.php
52 строки
1015 B
Vladislav
Осталось создать Card и настрить запись
29 сен 2022, 22:34
29 сен 2022, 22:34
125c055
Код
Авторство
О чём код?
<?php namespace App\Entity; use App\Repository\UserServiceRepository; use Doctrine\ORM\Mapping as ORM; #[ORM\Entity(repositoryClass: UserServiceRepository::class)] class UserService { #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\ManyToOne(inversedBy: 'userServices')] #[ORM\JoinColumn(nullable: false)] private ?User $worker = null; #[ORM\ManyToOne(inversedBy: 'userServices')] #[ORM\JoinColumn(nullable: false)] private ?Service $service = null; public function getId(): ?int { return $this->id; } public function getWorker(): ?User { return $this->worker; } public function setWorker(?User $worker): self { $this->worker = $worker; return $this; } public function getService(): ?Service { return $this->service; } public function setService(?Service $service): self { $this->service = $service; return $this; } }