| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137 |
- <?php
- namespace AppBundle\Entity\Booking;
- use AppBundle\Entity\AccessAndFunction\Access;
- use Doctrine\ORM\Mapping as ORM;
- use Dunglas\ApiBundle\Annotation\Iri;
- use Symfony\Component\Serializer\Annotation\Groups;
- use AppBundle\Entity\Traits\TimestampableEntity;
- use AppBundle\Entity\Traits\CreatorUpdaterEntity;
- /**
- *
- * Travail à faire pour un cours par un utilisateur
- *
- * @Iri("http://schema.org/WorkByUser")
- */
- #[ORM\Entity]
- class WorkByUser
- {
- use TimestampableEntity;
- use CreatorUpdaterEntity;
- /**
- * @var int
- */
- #[ORM\Column(type: 'integer')]
- #[ORM\Id]
- #[ORM\GeneratedValue(strategy: 'AUTO')]
- #[Groups(['workbyuser', 'worksbyusers_db'])]
- private $id;
- /**
- * @var Work
- */
- #[ORM\ManyToOne(targetEntity: 'Work', inversedBy: 'workByUsers')]
- #[Groups(['workbyuser', 'worksbyusers_db'])]
- private $work;
- /**
- * @var Work
- */
- #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\AccessAndFunction\Access', inversedBy: 'workByUsers')]
- #[Groups(['workbyuser'])]
- private $student;
- /**
- * @var boolean
- */
- #[ORM\Column(type: 'boolean', options: ['default' => false])]
- #[Groups(['workbyuser', 'worksbyusers_db'])]
- private $isDone=false;
- /**
- * Sets id.
- *
- * @param int $id
- *
- * @return $this
- */
- public function setId($id)
- {
- $this->id = $id;
- return $this;
- }
- /**
- * Gets id.
- *
- * @return int
- */
- public function getId()
- {
- return $this->id;
- }
- /**
- * Sets work.
- *
- * @param Work $work
- *
- * @return $this
- */
- public function setWork(Work $work = null)
- {
- $this->work = $work;
- return $this;
- }
- /**
- * Gets work.
- *
- * @return Work
- */
- public function getWork()
- {
- return $this->work;
- }
- /**
- * Sets student.
- *
- * @param Access $student
- *
- * @return $this
- */
- public function setStudent(Access $student = null)
- {
- $this->student = $student;
- return $this;
- }
- /**
- * Gets student.
- *
- * @return Access
- */
- public function getStudent()
- {
- return $this->student;
- }
- /**
- * Sets isDone.
- *
- * @param boolean $isDone
- *
- * @return $this
- */
- public function setIsDone($isDone)
- {
- $this->isDone = $isDone;
- return $this;
- }
- /**
- * Gets isDone.
- *
- * @return boolean
- */
- public function getIsDone()
- {
- return $this->isDone;
- }
- }
|