Created
October 17, 2014 12:36
-
-
Save cakper/bb3741ea77c99976454f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Dcwroc\TaskBundle\Entity; | |
use Symfony\Component\Validator\Constraints as Assert; | |
class Task | |
{ | |
/** | |
* @Assert\NotBlank() | |
* @Assert\Length(min="3") | |
*/ | |
private $name; | |
/** | |
* @Assert\NotBlank() | |
* @Assert\Date() | |
*/ | |
private $dueDate; | |
/** | |
* @Assert\NotBlank() | |
* @Assert\Type(type="boolean") | |
*/ | |
private $completed = false; | |
/** | |
* @return boolean | |
*/ | |
public function isCompleted() | |
{ | |
return $this->completed; | |
} | |
/** | |
* @param boolean $completed | |
*/ | |
public function setCompleted($completed) | |
{ | |
$this->completed = $completed; | |
} | |
/** | |
* @return mixed | |
*/ | |
public function getDueDate() | |
{ | |
return $this->dueDate; | |
} | |
/** | |
* @param mixed $dueDate | |
*/ | |
public function setDueDate($dueDate) | |
{ | |
$this->dueDate = $dueDate; | |
} | |
/** | |
* @return mixed | |
*/ | |
public function getName() | |
{ | |
return $this->name; | |
} | |
/** | |
* @param mixed $name | |
*/ | |
public function setName($name) | |
{ | |
$this->name = $name; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment