From 24670db2aed0a47b7bfc5a28633fe8e644b9747e Mon Sep 17 00:00:00 2001 From: Daniel Subiabre Date: Thu, 11 Apr 2024 12:36:40 +0200 Subject: [PATCH] Add AccountingStatement --- src/Entity/AccountingStatement.php | 69 +++++++++++++++++++ src/Entity/AccountingStatementDirection.php | 10 +++ .../AccountingStatementRepository.php | 48 +++++++++++++ 3 files changed, 127 insertions(+) create mode 100644 src/Entity/AccountingStatement.php create mode 100644 src/Entity/AccountingStatementDirection.php create mode 100644 src/Repository/AccountingStatementRepository.php diff --git a/src/Entity/AccountingStatement.php b/src/Entity/AccountingStatement.php new file mode 100644 index 0000000..4263cc7 --- /dev/null +++ b/src/Entity/AccountingStatement.php @@ -0,0 +1,69 @@ +id; + } + + public function getMoney(): ?Money + { + return $this->money; + } + + public function setMoney(Money $money): static + { + $this->money = $money; + + return $this; + } + + public function getDirection(): ?AccountingStatementDirection + { + return $this->direction; + } + + public function setDirection(AccountingStatementDirection $direction): static + { + $this->direction = $direction; + + return $this; + } +} diff --git a/src/Entity/AccountingStatementDirection.php b/src/Entity/AccountingStatementDirection.php new file mode 100644 index 0000000..d5a80cb --- /dev/null +++ b/src/Entity/AccountingStatementDirection.php @@ -0,0 +1,10 @@ + + * + * @method AccountingStatement|null find($id, $lockMode = null, $lockVersion = null) + * @method AccountingStatement|null findOneBy(array $criteria, array $orderBy = null) + * @method AccountingStatement[] findAll() + * @method AccountingStatement[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) + */ +class AccountingStatementRepository extends ServiceEntityRepository +{ + public function __construct(ManagerRegistry $registry) + { + parent::__construct($registry, AccountingStatement::class); + } + + // /** + // * @return AccountingStatement[] Returns an array of AccountingStatement 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): ?AccountingStatement + // { + // return $this->createQueryBuilder('a') + // ->andWhere('a.exampleField = :val') + // ->setParameter('val', $value) + // ->getQuery() + // ->getOneOrNullResult() + // ; + // } +}