diff --git a/src/Entity/Account.php b/src/Entity/Account.php new file mode 100644 index 0000000..b2eff99 --- /dev/null +++ b/src/Entity/Account.php @@ -0,0 +1,22 @@ +id; + } +} diff --git a/src/Entity/Project.php b/src/Entity/Project.php new file mode 100644 index 0000000..3101859 --- /dev/null +++ b/src/Entity/Project.php @@ -0,0 +1,59 @@ +account = new Account; + } + + public function getId(): ?int + { + return $this->id; + } + + public function getTitle(): ?string + { + return $this->title; + } + + public function setTitle(string $title): static + { + $this->title = $title; + + return $this; + } + + public function getAccount(): ?Account + { + return $this->account; + } + + public function setAccount(Account $account): static + { + $this->account = $account; + + return $this; + } +} diff --git a/src/Repository/AccountRepository.php b/src/Repository/AccountRepository.php new file mode 100644 index 0000000..7ac26d3 --- /dev/null +++ b/src/Repository/AccountRepository.php @@ -0,0 +1,48 @@ + + * + * @method Account|null find($id, $lockMode = null, $lockVersion = null) + * @method Account|null findOneBy(array $criteria, array $orderBy = null) + * @method Account[] findAll() + * @method Account[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) + */ +class AccountRepository extends ServiceEntityRepository +{ + public function __construct(ManagerRegistry $registry) + { + parent::__construct($registry, Account::class); + } + +// /** +// * @return Account[] Returns an array of Account objects +// */ +// public function findByExampleField($value): array +// { +// return $this->createQueryBuilder('a') +// ->andWhere('a.exampleField = :val') +// ->setParameter('val', $value) +// ->orderBy('a.id', 'ASC') +// ->setMaxResults(10) +// ->getQuery() +// ->getResult() +// ; +// } + +// public function findOneBySomeField($value): ?Account +// { +// return $this->createQueryBuilder('a') +// ->andWhere('a.exampleField = :val') +// ->setParameter('val', $value) +// ->getQuery() +// ->getOneOrNullResult() +// ; +// } +} diff --git a/src/Repository/ProjectRepository.php b/src/Repository/ProjectRepository.php new file mode 100644 index 0000000..477b761 --- /dev/null +++ b/src/Repository/ProjectRepository.php @@ -0,0 +1,48 @@ + + * + * @method Project|null find($id, $lockMode = null, $lockVersion = null) + * @method Project|null findOneBy(array $criteria, array $orderBy = null) + * @method Project[] findAll() + * @method Project[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) + */ +class ProjectRepository extends ServiceEntityRepository +{ + public function __construct(ManagerRegistry $registry) + { + parent::__construct($registry, Project::class); + } + +// /** +// * @return Project[] Returns an array of Project objects +// */ +// public function findByExampleField($value): array +// { +// return $this->createQueryBuilder('p') +// ->andWhere('p.exampleField = :val') +// ->setParameter('val', $value) +// ->orderBy('p.id', 'ASC') +// ->setMaxResults(10) +// ->getQuery() +// ->getResult() +// ; +// } + +// public function findOneBySomeField($value): ?Project +// { +// return $this->createQueryBuilder('p') +// ->andWhere('p.exampleField = :val') +// ->setParameter('val', $value) +// ->getQuery() +// ->getOneOrNullResult() +// ; +// } +}