Created
March 10, 2018 20:28
-
-
Save EloneSampaio/83cb6668d25a198b481a5ef675220720 to your computer and use it in GitHub Desktop.
This file contains 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 App\Entity; | |
use Doctrine\ORM\Mapping as ORM; | |
use Symfony\Component\Validator\Constraints as Assert; | |
/** | |
* @ORM\Entity(repositoryClass="App\Repository\CargoRepository") | |
*/ | |
class Cargo | |
{ | |
/** | |
* @ORM\Id | |
* @ORM\GeneratedValue | |
* @ORM\Column(type="integer") | |
*/ | |
private $id; | |
// add your own fields | |
/** | |
* @ORM\Column(type="string", length=100) | |
* @Assert\NotBlank() | |
*/ | |
private $nome; | |
public function __toString() | |
{ | |
return $this->getNome(); | |
} | |
/** | |
* @return mixed | |
*/ | |
public function getId() | |
{ | |
return $this->id; | |
} | |
/** | |
* @param mixed $id | |
*/ | |
public function setId($id) | |
{ | |
$this->id = $id; | |
} | |
/** | |
* @return mixed | |
*/ | |
public function getNome() | |
{ | |
return $this->nome; | |
} | |
/** | |
* @param mixed $nome | |
*/ | |
public function setNome($nome) | |
{ | |
$this->nome = $nome; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment