<?php
namespace App\Entity;
use App\Repository\UserDisabilityRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: UserDisabilityRepository::class)]
class UserDisability
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private ?int $id;
#[ORM\OneToOne(inversedBy: 'userDisability', targetEntity: UserInfo::class)]
private ?UserInfo $userInfo;
#[ORM\Column(type: 'boolean')]
private ?bool $hasIssue;
#[ORM\ManyToOne(targetEntity: GlobalConstant::class)]
#[ORM\JoinColumn(nullable: true, onDelete: 'SET NULL')]
private ?GlobalConstant $type;
#[ORM\ManyToOne(targetEntity: GlobalConstant::class)]
#[ORM\JoinColumn(nullable: true, onDelete: 'SET NULL')]
private ?GlobalConstant $reason;
#[ORM\Column(type: 'integer', nullable: true)]
private ?int $lossRate;
public function getId(): ?int
{
return $this->id;
}
public function getUserInfo(): ?UserInfo
{
return $this->userInfo;
}
public function setUserInfo(?UserInfo $userInfo): self
{
$this->userInfo = $userInfo;
return $this;
}
public function getHasIssue(): ?bool
{
return $this->hasIssue;
}
public function setHasIssue(bool $hasIssue): self
{
$this->hasIssue = $hasIssue;
return $this;
}
public function getLossRate(): ?int
{
return $this->lossRate;
}
public function setLossRate(?int $lossRate): self
{
$this->lossRate = $lossRate;
return $this;
}
public function getType(): ?GlobalConstant
{
return $this->type;
}
public function setType(?GlobalConstant $type): self
{
$this->type = $type;
return $this;
}
public function getReason(): ?GlobalConstant
{
return $this->reason;
}
public function setReason(?GlobalConstant $reason): self
{
$this->reason = $reason;
return $this;
}
public function isHasIssue(): ?bool
{
return $this->hasIssue;
}
}