src/Entity/CRM/Contract.php line 10
<?phpnamespace App\Entity\CRM;use App\Entity\CRM\Order;use App\Repository\ContractRepository;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: ContractRepository::class)]class Contract{#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\Column(length: 255)]private ?string $name = null;#[ORM\OneToOne(mappedBy: 'contract', cascade: ['persist', 'remove'])]private ?Order $orderInstance = null;#[ORM\ManyToOne(inversedBy: 'contracts')]#[ORM\JoinColumn(nullable: false)]private ?ContractTemplate $contractTemplate = null;#[ORM\ManyToOne(targetEntity: self::class)]private ?self $parentContract = null;public function __toString(): string{return $this->name;}public function getId(): ?int{return $this->id;}public function getName(): ?string{return $this->name;}public function setName(string $name): static{$this->name = $name;return $this;}public function getOrderInstance(): ?Order{return $this->orderInstance;}public function setOrderInstance(?Order $orderInstance): static{// unset the owning side of the relation if necessaryif ($orderInstance === null && $this->orderInstance !== null) {$this->orderInstance->setContract(null);}// set the owning side of the relation if necessaryif ($orderInstance !== null && $orderInstance->getContract() !== $this) {$orderInstance->setContract($this);}$this->orderInstance = $orderInstance;return $this;}public function getContractTemplate(): ?ContractTemplate{return $this->contractTemplate;}public function setContractTemplate(?ContractTemplate $contractTemplate): static{$this->contractTemplate = $contractTemplate;return $this;}public function getParentContract(): ?Contract{return $this->parentContract;}public function setParentContract(?Contract $parentContract): void{$this->parentContract = $parentContract;}}