src/Entity/CustomerWebsite.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\CustomerWebsiteRepository")
  6.  */
  7. class CustomerWebsite
  8. {
  9.     /**
  10.      * @ORM\Id()
  11.      * @ORM\GeneratedValue()
  12.      * @ORM\Column(type="bigint")
  13.      */
  14.     private $id;
  15.     /**
  16.      * @ORM\Column(type="string", length=255)
  17.      */
  18.     private $site_url;
  19.     
  20.     /**
  21.      * @ORM\Column(type="string", length=255)
  22.      */
  23.     private $site_text;
  24.     
  25.     /**
  26.      * @ORM\Column(type="integer")
  27.      */
  28.     private $status;
  29.     /**
  30.      * @ORM\Column(type="datetime")
  31.      */
  32.     private $modified_at;
  33.     /**
  34.      * @ORM\Column(type="datetime")
  35.      */
  36.     private $created_at;
  37.     /**
  38.      * @ORM\ManyToOne(targetEntity="App\Entity\Customer", inversedBy="websites")
  39.      * @ORM\JoinColumn(nullable=false)
  40.      */
  41.     private $customer;
  42.     
  43.     public function __construct ()
  44.     {
  45.         $this->site_url "";
  46.         $this->site_text "";
  47.         $this->status 1;
  48.         
  49.         $this->modified_at = new \DateTime("now");
  50.         $this->created_at = new \DateTime("now");
  51.     }
  52.     
  53.     public function getId()
  54.     {
  55.         return $this->id;
  56.     }
  57.     
  58.     public function getSiteUrl(): ?string
  59.     {
  60.         return $this->site_url;
  61.     }
  62.     
  63.     public function setSiteUrl(string $site_url null): self
  64.     {
  65.         $this->site_url $site_url $site_url "";
  66.         return $this;
  67.     }
  68.     
  69.     public function getSiteText(): ?string
  70.     {
  71.         return $this->site_text;
  72.     }
  73.     
  74.     public function setSiteText(string $site_text null): self
  75.     {
  76.         $this->site_text $site_text $site_text "";
  77.         return $this;
  78.     }
  79.     
  80.     public function getSiteDisplayText(): ?string
  81.     {
  82.         return $this->site_text $this->site_text $this->site_url;
  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.     
  122.     public function __toString ()
  123.     {
  124.         return $this->site_url;
  125.     }
  126.     
  127. }