<?php
namespace App\Entity;
use DateTime;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
#[ORM\Entity(repositoryClass: "App\Repository\InsuranceCompanyRepository")]
#[ORM\Table(name: "insurance_company")]
class InsuranceCompany
{
#[ORM\OneToMany(targetEntity: Insurance::class, mappedBy: "insuranceCompany", cascade: ["persist"])]
private Collection|array $insurances;
#[ORM\Column(type: "boolean")]
private bool $isDeleted = false;
#[ORM\Column(name: "createdAt", type: "datetime")]
private DateTime $createdAt;
#[ORM\Column(name: "id", type: "integer")]
#[ORM\Id]
#[ORM\GeneratedValue(strategy: "AUTO")]
private ?int $id;
#[ORM\Column(type: "string", length: 255, nullable: true)]
private ?string $gmapsAddress;
#[ORM\Column(type: "string", length: 255, nullable: true)]
private ?string $city;
#[ORM\Column(name: "zipCode", type: "integer", nullable: true)]
#[Assert\Length(min: 5, max: 5)]
private ?int $zipCode;
#[ORM\Column(name: "streetNumber", type: "integer", nullable: true)]
private ?int $streetNumber;
#[ORM\Column(name: "address", type: "string", length: 255, nullable: true)]
private ?string $address;
#[ORM\Column(name: "name", type: "string", length: 255)]
private string $name;
#[ORM\Column(name: "site", type: "string", length: 255)]
private string $site;
#[ORM\Column(name: "bp", type: "string", length: 255)]
private string $bp;
#[ORM\Column(name: "phone", type: "string", length: 255)]
private string $phone;
#[Assert\Email()]
#[ORM\Column(name: "email", type: "string", length: 255, nullable: true)]
private ?string $email;
public function __construct() {
$this->createdAt = new DateTime();
}
public function __toString() {
return $this->name;
}
/**
* Get id
*
* @return int
*/
public function getId() {
return $this->id;
}
/**
* Set name
*
* @param string $name
*
* @return InsuranceCompany
*/
public function setName($name) {
$this->name = $name;
return $this;
}
/**
* Get name
*
* @return string
*/
public function getName() {
return $this->name;
}
/**
* Set email
*
* @param string $email
*
* @return InsuranceCompany
*/
public function setEmail($email) {
$this->email = $email;
return $this;
}
/**
* Get email
*
* @return string
*/
public function getEmail() {
return $this->email;
}
/**
* Set createdAt
*
* @param DateTime $createdAt
*
* @return InsuranceCompany
*/
public function setCreatedAt($createdAt) {
$this->createdAt = $createdAt;
return $this;
}
/**
* Get createdAt
*
* @return DateTime
*/
public function getCreatedAt() {
return $this->createdAt;
}
/**
* Set gmapsAddress
*
* @param string $gmapsAddress
*
* @return InsuranceCompany
*/
public function setGmapsAddress($gmapsAddress) {
$this->gmapsAddress = $gmapsAddress;
return $this;
}
/**
* Get gmapsAddress
*
* @return string
*/
public function getGmapsAddress() {
return $this->gmapsAddress;
}
/**
* Set city
*
* @param string $city
*
* @return InsuranceCompany
*/
public function setCity($city) {
$this->city = $city;
return $this;
}
/**
* Get city
*
* @return string
*/
public function getCity() {
return $this->city;
}
/**
* Set zipCode
*
* @param integer $zipCode
*
* @return InsuranceCompany
*/
public function setZipCode($zipCode) {
$this->zipCode = $zipCode;
return $this;
}
/**
* Get zipCode
*
* @return integer
*/
public function getZipCode() {
return $this->zipCode;
}
/**
* Set streetNumber
*
* @param integer $streetNumber
*
* @return InsuranceCompany
*/
public function setStreetNumber($streetNumber) {
$this->streetNumber = $streetNumber;
return $this;
}
/**
* Get streetNumber
*
* @return integer
*/
public function getStreetNumber() {
return $this->streetNumber;
}
/**
* Set address
*
* @param string $address
*
* @return InsuranceCompany
*/
public function setAddress($address) {
$this->address = $address;
return $this;
}
/**
* Get address
*
* @return string
*/
public function getAddress() {
return $this->address;
}
/**
* Set user
*
* @param \App\Entity\User $user
*
* @return InsuranceCompany
*/
public function setUser(\App\Entity\User $user) {
$this->user = $user;
return $this;
}
/**
* Get user
*
* @return \App\Entity\User
*/
public function getUser() {
return $this->user;
}
/**
* Set isDeleted
*
* @param boolean $isDeleted
*
* @return InsuranceCompany
*/
public function setIsDeleted($isDeleted) {
$this->isDeleted = $isDeleted;
return $this;
}
/**
* Get isDeleted
*
* @return boolean
*/
public function getIsDeleted() {
return $this->isDeleted;
}
/**
* Set phone.
*
* @param string $phone
*
* @return InsuranceCompany
*/
public function setPhone($phone)
{
$this->phone = $phone;
return $this;
}
/**
* Get phone.
*
* @return string
*/
public function getPhone()
{
return $this->phone;
}
/**
* Set site.
*
* @param string $site
*
* @return InsuranceCompany
*/
public function setSite($site)
{
$this->site = $site;
return $this;
}
/**
* Get site.
*
* @return string
*/
public function getSite()
{
return $this->site;
}
/**
* Set bp.
*
* @param string $bp
*
* @return InsuranceCompany
*/
public function setBp($bp)
{
$this->bp = $bp;
return $this;
}
/**
* Get bp.
*
* @return string
*/
public function getBp()
{
return $this->bp;
}
/**
* Add insurance.
*
* @param \App\Entity\Insurance $insurance
*
* @return InsuranceCompany
*/
public function addInsurance(\App\Entity\Insurance $insurance)
{
$this->insurances[] = $insurance;
return $this;
}
/**
* Remove insurance.
*
* @param \App\Entity\Insurance $insurance
*
* @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
*/
public function removeInsurance(\App\Entity\Insurance $insurance)
{
return $this->insurances->removeElement($insurance);
}
/**
* Get insurances.
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getInsurances()
{
return $this->insurances;
}
}