<?php
namespace App\Entity;
use App\Repository\PercentageRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: PercentageRepository::class)]
class Percentage
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
/*
#[ORM\OneToMany(mappedBy: 'percentage', targetEntity: Landlords::class)]
private Collection $landlord;
*/
#[ORM\Column(length: 255, nullable: true)]
private ?string $ownershipPercentage = null;
#[ORM\ManyToOne(inversedBy: 'percentages',cascade: ['persist'])]
private ?PropertyList $property = null;
#[ORM\ManyToOne(inversedBy: 'percentages',cascade: ['persist'])]
private ?Landlords $landlord = null;
public function __construct()
{
//$this->landlord = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getOwnershipPercentage(): ?string
{
return $this->ownershipPercentage;
}
public function setOwnershipPercentage(?string $ownershipPercentage): self
{
$this->ownershipPercentage = $ownershipPercentage;
return $this;
}
/*
public function getProperty(): ?PropertyList
{
return $this->property;
}
public function setProperty(?PropertyList $property): self
{
$this->property = $property;
return $this;
}
public function getLandlord(): ?Landlords
{
return $this->landlord;
}
public function setLandlord(?Landlords $landlord): self
{
$this->landlord = $landlord;
return $this;
}
*/
public function getProperty(): ?PropertyList
{
return $this->property;
}
public function setProperty(?PropertyList $property): self
{
$this->property = $property;
return $this;
}
public function getLandlord(): ?Landlords
{
return $this->landlord;
}
public function setLandlord(?Landlords $landlord): self
{
$this->landlord = $landlord;
return $this;
}
}