Removed old Poll* entities, wrote it back to TODO

Polls will be implemented later (maybe much later)

Signed-off-by: Gergely Polonkai <polesz@w00d5t0ck.info>
This commit is contained in:
Polonkai Gergely 2012-08-01 22:15:12 +02:00
parent 7f83e2f9c4
commit a181bfd4db
3 changed files with 27 additions and 570 deletions

40
TODO
View File

@ -1,5 +1,30 @@
Polls (Entity already exists) User
Groups (Entity already exists) FavouriteForumTopics
Poll
id
createdAt
createdBy
updatedAt
updatedBy
updateReason
endTime (timestamp/date?)
answers (ArrayCollection of PollAnswers)
text
anyoneCanAddAnswers
multiselect
voters (is it really required?)
PollAnswer
id
createdAt
createdBy
updatedAt
updatedBy
updateReason
voters
poll (back-reference to Poll)
text
Article check if public Article check if public
UserForumViewed UserForumViewed
@ -25,15 +50,10 @@ ForumTopic
locked locked
ForumPost ForumPost
id
forum topic
creator
timestamp
last edited by last edited by
last edited timestamp last edited timestamp
last edit reason last edit reason
edit count edit count
text
Library Library
id id
@ -47,15 +67,9 @@ Library
commentable commentable
Event Event
id
creator
created at
last edited by last edited by
last edited timestamp last edited timestamp
last edit reason last edit reason
start time
end time (may be null)
description
location location
commentable commentable

View File

@ -1,292 +0,0 @@
<?php
namespace KekRozsak\FrontBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use KekRozsak\FrontBundle\Entity\User;
/**
* KekRozsak\FrontBundle\Entity\Poll
* @ORM\Entity
* @ORM\Table(name="polls")
*/
class Poll
{
/**
* @var integer $id
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
* @ORM\Column(type="integer")
*/
private $id;
/**
* @var DateTime $createdAt
* @ORM\Column(type="datetime", nullable=false, name="created_at")
*/
private $createdAt;
/**
* @var DateTime $updatedAt
* @ORM\Column(type="datetime", name="updated_at")
*/
private $updatedAt;
/**
* @var text $updateReason
* @ORM\Column(type="text", name="update_reason")
*/
private $updateReason;
/**
* @var DateTime $pollEnd
* @ORM\Column(type="datetime", nullable=false, name="poll_end")
*/
private $pollEnd;
/**
* @var \Doctrine\Common\Collections\ArrayCollection
* @ORM\OneToMany(targetEntity="PollAnswer", mappedBy="answers")
*/
private $answers;
/**
* @var KekRozsak\FrontBundle\Entity\User
* @ORM\ManyToOne(targetEntity="User")
* @ORM\JoinColumn(name="created_by_id", referencedColumnName="id")
*/
private $createdBy;
/**
* @var KekRozsak\FrontBundle\Entity\User
* @ORM\ManyToOne(targetEntity="User")
* @ORM\JoinColumn(name="updated_by_id", referencedColumnName="id")
*/
private $updatedBy;
public function __construct()
{
$this->answers = new \Doctrine\Common\Collections\ArrayCollection();
}
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set createdAt
*
* @param datetime $createdAt
* @return Poll
*/
public function setCreatedAt($createdAt)
{
$this->createdAt = $createdAt;
return $this;
}
/**
* Get createdAt
*
* @return datetime
*/
public function getCreatedAt()
{
return $this->createdAt;
}
/**
* Set updatedAt
*
* @param datetime $updatedAt
* @return Poll
*/
public function setUpdatedAt($updatedAt = null)
{
$this->updatedAt = $updatedAt;
return $this;
}
/**
* Get updatedAt
*
* @return datetime
*/
public function getUpdatedAt()
{
return $this->updatedAt;
}
/**
* Set updateReason
*
* @param text $updateReason
* @return Poll
*/
public function setUpdateReason($updateReason = null)
{
$this->updateReason = $updateReason;
return $this;
}
/**
* Get updateReason
*
* @return text
*/
public function getUpdateReason()
{
return $this->updateReason;
}
/**
* Set pollEnd
*
* @param datetime $pollEnd
* @return Poll
*/
public function setPollEnd($pollEnd = null)
{
$this->pollEnd = $pollEnd;
return $this;
}
/**
* Get pollEnd
*
* @return datetime
*/
public function getPollEnd()
{
return $this->pollEnd;
}
/**
* Add answers
*
* @param KekRozsak\FrontBundle\Entity\PollAnswer $answers
* @return Poll
*/
public function addPollAnswer(\KekRozsak\FrontBundle\Entity\PollAnswer $answers)
{
$this->answers[] = $answers;
return $this;
}
/**
* Get answers
*
* @return Doctrine\Common\Collections\Collection
*/
public function getAnswers()
{
return $this->answers;
}
/**
* Set createdBy
*
* @param KekRozsak\FrontBundle\Entity\User $createdBy
* @return Poll
*/
public function setCreatedBy(\KekRozsak\FrontBundle\Entity\User $createdBy)
{
$this->createdBy = $createdBy;
return $this;
}
/**
* Get createdBy
*
* @return KekRozsak\FrontBundle\Entity\User
*/
public function getCreatedBy()
{
return $this->createdBy;
}
/**
* Set updatedBy
*
* @param KekRozsak\FrontBundle\Entity\User $updatedBy
* @return Poll
*/
public function setUpdatedBy(\KekRozsak\FrontBundle\Entity\User $updatedBy = null)
{
$this->updatedBy = $updatedBy;
return $this;
}
/**
* Get updatedBy
*
* @return KekRozsak\FrontBundle\Entity\User
*/
public function getUpdatedBy()
{
return $this->updatedBy;
}
/**
* @var text $text
* @ORM\Column(type="text", nullable=false)
*/
private $text;
/**
* @var boolean $anyoneCanAddAnswers
* @ORM\Column(type="boolean", nullable=false)
*/
private $anyoneCanAddAnswers;
/**
* Set text
*
* @param text $text
* @return Poll
*/
public function setText($text)
{
$this->text = $text;
return $this;
}
/**
* Get text
*
* @return text
*/
public function getText()
{
return $this->text;
}
/**
* Set anyoneCanAddAnswers
*
* @param boolean $anyoneCanAddAnswers
* @return Poll
*/
public function setAnyoneCanAddAnswers($anyoneCanAddAnswers)
{
$this->anyoneCanAddAnswers = $anyoneCanAddAnswers;
return $this;
}
/**
* Get anyoneCanAddAnswers
*
* @return boolean
*/
public function getAnyoneCanAddAnswers()
{
return $this->anyoneCanAddAnswers;
}
}

