mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
initialize entities
This commit is contained in:
130
Entity/Event.php
Normal file
130
Entity/Event.php
Normal file
@@ -0,0 +1,130 @@
|
||||
<?php
|
||||
|
||||
namespace Chill\EventBundle\Entity;
|
||||
|
||||
/**
|
||||
* Event
|
||||
*/
|
||||
class Event
|
||||
{
|
||||
/**
|
||||
* @var integer
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $label;
|
||||
|
||||
/**
|
||||
* @var \DateTime
|
||||
*/
|
||||
private $date;
|
||||
|
||||
/**
|
||||
* @var \Doctrine\Common\Collections\Collection
|
||||
*/
|
||||
private $participations;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->participations = new \Doctrine\Common\Collections\ArrayCollection();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get id
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set label
|
||||
*
|
||||
* @param string $label
|
||||
*
|
||||
* @return Event
|
||||
*/
|
||||
public function setLabel($label)
|
||||
{
|
||||
$this->label = $label;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get label
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getLabel()
|
||||
{
|
||||
return $this->label;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set date
|
||||
*
|
||||
* @param \DateTime $date
|
||||
*
|
||||
* @return Event
|
||||
*/
|
||||
public function setDate($date)
|
||||
{
|
||||
$this->date = $date;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get date
|
||||
*
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getDate()
|
||||
{
|
||||
return $this->date;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add participation
|
||||
*
|
||||
* @param \Chill\EventBundle\Entity\Participation $participation
|
||||
*
|
||||
* @return Event
|
||||
*/
|
||||
public function addParticipation(\Chill\EventBundle\Entity\Participation $participation)
|
||||
{
|
||||
$this->participations[] = $participation;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove participation
|
||||
*
|
||||
* @param \Chill\EventBundle\Entity\Participation $participation
|
||||
*/
|
||||
public function removeParticipation(\Chill\EventBundle\Entity\Participation $participation)
|
||||
{
|
||||
$this->participations->removeElement($participation);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get participations
|
||||
*
|
||||
* @return \Doctrine\Common\Collections\Collection
|
||||
*/
|
||||
public function getParticipations()
|
||||
{
|
||||
return $this->participations;
|
||||
}
|
||||
}
|
169
Entity/EventType.php
Normal file
169
Entity/EventType.php
Normal file
@@ -0,0 +1,169 @@
|
||||
<?php
|
||||
|
||||
namespace Chill\EventBundle\Entity;
|
||||
|
||||
/**
|
||||
* EventType
|
||||
*/
|
||||
class EventType
|
||||
{
|
||||
/**
|
||||
* @var integer
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
private $label;
|
||||
|
||||
/**
|
||||
* @var boolean
|
||||
*/
|
||||
private $active;
|
||||
|
||||
|
||||
/**
|
||||
* Get id
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set label
|
||||
*
|
||||
* @param array $label
|
||||
*
|
||||
* @return EventType
|
||||
*/
|
||||
public function setLabel($label)
|
||||
{
|
||||
$this->label = $label;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get label
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getLabel()
|
||||
{
|
||||
return $this->label;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set active
|
||||
*
|
||||
* @param boolean $active
|
||||
*
|
||||
* @return EventType
|
||||
*/
|
||||
public function setActive($active)
|
||||
{
|
||||
$this->active = $active;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get active
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function getActive()
|
||||
{
|
||||
return $this->active;
|
||||
}
|
||||
/**
|
||||
* @var \Doctrine\Common\Collections\Collection
|
||||
*/
|
||||
private $roles;
|
||||
|
||||
/**
|
||||
* @var \Doctrine\Common\Collections\Collection
|
||||
*/
|
||||
private $statuses;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->roles = new \Doctrine\Common\Collections\ArrayCollection();
|
||||
$this->statuses = new \Doctrine\Common\Collections\ArrayCollection();
|
||||
}
|
||||
|
||||
/**
|
||||
* Add role
|
||||
*
|
||||
* @param \Chill\EventBundle\Entity\Role $role
|
||||
*
|
||||
* @return EventType
|
||||
*/
|
||||
public function addRole(\Chill\EventBundle\Entity\Role $role)
|
||||
{
|
||||
$this->roles[] = $role;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove role
|
||||
*
|
||||
* @param \Chill\EventBundle\Entity\Role $role
|
||||
*/
|
||||
public function removeRole(\Chill\EventBundle\Entity\Role $role)
|
||||
{
|
||||
$this->roles->removeElement($role);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get roles
|
||||
*
|
||||
* @return \Doctrine\Common\Collections\Collection
|
||||
*/
|
||||
public function getRoles()
|
||||
{
|
||||
return $this->roles;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add status
|
||||
*
|
||||
* @param \Chill\EventBundle\Entity\Status $status
|
||||
*
|
||||
* @return EventType
|
||||
*/
|
||||
public function addStatus(\Chill\EventBundle\Entity\Status $status)
|
||||
{
|
||||
$this->statuses[] = $status;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove status
|
||||
*
|
||||
* @param \Chill\EventBundle\Entity\Status $status
|
||||
*/
|
||||
public function removeStatus(\Chill\EventBundle\Entity\Status $status)
|
||||
{
|
||||
$this->statuses->removeElement($status);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get statuses
|
||||
*
|
||||
* @return \Doctrine\Common\Collections\Collection
|
||||
*/
|
||||
public function getStatuses()
|
||||
{
|
||||
return $this->statuses;
|
||||
}
|
||||
}
|
171
Entity/Participation.php
Normal file
171
Entity/Participation.php
Normal file
@@ -0,0 +1,171 @@
|
||||
<?php
|
||||
|
||||
namespace Chill\EventBundle\Entity;
|
||||
|
||||
/**
|
||||
* Participation
|
||||
*/
|
||||
class Participation
|
||||
{
|
||||
/**
|
||||
* @var integer
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var \DateTime
|
||||
*/
|
||||
private $lastUpdate;
|
||||
|
||||
/**
|
||||
* @var \Chill\EventBundle\Entity\Event
|
||||
*/
|
||||
private $event;
|
||||
|
||||
/**
|
||||
* @var \Chill\PersonBundle\Entity\Person
|
||||
*/
|
||||
private $person;
|
||||
|
||||
/**
|
||||
* @var \Chill\EventBundle\Entity\Role
|
||||
*/
|
||||
private $role;
|
||||
|
||||
/**
|
||||
* @var \Chill\EventBundle\Entity\Status
|
||||
*/
|
||||
private $status;
|
||||
|
||||
|
||||
/**
|
||||
* Get id
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set lastUpdate
|
||||
*
|
||||
* @param \DateTime $lastUpdate
|
||||
*
|
||||
* @return Participation
|
||||
*/
|
||||
public function setLastUpdate($lastUpdate)
|
||||
{
|
||||
$this->lastUpdate = $lastUpdate;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get lastUpdate
|
||||
*
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getLastUpdate()
|
||||
{
|
||||
return $this->lastUpdate;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set event
|
||||
*
|
||||
* @param \Chill\EventBundle\Entity\Event $event
|
||||
*
|
||||
* @return Participation
|
||||
*/
|
||||
public function setEvent(\Chill\EventBundle\Entity\Event $event = null)
|
||||
{
|
||||
$this->event = $event;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get event
|
||||
*
|
||||
* @return \Chill\EventBundle\Entity\Event
|
||||
*/
|
||||
public function getEvent()
|
||||
{
|
||||
return $this->event;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set person
|
||||
*
|
||||
* @param \Chill\PersonBundle\Entity\Person $person
|
||||
*
|
||||
* @return Participation
|
||||
*/
|
||||
public function setPerson(\Chill\PersonBundle\Entity\Person $person = null)
|
||||
{
|
||||
$this->person = $person;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get person
|
||||
*
|
||||
* @return \Chill\PersonBundle\Entity\Person
|
||||
*/
|
||||
public function getPerson()
|
||||
{
|
||||
return $this->person;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set role
|
||||
*
|
||||
* @param \Chill\EventBundle\Entity\Role $role
|
||||
*
|
||||
* @return Participation
|
||||
*/
|
||||
public function setRole(\Chill\EventBundle\Entity\Role $role = null)
|
||||
{
|
||||
$this->role = $role;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get role
|
||||
*
|
||||
* @return \Chill\EventBundle\Entity\Role
|
||||
*/
|
||||
public function getRole()
|
||||
{
|
||||
return $this->role;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set status
|
||||
*
|
||||
* @param \Chill\EventBundle\Entity\Status $status
|
||||
*
|
||||
* @return Participation
|
||||
*/
|
||||
public function setStatus(\Chill\EventBundle\Entity\Status $status = null)
|
||||
{
|
||||
$this->status = $status;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get status
|
||||
*
|
||||
* @return \Chill\EventBundle\Entity\Status
|
||||
*/
|
||||
public function getStatus()
|
||||
{
|
||||
return $this->status;
|
||||
}
|
||||
}
|
113
Entity/Role.php
Normal file
113
Entity/Role.php
Normal file
@@ -0,0 +1,113 @@
|
||||
<?php
|
||||
|
||||
namespace Chill\EventBundle\Entity;
|
||||
|
||||
/**
|
||||
* Role
|
||||
*/
|
||||
class Role
|
||||
{
|
||||
/**
|
||||
* @var integer
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
private $label;
|
||||
|
||||
/**
|
||||
* @var boolean
|
||||
*/
|
||||
private $active;
|
||||
|
||||
/**
|
||||
* @var \Chill\EventBundle\Entity\EventType
|
||||
*/
|
||||
private $type;
|
||||
|
||||
|
||||
/**
|
||||
* Get id
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set label
|
||||
*
|
||||
* @param array $label
|
||||
*
|
||||
* @return Role
|
||||
*/
|
||||
public function setLabel($label)
|
||||
{
|
||||
$this->label = $label;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get label
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getLabel()
|
||||
{
|
||||
return $this->label;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set active
|
||||
*
|
||||
* @param boolean $active
|
||||
*
|
||||
* @return Role
|
||||
*/
|
||||
public function setActive($active)
|
||||
{
|
||||
$this->active = $active;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get active
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function getActive()
|
||||
{
|
||||
return $this->active;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set type
|
||||
*
|
||||
* @param \Chill\EventBundle\Entity\EventType $type
|
||||
*
|
||||
* @return Role
|
||||
*/
|
||||
public function setType(\Chill\EventBundle\Entity\EventType $type = null)
|
||||
{
|
||||
$this->type = $type;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get type
|
||||
*
|
||||
* @return \Chill\EventBundle\Entity\EventType
|
||||
*/
|
||||
public function getType()
|
||||
{
|
||||
return $this->type;
|
||||
}
|
||||
}
|
114
Entity/Status.php
Normal file
114
Entity/Status.php
Normal file
@@ -0,0 +1,114 @@
|
||||
<?php
|
||||
|
||||
namespace Chill\EventBundle\Entity;
|
||||
|
||||
/**
|
||||
* Status
|
||||
*/
|
||||
class Status
|
||||
{
|
||||
/**
|
||||
* @var integer
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
private $label;
|
||||
|
||||
/**
|
||||
* @var boolean
|
||||
*/
|
||||
private $active;
|
||||
|
||||
/**
|
||||
* @var \Chill\EventBundle\Entity\EventType
|
||||
*/
|
||||
private $type;
|
||||
|
||||
|
||||
/**
|
||||
* Get id
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set label
|
||||
*
|
||||
* @param array $label
|
||||
*
|
||||
* @return Status
|
||||
*/
|
||||
public function setLabel($label)
|
||||
{
|
||||
$this->label = $label;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get label
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getLabel()
|
||||
{
|
||||
return $this->label;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set active
|
||||
*
|
||||
* @param boolean $active
|
||||
*
|
||||
* @return Status
|
||||
*/
|
||||
public function setActive($active)
|
||||
{
|
||||
$this->active = $active;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get active
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function getActive()
|
||||
{
|
||||
return $this->active;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set type
|
||||
*
|
||||
* @param \Chill\EventBundle\Entity\EventType $type
|
||||
*
|
||||
* @return Status
|
||||
*/
|
||||
public function setType(\Chill\EventBundle\Entity\EventType $type = null)
|
||||
{
|
||||
$this->type = $type;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get type
|
||||
*
|
||||
* @return \Chill\EventBundle\Entity\EventType
|
||||
*/
|
||||
public function getType()
|
||||
{
|
||||
return $this->type;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user