<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\CustomerPhoneRepository")
*/
class CustomerPhone
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="bigint")
*/
private $id;
/**
* @ORM\Column(type="string", length=32)
*/
private $number;
/**
* @ O R M \Column(type="string", length=255)
* /
private $type;
*/
/**
* @ORM\Column(type="integer")
*/
private $status;
/**
* @ORM\Column(type="datetime")
*/
private $modified_at;
/**
* @ORM\Column(type="datetime")
*/
private $created_at;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Customer", inversedBy="phones")
* @ORM\JoinColumn(nullable=false)
*/
private $customer;
/**
* @ORM\Column(type="string", length=255)
*/
private $title;
/**
* @ORM\Column(type="text")
*/
private $description;
public function __construct ()
{
$this->title = "Phone";
$this->number = "";
$this->type = "";
$this->description = "";
$this->status = 1;
$this->modified_at = new \DateTime("now");
$this->created_at = new \DateTime("now");
}
public function getId()
{
return $this->id;
}
public function getNumber(): ?string
{
return $this->number;
}
public function setNumber(string $number = null): self
{
$this->number = $number ? $number : "";
return $this;
}
/*
public function getType(): ?string
{
return $this->type;
}
public function setType(string $type = null): self
{
$this->type = $type ? $type : "";
return $this;
}
*/
public function getStatus(): ?int
{
return $this->status;
}
public function setStatus(int $status): self
{
$this->status = $status;
return $this;
}
public function getModifiedAt(): ?\DateTimeInterface
{
return $this->modified_at;
}
public function setModifiedAt(\DateTimeInterface $modified_at): self
{
$this->modified_at = $modified_at;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->created_at;
}
public function setCreatedAt(\DateTimeInterface $created_at): self
{
$this->created_at = $created_at;
return $this;
}
public function getCustomer(): ?Customer
{
return $this->customer;
}
public function setCustomer(?Customer $customer): self
{
$this->customer = $customer;
return $this;
}
public function getTitle(): ?string
{
return $this->title;
}
public function setTitle(string $title = null): self
{
$this->title = $title ? $title : "";
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(string $description = null): self
{
$this->description = $description ? $description : "";
return $this;
}
public function __toString ()
{
return $this->number;
}
}