123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556 |
- <?php
- namespace Entity;
- use Doctrine\ORM\Mapping as ORM;
- /**
- * CItemProperty
- *
- * @ORM\Table(name="c_item_property")
- * @ORM\Entity(repositoryClass="Entity\Repository\ItemPropertyRepository")
- */
- class CItemProperty
- {
- /**
- * @var integer
- *
- * @ORM\Column(name="c_id", type="integer", precision=0, scale=0, nullable=false, unique=false)
- */
- private $cId;
- /**
- * @var integer
- *
- * @ORM\Column(name="id", type="integer", precision=0, scale=0, nullable=false, unique=false)
- * @ORM\Id
- * @ORM\GeneratedValue(strategy="IDENTITY")
- */
- private $id;
- /**
- * @var string
- *
- * @ORM\Column(name="tool", type="string", length=100, precision=0, scale=0, nullable=false, unique=false)
- */
- private $tool;
- /**
- * @var integer
- *
- * @ORM\Column(name="insert_user_id", type="integer", precision=0, scale=0, nullable=false, unique=false)
- */
- private $insertUserId;
- /**
- * @var \DateTime
- *
- * @ORM\Column(name="insert_date", type="datetime", precision=0, scale=0, nullable=false, unique=false)
- */
- private $insertDate;
- /**
- * @var \DateTime
- *
- * @ORM\Column(name="lastedit_date", type="datetime", precision=0, scale=0, nullable=false, unique=false)
- */
- private $lasteditDate;
- /**
- * @var integer
- *
- * @ORM\Column(name="ref", type="integer", precision=0, scale=0, nullable=false, unique=false)
- */
- private $ref;
- /**
- * @var string
- *
- * @ORM\Column(name="lastedit_type", type="string", length=100, precision=0, scale=0, nullable=false, unique=false)
- */
- private $lasteditType;
- /**
- * @var integer
- *
- * @ORM\Column(name="lastedit_user_id", type="integer", precision=0, scale=0, nullable=false, unique=false)
- */
- private $lasteditUserId;
- /**
- * @var integer
- *
- * @ORM\Column(name="to_group_id", type="integer", precision=0, scale=0, nullable=true, unique=false)
- */
- private $toGroupId;
- /**
- * @var integer
- *
- * @ORM\Column(name="to_user_id", type="integer", precision=0, scale=0, nullable=true, unique=false)
- */
- private $toUserId;
- /**
- * @var boolean
- *
- * @ORM\Column(name="visibility", type="boolean", precision=0, scale=0, nullable=false, unique=false)
- */
- private $visibility;
- /**
- * @var \DateTime
- *
- * @ORM\Column(name="start_visible", type="datetime", precision=0, scale=0, nullable=true, unique=false)
- */
- private $startVisible;
- /**
- * @var \DateTime
- *
- * @ORM\Column(name="end_visible", type="datetime", precision=0, scale=0, nullable=true, unique=false)
- */
- private $endVisible;
- /**
- * @var integer
- *
- * @ORM\Column(name="id_session", type="integer", precision=0, scale=0, nullable=false, unique=false)
- */
- private $idSession;
- /* Adding many to many relationships */
- /**
- *
- * @ORM\ManyToOne(targetEntity="User")
- * @ORM\JoinColumn(name="to_user_id", referencedColumnName="user_id")
- **/
- private $user;
- /**
- * @ORM\ManyToOne(targetEntity="Course")
- * @ORM\JoinColumn(name="c_id", referencedColumnName="id")
- */
- private $course;
- /**
- * @ORM\ManyToOne(targetEntity="CGroupInfo")
- * @ORM\JoinColumn(name="to_group_id", referencedColumnName="iid")
- */
- private $group;
- /**
- * @ORM\ManyToOne(targetEntity="Session")
- * @ORM\JoinColumn(name="id_session", referencedColumnName="id", nullable=true)
- */
- private $session;
- /**
- * @param Course $course
- */
- public function __construct(Course $course)
- {
- //Mandatory
- $this->course = $course;
- $this->setInsertUserId(api_get_user_id());
- $this->setLasteditUserId(api_get_user_id());
- $this->setInsertDate(new \DateTime());
- $this->setLasteditDate(new \DateTime());
- }
- /**
- * @param User $user
- */
- public function setUser(User $user)
- {
- $this->user = $user;
- }
- /**
- * @param Course $course
- */
- public function setCourse(Course $course)
- {
- $this->course = $course;
- }
- /**
- * @param CGroupInfo $group
- */
- public function setGroup(CGroupInfo $group)
- {
- $this->group = $group;
- }
- /**
- * @param Session $session
- */
- public function setSession(Session $session)
- {
- $this->session = $session;
- }
- /**
- * Set cId
- *
- * @param integer $cId
- *
- * @return CItemProperty
- */
- public function setCId($cId)
- {
- $this->cId = $cId;
- return $this;
- }
- /**
- * Get cId
- *
- * @return integer
- */
- public function getCId()
- {
- return $this->cId;
- }
- /**
- * Set id
- *
- * @param integer $id
- *
- * @return CItemProperty
- */
- public function setId($id)
- {
- $this->id = $id;
- return $this;
- }
- /**
- * Get id
- *
- * @return integer
- */
- public function getId()
- {
- return $this->id;
- }
- /**
- * Set tool
- *
- * @param string $tool
- *
- * @return CItemProperty
- */
- public function setTool($tool)
- {
- $this->tool = $tool;
- return $this;
- }
- /**
- * Get tool
- *
- * @return string
- */
- public function getTool()
- {
- return $this->tool;
- }
- /**
- * Set insertUserId
- *
- * @param integer $insertUserId
- *
- * @return CItemProperty
- */
- public function setInsertUserId($insertUserId)
- {
- $this->insertUserId = $insertUserId;
- return $this;
- }
- /**
- * Get insertUserId
- *
- * @return integer
- */
- public function getInsertUserId()
- {
- return $this->insertUserId;
- }
- /**
- * Set insertDate
- *
- * @param \DateTime $insertDate
- *
- * @return CItemProperty
- */
- public function setInsertDate($insertDate)
- {
- $this->insertDate = $insertDate;
- return $this;
- }
- /**
- * Get insertDate
- *
- * @return \DateTime
- */
- public function getInsertDate()
- {
- return $this->insertDate;
- }
- /**
- * Set lasteditDate
- *
- * @param \DateTime $lasteditDate
- *
- * @return CItemProperty
- */
- public function setLasteditDate($lasteditDate)
- {
- $this->lasteditDate = $lasteditDate;
- return $this;
- }
- /**
- * Get lasteditDate
- *
- * @return \DateTime
- */
- public function getLasteditDate()
- {
- return $this->lasteditDate;
- }
- /**
- * Set ref
- *
- * @param integer $ref
- *
- * @return CItemProperty
- */
- public function setRef($ref)
- {
- $this->ref = $ref;
- return $this;
- }
- /**
- * Get ref
- *
- * @return integer
- */
- public function getRef()
- {
- return $this->ref;
- }
- /**
- * Set lasteditType
- *
- * @param string $lasteditType
- *
- * @return CItemProperty
- */
- public function setLasteditType($lasteditType)
- {
- $this->lasteditType = $lasteditType;
- return $this;
- }
- /**
- * Get lasteditType
- *
- * @return string
- */
- public function getLasteditType()
- {
- return $this->lasteditType;
- }
- /**
- * Set lasteditUserId
- *
- * @param integer $lasteditUserId
- *
- * @return CItemProperty
- */
- public function setLasteditUserId($lasteditUserId)
- {
- $this->lasteditUserId = $lasteditUserId;
- return $this;
- }
- /**
- * Get lasteditUserId
- *
- * @return integer
- */
- public function getLasteditUserId()
- {
- return $this->lasteditUserId;
- }
- /**
- * Set toGroupId
- *
- * @param integer $toGroupId
- *
- * @return CItemProperty
- */
- public function setToGroupId($toGroupId)
- {
- $this->toGroupId = $toGroupId;
- return $this;
- }
- /**
- * Get toGroupId
- *
- * @return integer
- */
- public function getToGroupId()
- {
- return $this->toGroupId;
- }
- /**
- * Set toUserId
- *
- * @param integer $toUserId
- *
- * @return CItemProperty
- */
- public function setToUserId($toUserId)
- {
- $this->toUserId = $toUserId;
- return $this;
- }
- /**
- * Get toUserId
- *
- * @return integer
- */
- public function getToUserId()
- {
- return $this->toUserId;
- }
- /**
- * Set visibility
- *
- * @param boolean $visibility
- *
- * @return CItemProperty
- */
- public function setVisibility($visibility)
- {
- $this->visibility = $visibility;
- return $this;
- }
- /**
- * Get visibility
- *
- * @return boolean
- */
- public function getVisibility()
- {
- return $this->visibility;
- }
- /**
- * Set startVisible
- *
- * @param \DateTime $startVisible
- *
- * @return CItemProperty
- */
- public function setStartVisible($startVisible)
- {
- $this->startVisible = $startVisible;
- return $this;
- }
- /**
- * Get startVisible
- *
- * @return \DateTime
- */
- public function getStartVisible()
- {
- return $this->startVisible;
- }
- /**
- * Set endVisible
- *
- * @param \DateTime $endVisible
- *
- * @return CItemProperty
- */
- public function setEndVisible($endVisible)
- {
- $this->endVisible = $endVisible;
- return $this;
- }
- /**
- * Get endVisible
- *
- * @return \DateTime
- */
- public function getEndVisible()
- {
- return $this->endVisible;
- }
- /**
- * Set idSession
- *
- * @param integer $idSession
- *
- * @return CItemProperty
- */
- public function setIdSession($idSession)
- {
- $this->idSession = $idSession;
- return $this;
- }
- /**
- * Get idSession
- *
- * @return integer
- */
- public function getIdSession()
- {
- return $this->idSession;
- }
- }
|