<?php
namespace App\Entity;
use App\Repository\InjuryDetailRepository;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Symfony\Component\Validator\Constraints as Assert;
#[ORM\Entity(repositoryClass: InjuryDetailRepository::class), ORM\Table(name: 'injury_details')]
class InjuryDetail
{
#[ORM\Id, ORM\GeneratedValue, ORM\Column(type: 'integer')]
private $id;
#[ORM\ManyToOne(targetEntity: InjuredInfo::class, inversedBy: 'injuries', cascade: ['persist']), ORM\JoinColumn(nullable: false)]
#[Assert\Type(type: 'App\Entity\InjuredInfo'), Assert\Valid]
private $injuredInfo;
#[ORM\Column(type: 'string', length: 255), Assert\NotBlank]
private $injuryName;
#[ORM\Column(type: 'string', length: 255), Assert\NotBlank]
private $inflictedSidePart;
#[ORM\Column(type: 'string', length: 100), Assert\NotBlank]
private $injurySize;
#[ORM\Column(type: 'string', length: 100), Assert\NotBlank]
private $shapeMargin;
#[ORM\Column(type: 'string', length: 100), Assert\NotBlank]
private $injuryAge;
#[ORM\Column(type: 'string', length: 100), Assert\NotBlank]
private $weaponType;
#[ORM\Column(type: 'string', length: 100), Assert\NotBlank]
private $injuryNature;
#[Gedmo\Timestampable(on: 'create'), ORM\Column(type: 'datetime')]
private $createdAt;
public function getId(): ?int
{
return $this->id;
}
public function getInjuredInfo(): ?InjuredInfo
{
return $this->injuredInfo;
}
public function setInjuredInfo(?InjuredInfo $injuredInfo): self
{
$this->injuredInfo = $injuredInfo;
return $this;
}
public function getInjuryName(): ?string
{
return $this->injuryName;
}
public function setInjuryName(string $injuryName): self
{
$this->injuryName = $injuryName;
return $this;
}
public function getInflictedSidePart(): ?string
{
return $this->inflictedSidePart;
}
public function setInflictedSidePart(string $inflictedSidePart): self
{
$this->inflictedSidePart = $inflictedSidePart;
return $this;
}
public function getInjurySize(): ?string
{
return $this->injurySize;
}
public function setInjurySize(string $injurySize): self
{
$this->injurySize = $injurySize;
return $this;
}
public function getShapeMargin(): ?string
{
return $this->shapeMargin;
}
public function setShapeMargin(string $shapeMargin): self
{
$this->shapeMargin = $shapeMargin;
return $this;
}
public function getInjuryAge(): ?string
{
return $this->injuryAge;
}
public function setInjuryAge(string $injuryAge): self
{
$this->injuryAge = $injuryAge;
return $this;
}
public function getWeaponType(): ?string
{
return $this->weaponType;
}
public function setWeaponType(string $weaponType): self
{
$this->weaponType = $weaponType;
return $this;
}
public function getInjuryNature(): ?string
{
return $this->injuryNature;
}
public function setInjuryNature(string $injuryNature): self
{
$this->injuryNature = $injuryNature;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->createdAt;
}
}