<?php
namespace App\Entity;
use App\Repository\ContractAgreementRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: ContractAgreementRepository::class)]
class ContractAgreement
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $content = null;
#[ORM\OneToOne(inversedBy: 'agreement', targetEntity: Contract::class, cascade: ['persist', 'remove'])]
#[ORM\JoinColumn(name: 'fk_contract', nullable: false)]
private ?Contract $contract = null;
public function getId(): ?int
{
return $this->id;
}
public function getContent(): ?string
{
return $this->content;
}
public function setContent(?string $content): self
{
$this->content = $content;
return $this;
}
public function getContract(): ?Contract
{
return $this->contract;
}
public function setContract(?Contract $contract): self
{
$this->contract = $contract;
return $this;
}
}