src/Entity/Comptes.php line 15

Open in your IDE?
  1. <?php
  2. /**
  3.  * Compte.php
  4.  * Created by Stéphane Brun
  5.  * Date: 2018-03-29 at 13:21
  6.  */
  7. namespace App\Entity;
  8. use Doctrine\ORM\Mapping as ORM;
  9. /**
  10.  * @ORM\Entity
  11.  * @ORM\Table(name="tcomptes")
  12.  */
  13. class Comptes
  14. {
  15.     const COMPTE_ACCOMPTE 30202;
  16.     /**
  17.      * @ORM\Column(type="integer")
  18.      * @ORM\Id
  19.      * @ORM\GeneratedValue(strategy="AUTO")
  20.      */
  21.     protected $id;
  22.     /**
  23.      * @ORM\Column(name="cnom", type="string", length=50)
  24.      */
  25.     protected $nom;
  26.     /**
  27.      * One Product has Many Features.
  28.      * @ORM\OneToMany(targetEntity="Debourse", mappedBy="compte")
  29.      */
  30.     protected $debourse;
  31.     /**
  32.      * has one Company
  33.      *
  34.      * @ORM\ManyToOne(targetEntity="App\Entity\Company")
  35.      * @ORM\JoinColumn(name="company_id", referencedColumnName="id", nullable=true)
  36.      */
  37.     protected $company;
  38.     public function __toString()
  39.     {
  40.         return $this->getNom();
  41.     }
  42.     /**
  43.      * @return mixed
  44.      */
  45.     public function getId()
  46.     {
  47.         return $this->id;
  48.     }
  49.     /**
  50.      * @return mixed
  51.      */
  52.     public function getNom()
  53.     {
  54.         return $this->nom;
  55.     }
  56.     /**
  57.      * @param mixed $nom
  58.      */
  59.     public function setNom($nom)
  60.     {
  61.         $this->nom $nom;
  62.     }
  63.     /**
  64.      * @return mixed
  65.      */
  66.     public function getCompany()
  67.     {
  68.         return $this->company;
  69.     }
  70.     /**
  71.      * @param Company $company
  72.      */
  73.     public function setCompany(Company $company)
  74.     {
  75.         $this->company $company;
  76.     }
  77.     /**
  78.      * @return mixed
  79.      */
  80.     public function getDebourse()
  81.     {
  82.         return $this->debourse;
  83.     }
  84.     /**
  85.      * @param mixed $debourse
  86.      */
  87.     public function setDebourse($debourse)
  88.     {
  89.         $this->debourse $debourse;
  90.     }
  91. }