add: MemberDocument
Add MemberDocument class and assoc repo
This commit is contained in:
parent
6d8fbd5bb8
commit
224a5cd243
132
src/Entity/MemberDocument.php
Normal file
132
src/Entity/MemberDocument.php
Normal file
@ -0,0 +1,132 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use App\Repository\MemberDocumentRepository;
|
||||
use Doctrine\DBAL\Types\Types;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Bridge\Doctrine\Types\UuidType;
|
||||
use Symfony\Component\Uid\Uuid;
|
||||
|
||||
#[ORM\Entity(repositoryClass: MemberDocumentRepository::class)]
|
||||
class MemberDocument
|
||||
{
|
||||
#[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 ?Member $client = null;
|
||||
|
||||
#[ORM\ManyToOne]
|
||||
#[ORM\JoinColumn(nullable: false)]
|
||||
private ?User $caseWorker = null;
|
||||
|
||||
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
|
||||
private ?\DateTimeInterface $clientSigned = null;
|
||||
|
||||
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
|
||||
private ?\DateTimeInterface $workerSigned = null;
|
||||
|
||||
#[ORM\ManyToOne]
|
||||
#[ORM\JoinColumn(nullable: false)]
|
||||
private ?CompanyDocument $document = null;
|
||||
|
||||
#[ORM\Column(nullable: true)]
|
||||
private ?array $clientSignature = null;
|
||||
|
||||
#[ORM\Column(nullable: true)]
|
||||
private ?array $workerSignature = null;
|
||||
|
||||
public function getId(): ?Uuid
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function getClient(): ?Member
|
||||
{
|
||||
return $this->client;
|
||||
}
|
||||
|
||||
public function setClient(?Member $client): static
|
||||
{
|
||||
$this->client = $client;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getCaseWorker(): ?User
|
||||
{
|
||||
return $this->caseWorker;
|
||||
}
|
||||
|
||||
public function setCaseWorker(?User $caseWorker): static
|
||||
{
|
||||
$this->caseWorker = $caseWorker;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getClientSigned(): ?\DateTimeInterface
|
||||
{
|
||||
return $this->clientSigned;
|
||||
}
|
||||
|
||||
public function setClientSigned(?\DateTimeInterface $clientSigned): static
|
||||
{
|
||||
$this->clientSigned = $clientSigned;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getWorkerSigned(): ?\DateTimeInterface
|
||||
{
|
||||
return $this->workerSigned;
|
||||
}
|
||||
|
||||
public function setWorkerSigned(?\DateTimeInterface $workerSigned): static
|
||||
{
|
||||
$this->workerSigned = $workerSigned;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getDocument(): ?CompanyDocument
|
||||
{
|
||||
return $this->document;
|
||||
}
|
||||
|
||||
public function setDocument(?CompanyDocument $document): static
|
||||
{
|
||||
$this->document = $document;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getClientSignature(): ?array
|
||||
{
|
||||
return $this->clientSignature;
|
||||
}
|
||||
|
||||
public function setClientSignature(?array $clientSignature): static
|
||||
{
|
||||
$this->clientSignature = $clientSignature;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getWorkerSignature(): ?array
|
||||
{
|
||||
return $this->workerSignature;
|
||||
}
|
||||
|
||||
public function setWorkerSignature(?array $workerSignature): static
|
||||
{
|
||||
$this->workerSignature = $workerSignature;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
45
src/Repository/MemberDocumentRepository.php
Normal file
45
src/Repository/MemberDocumentRepository.php
Normal file
@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
namespace App\Repository;
|
||||
|
||||
use App\Entity\MemberDocument;
|
||||
use App\Entity\Member;
|
||||
use App\Entity\MemberCase;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
|
||||
/**
|
||||
* @extends ServiceEntityRepository<CaseDocument>
|
||||
*/
|
||||
class MemberDocumentRepository extends ServiceEntityRepository
|
||||
{
|
||||
public function __construct(ManagerRegistry $registry)
|
||||
{
|
||||
parent::__construct($registry, MemberDocument::class);
|
||||
}
|
||||
|
||||
// /**
|
||||
// * @return CaseDocument[] Returns an array of CaseDocument objects
|
||||
// */
|
||||
// public function findByExampleField($value): array
|
||||
// {
|
||||
// return $this->createQueryBuilder('m')
|
||||
// ->andWhere('m.exampleField = :val')
|
||||
// ->setParameter('val', $value)
|
||||
// ->orderBy('m.id', 'ASC')
|
||||
// ->setMaxResults(10)
|
||||
// ->getQuery()
|
||||
// ->getResult()
|
||||
// ;
|
||||
// }
|
||||
|
||||
// public function findOneBySomeField($value): ?CaseDocument
|
||||
// {
|
||||
// return $this->createQueryBuilder('m')
|
||||
// ->andWhere('m.exampleField = :val')
|
||||
// ->setParameter('val', $value)
|
||||
// ->getQuery()
|
||||
// ->getOneOrNullResult()
|
||||
// ;
|
||||
// }
|
||||
}
|
Loading…
Reference in New Issue
Block a user