diff --git a/Entity/Event.php b/Entity/Event.php new file mode 100644 index 000000000..d3e6a8881 --- /dev/null +++ b/Entity/Event.php @@ -0,0 +1,130 @@ +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; + } +} diff --git a/Entity/EventType.php b/Entity/EventType.php new file mode 100644 index 000000000..64c240b53 --- /dev/null +++ b/Entity/EventType.php @@ -0,0 +1,169 @@ +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; + } +} diff --git a/Entity/Participation.php b/Entity/Participation.php new file mode 100644 index 000000000..2c6fdb2f5 --- /dev/null +++ b/Entity/Participation.php @@ -0,0 +1,171 @@ +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; + } +} diff --git a/Entity/Role.php b/Entity/Role.php new file mode 100644 index 000000000..fe98414ab --- /dev/null +++ b/Entity/Role.php @@ -0,0 +1,113 @@ +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; + } +} diff --git a/Entity/Status.php b/Entity/Status.php new file mode 100644 index 000000000..d39a325c3 --- /dev/null +++ b/Entity/Status.php @@ -0,0 +1,114 @@ +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; + } +} diff --git a/Resources/config/doctrine/Event.orm.yml b/Resources/config/doctrine/Event.orm.yml new file mode 100644 index 000000000..3bc880597 --- /dev/null +++ b/Resources/config/doctrine/Event.orm.yml @@ -0,0 +1,20 @@ +Chill\EventBundle\Entity\Event: + type: entity + table: chill_event_event + id: + id: + type: integer + id: true + generator: + strategy: AUTO + fields: + label: + type: string + length: '150' + date: + type: date + oneToMany: + participations: + targetEntity: Chill\EventBundle\Entity\Participation + mappedBy: event + lifecycleCallbacks: { } diff --git a/Resources/config/doctrine/EventType.orm.yml b/Resources/config/doctrine/EventType.orm.yml new file mode 100644 index 000000000..17bc5cadb --- /dev/null +++ b/Resources/config/doctrine/EventType.orm.yml @@ -0,0 +1,22 @@ +Chill\EventBundle\Entity\EventType: + type: entity + table: chill_event_event_type + id: + id: + type: integer + id: true + generator: + strategy: AUTO + fields: + label: + type: json_array + active: + type: boolean + oneToMany: + roles: + targetEntity: Chill\EventBundle\Entity\Role + mappedBy: type + statuses: + targetEntity: Chill\EventBundle\Entity\Status + mappedBy: type + lifecycleCallbacks: { } diff --git a/Resources/config/doctrine/Participation.orm.yml b/Resources/config/doctrine/Participation.orm.yml new file mode 100644 index 000000000..24858afc4 --- /dev/null +++ b/Resources/config/doctrine/Participation.orm.yml @@ -0,0 +1,23 @@ +Chill\EventBundle\Entity\Participation: + type: entity + table: chill_event_participation + id: + id: + type: integer + id: true + generator: + strategy: AUTO + fields: + lastUpdate: + type: datetime + manyToOne: + event: + targetEntity: Chill\EventBundle\Entity\Event + inversedBy: participations + person: + targetEntity: Chill\PersonBundle\Entity\Person + role: + targetEntity: Chill\EventBundle\Entity\Role + status: + targetEntity: Chill\EventBundle\Entity\Status + lifecycleCallbacks: { } diff --git a/Resources/config/doctrine/Role.orm.yml b/Resources/config/doctrine/Role.orm.yml new file mode 100644 index 000000000..8d1723c37 --- /dev/null +++ b/Resources/config/doctrine/Role.orm.yml @@ -0,0 +1,19 @@ +Chill\EventBundle\Entity\Role: + type: entity + table: chill_event_role + id: + id: + type: integer + id: true + generator: + strategy: AUTO + fields: + label: + type: json_array + active: + type: boolean + manyToOne: + type: + targetEntity: Chill\EventBundle\Entity\EventType + inversedBy: roles + lifecycleCallbacks: { } diff --git a/Resources/config/doctrine/Status.orm.yml b/Resources/config/doctrine/Status.orm.yml new file mode 100644 index 000000000..2849b7522 --- /dev/null +++ b/Resources/config/doctrine/Status.orm.yml @@ -0,0 +1,19 @@ +Chill\EventBundle\Entity\Status: + type: entity + table: chill_event_status + id: + id: + type: integer + id: true + generator: + strategy: AUTO + fields: + label: + type: json_array + active: + type: boolean + manyToOne: + type: + targetEntity: Chill\EventBundle\Entity\EventType + inversedBy: statuses + lifecycleCallbacks: { }