<?php
namespace App\Entity;
use App\Repository\ClaimRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity(repositoryClass=ClaimRepository::class)
*/
class Claim
{
public const TYPE_UNDEFINED = 'undefined';
public const TYPE_MF = 'mf';
public const TYPE_SACH = 'sach';
public const TYPE_GEBAEUDE_SACH = 'gebaeude_sach';
public const TYPE_HAFT = 'haft';
public const TYPE_TECH = 'tech';
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(name="id", type="integer")
*/
private $id;
/**
* @var string
* @ORM\Column(name="claim_type", type="string", length=255)
*/
private $claimType = self::TYPE_UNDEFINED;
/**
* @var string
* @ORM\Column(name="name", type="string", length=255)
*/
private $name;
/**
* @var string
* @ORM\Column(name="email", type="string", length=255)
*/
private $email;
/**
* @var string
* @ORM\Column(name="cc_email", type="string", length=255, nullable=true)
*/
private $ccEmail;
/**
* @var string|null
* @ORM\Column(name="department", type="string", length=255, nullable=true)
*/
private $department;
/**
* @var string|null
* @ORM\Column(name="mf_type", type="string", length=255, nullable=true)
*/
private $mfType;
/**
* @var string|null
* @ORM\Column(name="mf_model", type="string", length=255, nullable=true)
*/
private $mfModel;
/**
* @var string|null
* @ORM\Column(name="mf_plate", type="string", nullable=true)
*/
private $mfPlate;
/**
* @var \DateTime|null
* @ORM\Column(name="claim_date", type="datetime", nullable=true)
*/
private $claimDate;
/**
* @var array|null
* @ORM\Column(name="claim_city", type="json", nullable=true)
*/
private $claimAddress;
/**
* @var string|null
* @ORM\Column(name="claim_description", type="text", nullable=true)
*/
private $claimDescription;
/**
* @var int
* @ORM\Column(name="responsible", type="smallint", nullable=false, options={"default": 0})
*/
private $responsible = 0;
/**
* @var string|null
* @ORM\Column(name="claim_damage_cause", type="string", length=255, nullable=true)
*/
private $claimDamageCause;
/**
* @var string|null
* @ORM\Column(name="claim_damage", type="string", length=255, nullable=true)
*/
private $claimDamage;
/**
* @var string
* @ORM\Column(name="damage_costs", type="decimal", precision=15, scale=2, nullable=true)
*/
private $damageCosts;
/**
* @var string
* @ORM\Column(name="foreign_deductible", type="decimal", precision=15, scale=2, nullable=true)
*/
private $foreignDeductible;
/**
* @var string
* @ORM\Column(name="foreign_damage_costs", type="decimal", precision=15, scale=2, nullable=true)
*/
private $foreignDamageCosts;
/**
* @var array|null
* @ORM\Column(name="involved_person", type="json", nullable=true)
*/
private $involvedPerson;
/**
* @var array|null
* @ORM\Column(name="driver", type="json", nullable=true)
*/
private $driver;
/**
* @var \DateTime|null
* @ORM\Column(name="driver_birthdate", type="date", nullable=true)
*/
private $driverBirthdate;
/**
* @var array|null
* @ORM\Column(name="mf_license", type="json", nullable=true)
*/
private $mfLicense;
/**
* @var string|null
* @ORM\Column(name="police_report", type="string", length=255, nullable=true)
*/
private $policeReport;
/**
* @var \DateTime|null
* @ORM\Column(name="police_report_date", type="date", nullable=true)
*/
private $policeReportDate;
/**
* @var array|null
* @ORM\Column(name="sach_owner", type="json", nullable=true)
*/
private $sachOwner;
/**
* @var array|null
* @ORM\Column(name="damage_by", type="json", nullable=true)
*/
private $damageBy;
/**
* @var array|null
* @ORM\Column(name="injured_person", type="json", nullable=true)
*/
private $injuredPerson;
/**
* @var array|null
* @ORM\Column(name="damaged_item", type="json", nullable=true)
*/
private $damagedItem;
/**
* @var string|null
* @ORM\Column(name="remark", type="text", nullable=true)
*/
private $remark;
/**
* @var array|null
* @ORM\Column(name="items", type="json", nullable=true)
*/
private $items;
/**
* @var array|null
* @ORM\Column(name="persons", type="json", nullable=true)
*/
private $persons;
/**
* @ORM\OneToMany(targetEntity=ClaimFile::class, mappedBy="claim")
*/
private $claimFiles;
/**
* @var \DateTime|null
* @ORM\Column(name="ack_at", type="datetime", nullable=true)
*/
private $ackAt;
/**
* @var \DateTime
* @ORM\Column(name="created_at", type="datetime")
*/
private $createdAt;
/**
* @var \DateTime
* @ORM\Column(name="updated_at", type="datetime")
*/
private $updatedAt;
/**
* @var \DateTime|null
* @ORM\Column(name="deleted_at", type="datetime", nullable=true)
*/
private $deletedAt;
public function __construct()
{
$this->claimFiles = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getClaimType(): string
{
return $this->claimType;
}
public function setClaimType(string $claimType): self
{
$this->claimType = $claimType;
return $this;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmail(string $email): self
{
$this->email = $email;
return $this;
}
public function getCcEmail(): string
{
return $this->ccEmail;
}
public function setCcEmail(string $ccEmail): void
{
$this->ccEmail = $ccEmail;
}
public function getDepartment(): ?string
{
return $this->department;
}
public function setDepartment(string $department): self
{
$this->department = $department;
return $this;
}
public function getMfType(): ?string
{
return $this->mfType;
}
public function setMfType(?string $mfType): self
{
$this->mfType = $mfType;
return $this;
}
public function getMfModel(): ?string
{
return $this->mfModel;
}
public function setMfModel(?string $mfModel): self
{
$this->mfModel = $mfModel;
return $this;
}
public function getMfPlate(): ?string
{
return $this->mfPlate;
}
public function setMfPlate(?string $mfPlate): self
{
$this->mfPlate = $mfPlate;
return $this;
}
public function getClaimDate(): ?\DateTimeInterface
{
return $this->claimDate;
}
public function setClaimDate(?\DateTime $claimDate): self
{
$this->claimDate = $claimDate;
return $this;
}
public function getClaimAddress(): ?array
{
return $this->claimAddress;
}
public function setClaimAddress(?array $claimAddress): self
{
$this->claimAddress = $claimAddress;
return $this;
}
public function getClaimDescription(): ?string
{
return $this->claimDescription;
}
public function setClaimDescription(?string $claimDescription): self
{
$this->claimDescription = $claimDescription;
return $this;
}
public function getResponsible(): string
{
return $this->responsible;
}
public function setResponsible(string $responsible): void
{
$this->responsible = $responsible;
}
public function getClaimDamageCause(): ?string
{
return $this->claimDamageCause;
}
public function setClaimDamageCause(?string $claimDamageCause): void
{
$this->claimDamageCause = $claimDamageCause;
}
public function getClaimDamage(): ?string
{
return $this->claimDamage;
}
public function setClaimDamage(?string $claimDamage): void
{
$this->claimDamage = $claimDamage;
}
public function getDamageCosts(): ?string
{
return $this->damageCosts;
}
public function setDamageCosts(?string $damageCosts): void
{
$this->damageCosts = $damageCosts;
}
public function getForeignDeductible(): ?string
{
return $this->foreignDeductible;
}
public function setForeignDeductible(?string $foreignDeductible): void
{
$this->foreignDeductible = $foreignDeductible;
}
public function getForeignDamageCosts(): ?string
{
return $this->foreignDamageCosts;
}
public function setForeignDamageCosts(?string $foreignDamageCosts): void
{
$this->foreignDamageCosts = $foreignDamageCosts;
}
public function getInvolvedPerson(): ?array
{
return $this->involvedPerson;
}
public function setInvolvedPerson(?array $involvedPerson): void
{
$this->involvedPerson = $involvedPerson;
}
public function getDriver(): ?array
{
return $this->driver;
}
public function setDriver(?array $driver): self
{
$this->driver = $driver;
return $this;
}
public function getDriverBirthdate(): ?\DateTimeInterface
{
return $this->driverBirthdate;
}
public function setDriverBirthdate(?\DateTime $driverBirthdate): self
{
$this->driverBirthdate = $driverBirthdate;
return $this;
}
public function getMfLicense(): ?array
{
return $this->mfLicense;
}
public function setMfLicense(?array $mfLicense): self
{
$this->mfLicense = $mfLicense;
return $this;
}
public function getPoliceReport(): ?string
{
return $this->policeReport;
}
public function setPoliceReport(?string $policeReport): self
{
$this->policeReport = $policeReport;
return $this;
}
public function getPoliceReportDate(): ?\DateTime
{
return $this->policeReportDate;
}
public function setPoliceReportDate(?\DateTime $policeReportDate): self
{
$this->policeReportDate = $policeReportDate;
return $this;
}
public function getSachOwner(): ?array
{
return $this->sachOwner;
}
public function setSachOwner(?array $sachOwner): self
{
$this->sachOwner = $sachOwner;
return $this;
}
public function getDamageBy(): ?array
{
return $this->damageBy;
}
public function setDamageBy(?array $damageBy): self
{
$this->damageBy = $damageBy;
return $this;
}
public function getInjuredPerson(): ?array
{
return $this->injuredPerson;
}
public function setInjuredPerson(?array $injuredPerson): self
{
$this->injuredPerson = $injuredPerson;
return $this;
}
public function getDamagedItem(): ?array
{
return $this->damagedItem;
}
public function setDamagedItem(?array $damagedItem): self
{
$this->damagedItem = $damagedItem;
return $this;
}
public function getRemark(): ?string
{
return $this->remark;
}
public function setRemark(?string $remark): self
{
$this->remark = $remark;
return $this;
}
public function getPersons(): ?array
{
return $this->persons;
}
public function setPersons(?array $persons): self
{
$this->persons = $persons;
return $this;
}
public function getItems(): ?array
{
return $this->items;
}
public function setItems(?array $items): self
{
$this->items = $items;
return $this;
}
/**
* @return Collection<int, ClaimFile>
*/
public function getClaimFiles(): Collection
{
return $this->claimFiles;
}
public function addClaimFile(ClaimFile $claimFile): self
{
if (!$this->claimFiles->contains($claimFile)) {
$this->claimFiles[] = $claimFile;
$claimFile->setClaim($this);
}
return $this;
}
public function removeClaimFile(ClaimFile $claimFile): self
{
if ($this->claimFiles->removeElement($claimFile)) {
// set the owning side to null (unless already changed)
if ($claimFile->getClaim() === $this) {
$claimFile->setClaim(null);
}
}
return $this;
}
public function getAckAt(): ?\DateTimeInterface
{
return $this->ackAt;
}
public function setAckAt(?\DateTime $ackAt): self
{
$this->ackAt = $ackAt;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeInterface $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getUpdatedAt(): ?\DateTimeInterface
{
return $this->updatedAt;
}
public function setUpdatedAt(\DateTimeInterface $updatedAt): self
{
$this->updatedAt = $updatedAt;
return $this;
}
public function getDeletedAt(): ?\DateTimeInterface
{
return $this->deletedAt;
}
public function setDeletedAt(?\DateTimeInterface $deletedAt): self
{
$this->deletedAt = $deletedAt;
return $this;
}
}