src/Entity/CustomerPhone.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * @ORM\Entity(repositoryClass="App\Repository\CustomerPhoneRepository")
  6.  */
  7. class CustomerPhone
  8. {
  9.     /**
  10.      * @ORM\Id()
  11.      * @ORM\GeneratedValue()
  12.      * @ORM\Column(type="bigint")
  13.      */
  14.     private $id;
  15.     /**
  16.      * @ORM\Column(type="string", length=32)
  17.      */
  18.     private $number;
  19.     /**
  20.      * @ O R M \Column(type="string", length=255)
  21.      * /
  22.     private $type;
  23.     */
  24.     /**
  25.      * @ORM\Column(type="integer")
  26.      */
  27.     private $status;
  28.     /**
  29.      * @ORM\Column(type="datetime")
  30.      */
  31.     private $modified_at;
  32.     /**
  33.      * @ORM\Column(type="datetime")
  34.      */
  35.     private $created_at;
  36.     /**
  37.      * @ORM\ManyToOne(targetEntity="App\Entity\Customer", inversedBy="phones")
  38.      * @ORM\JoinColumn(nullable=false)
  39.      */
  40.     private $customer;
  41.     /**
  42.      * @ORM\Column(type="string", length=255)
  43.      */
  44.     private $title;
  45.     /**
  46.      * @ORM\Column(type="text")
  47.      */
  48.     private $description;
  49.     public function __construct ()
  50.     {
  51.         $this->title "Phone";
  52.         $this->number "";
  53.         $this->type "";
  54.         $this->description "";
  55.         $this->status 1;
  56.         
  57.         $this->modified_at = new \DateTime("now");
  58.         $this->created_at = new \DateTime("now");
  59.     }
  60.     
  61.     public function getId()
  62.     {
  63.         return $this->id;
  64.     }
  65.     public function getNumber(): ?string
  66.     {
  67.         return $this->number;
  68.     }
  69.     public function setNumber(string $number null): self
  70.     {
  71.         $this->number $number $number "";
  72.         return $this;
  73.     }
  74.     /*
  75.     public function getType(): ?string
  76.     {
  77.         return $this->type;
  78.     }
  79.     public function setType(string $type = null): self
  80.     {
  81.         $this->type = $type ? $type : "";
  82.         return $this;
  83.     }
  84.     */
  85.     public function getStatus(): ?int
  86.     {
  87.         return $this->status;
  88.     }
  89.     public function setStatus(int $status): self
  90.     {
  91.         $this->status $status;
  92.         return $this;
  93.     }
  94.     public function getModifiedAt(): ?\DateTimeInterface
  95.     {
  96.         return $this->modified_at;
  97.     }
  98.     public function setModifiedAt(\DateTimeInterface $modified_at): self
  99.     {
  100.         $this->modified_at $modified_at;
  101.         return $this;
  102.     }
  103.     public function getCreatedAt(): ?\DateTimeInterface
  104.     {
  105.         return $this->created_at;
  106.     }
  107.     public function setCreatedAt(\DateTimeInterface $created_at): self
  108.     {
  109.         $this->created_at $created_at;
  110.         return $this;
  111.     }
  112.     public function getCustomer(): ?Customer
  113.     {
  114.         return $this->customer;
  115.     }
  116.     public function setCustomer(?Customer $customer): self
  117.     {
  118.         $this->customer $customer;
  119.         return $this;
  120.     }
  121.     public function getTitle(): ?string
  122.     {
  123.         return $this->title;
  124.     }
  125.     public function setTitle(string $title null): self
  126.     {
  127.         $this->title $title $title "";
  128.         return $this;
  129.     }
  130.     public function getDescription(): ?string
  131.     {
  132.         return $this->description;
  133.     }
  134.     public function setDescription(string $description null): self
  135.     {
  136.         $this->description $description $description "";
  137.         return $this;
  138.     }
  139.     
  140.     public function __toString ()
  141.     {
  142.         return $this->number;
  143.     }
  144. }