View File

@ -1,265 +0,0 @@
<?php
namespace KekRozsak\FrontBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use KekRozsak\FrontBundle\Entity\User;
use KekRozsak\FrontBundle\Entity\Poll;
/**
* KekRozsak\FrontBundle\Entity\PollAnswer
* @ORM\Entity
* @ORM\Table(name="poll_answers")
*/
class PollAnswer
{
/**
* @var integer $id
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
* @ORM\Column(type="integer")
*/
private $id;
/**
* @var DateTime $createdAt
* @ORM\Column(name="created_at", type="datetime")
*/
private $createdAt;
/**
* @var DateTime $updatedAt
* @ORM\Column(name="updated_at", type="datetime")
*/
private $updatedAt;
/**
* @var text $updateReason
* @ORM\Column(type="text", name="update_reason", nullable=true)
*/
private $updateReason;
/**
* @var \Doctrine\Common\Collections\ArrayCollection
* @ORM\ManyToMany(targetEntity="User", inversedBy="pollVotes")
*/
private $voters;
/**
* @var User
* @ORM\ManyToOne(targetEntity="User")
* @ORM\JoinColumn(name="created_by_id")
*/
private $createdBy;
/**
* @var User
* @ORM\ManyToOne(targetEntity="User")
* @ORM\JoinColumn(name="updated_by_id")
*/
private $updatedBy;
/**
* @var poll
* @ORM\ManyToOne(targetEntity="Poll", inversedBy="answers")
*/
private $poll;
public function __construct()
{
$this->voters = new \Doctrine\Common\Collections\ArrayCollection();
}
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set createdAt
*
* @param datetime $createdAt
* @return PollAnswer
*/
public function setCreatedAt($createdAt)
{
$this->createdAt = $createdAt;
return $this;
}
/**
* Get createdAt
*
* @return datetime
*/
public function getCreatedAt()
{
return $this->createdAt;
}
/**
* Set updatedAt
*
* @param datetime $updatedAt
* @return PollAnswer
*/
public function setUpdatedAt($updatedAt)
{
$this->updatedAt = $updatedAt;
return $this;
}
/**
* Get updatedAt
*
* @return datetime
*/
public function getUpdatedAt()
{
return $this->updatedAt;
}
/**
* Set updateReason
*
* @param text $updateReason
* @return PollAnswer
*/
public function setUpdateReason($updateReason)
{
$this->updateReason = $updateReason;
return $this;
}
/**
* Get updateReason
*
* @return text
*/
public function getUpdateReason()
{
return $this->updateReason;
}
/**
* Add voters
*
* @param User $voters
* @return PollAnswer
*/
public function addVoters(User $voters)
{
$this->voters[] = $voters;
return $this;
}
/**
* Get voters
*
* @return Doctrine\Common\Collections\Collection
*/
public function getVoters()
{
return $this->voters;
}
/**
* Set createdBy
*
* @param User $createdBy
* @return PollAnswer
*/
public function setCreatedBy(User $createdBy = null)
{
$this->createdBy = $createdBy;
return $this;
}
/**
* Get createdBy
*
* @return User
*/
public function getCreatedBy()
{
return $this->createdBy;
}
/**
* Set updatedBy
*
* @param User $updatedBy
* @return PollAnswer
*/
public function setUpdatedBy(User $updatedBy = null)
{
$this->updatedBy = $updatedBy;
return $this;
}
/**
* Get updatedBy
*
* @return User
*/
public function getUpdatedBy()
{
return $this->updatedBy;
}
/**
* Set poll
*
* @param Poll $poll
* @return PollAnswer
*/
public function setPoll(Poll $poll = null)
{
$this->poll = $poll;
return $this;
}
/**
* Get poll
*
* @return Poll
*/
public function getPoll()
{
return $this->poll;
}
/**
* @var string $text
* @ORM\Column(type="text", nullable=false)
*/
private $text;
/**
* Set text
*
* @param string $text
* @return PollAnswer
*/
public function setText($text)
{
$this->text = $text;
return $this;
}
/**
* Get text
*
* @return string
*/
public function getText()
{
return $this->text;
}
}