Created
September 30, 2015 17:29
-
-
Save jorgeguberte/74ebee55f408af2071c5 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 Entity; | |
/** | |
* User Model | |
* | |
* @Entity | |
* @Table(name="fornecedor") | |
*/ | |
class Fornecedor | |
{ | |
/** | |
* @Id | |
* @Column(type="integer", nullable=false) | |
* @GeneratedValue(strategy="AUTO") | |
*/ | |
protected $id; | |
/** | |
* @OneToMany(targetEntity="Produto", mappedBy="fornecedor_ir") | |
*/ | |
protected $produtos; | |
/** | |
* @Column(type="string", length=100, nullable=false) | |
*/ | |
protected $nome; | |
/** | |
* @Column(type="datetime", nullable=false) | |
*/ | |
protected $dataCadastro; | |
/** | |
* @Column(type="boolean") | |
*/ | |
protected $status; | |
/** | |
* @Column(type="string", length=200) | |
*/ | |
protected $codigo; | |
public function __construct(){ | |
$this->produtos = new ArrayCollection; | |
} | |
public function setCodigo($codigo){ | |
$this->codigo = $codigo; | |
return $this; | |
} | |
public function setNome($nome) | |
{ | |
$this->nome = $nome; | |
return $this; | |
} | |
public function setDataCadastro($dataCadastro) | |
{ | |
$this->dataCadastro = $dataCadastro; | |
return $this; | |
} | |
public function setStatus($status){ | |
$this->status = $status; | |
return $this; | |
} | |
public function getId() | |
{ | |
return $this->id; | |
} | |
public function getCodigo(){ | |
return $this->codigo; | |
} | |
public function getNome() | |
{ | |
return $this->nome; | |
} | |
public function getDataCadastro() | |
{ | |
return $this->dataCadastro; | |
} | |
public function getStatus() | |
{ | |
return $this->status; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment