add connector class for notes and members

This commit is contained in:
Ryan Prather 2025-01-05 06:09:29 +00:00
parent 980affbfbb
commit f0853bfcb2
2 changed files with 110 additions and 0 deletions

View File

@ -0,0 +1,55 @@
<?php
namespace App\Entity;
use App\Repository\StandardNoteMemberRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Types\UuidType;
use Symfony\Component\Uid\Uuid;
#[ORM\Entity(repositoryClass: StandardNoteMemberRepository::class)]
class StandardNoteMember
{
#[ORM\Id]
#[ORM\Column(type: UuidType::NAME, unique: true)]
#[ORM\GeneratedValue(strategy: 'CUSTOM')]
#[ORM\CustomIdGenerator(class: 'doctrine.uuid_generator')]
private ?Uuid $id = null;
#[ORM\ManyToOne]
#[ORM\JoinColumn(nullable: false)]
private ?StandardNote $note = null;
#[ORM\ManyToOne]
#[ORM\JoinColumn(nullable: false)]
private ?Member $person = null;
public function getId(): ?Uuid
{
return $this->id;
}
public function getStandardNote(): ?StandardNote
{
return $this->note;
}
public function setStandardNote(?StandardNote $note): static
{
$this->note = $note;
return $this;
}
public function getPerson(): ?Member
{
return $this->person;
}
public function setPerson(?Member $person): static
{
$this->person = $person;
return $this;
}
}

View File

@ -0,0 +1,55 @@
<?php
namespace App\Entity;
use App\Repository\VisitNoteMembersRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Types\UuidType;
use Symfony\Component\Uid\Uuid;
#[ORM\Entity(repositoryClass: VisitNoteMembersRepository::class)]
class VisitNoteMembers
{
#[ORM\Id]
#[ORM\Column(type: UuidType::NAME, unique: true)]
#[ORM\GeneratedValue(strategy: 'CUSTOM')]
#[ORM\CustomIdGenerator(class: 'doctrine.uuid_generator')]
private ?Uuid $id = null;
#[ORM\ManyToOne]
#[ORM\JoinColumn(nullable: false)]
private ?VisitNote $note = null;
#[ORM\ManyToOne]
#[ORM\JoinColumn(nullable: false)]
private ?Member $person = null;
public function getId(): ?int
{
return $this->id;
}
public function getVisitNote(): ?VisitNote
{
return $this->note;
}
public function setVisitNote(?VisitNote $note): static
{
$this->note = $note;
return $this;
}
public function getPerson(): ?Member
{
return $this->person;
}
public function setPerson(?Member $person): static
{
$this->person = $person;
return $this;
}
}