diff --git a/src/Entity/Wishlist.php b/src/Entity/Wishlist.php new file mode 100644 index 0000000000000000000000000000000000000000..f06e40e152d85a5bd4297d823f8c48edbcd2f4c1 --- /dev/null +++ b/src/Entity/Wishlist.php @@ -0,0 +1,66 @@ +<?php + +namespace App\Entity; + +use App\Repository\WishlistRepository; +use Doctrine\DBAL\Types\Types; +use Doctrine\ORM\Mapping as ORM; + +#[ORM\Entity(repositoryClass: WishlistRepository::class)] +class Wishlist +{ + #[ORM\Id] + #[ORM\GeneratedValue] + #[ORM\Column] + private ?int $id = null; + + #[ORM\Column(length: 255)] + private ?string $name = null; + + #[ORM\Column(type: Types::DATETIME_MUTABLE)] + private ?\DateTimeInterface $deadline = null; + + #[ORM\Column] + private ?bool $isDisabled = null; + + public function getId(): ?int + { + return $this->id; + } + + public function getName(): ?string + { + return $this->name; + } + + public function setName(string $name): static + { + $this->name = $name; + + return $this; + } + + public function getDeadline(): ?\DateTimeInterface + { + return $this->deadline; + } + + public function setDeadline(\DateTimeInterface $deadline): static + { + $this->deadline = $deadline; + + return $this; + } + + public function isDisabled(): ?bool + { + return $this->isDisabled; + } + + public function setIsDisabled(bool $isDisabled): static + { + $this->isDisabled = $isDisabled; + + return $this; + } +} diff --git a/src/Repository/WishlistRepository.php b/src/Repository/WishlistRepository.php new file mode 100644 index 0000000000000000000000000000000000000000..fd0dc02c6e93eb0b9ee6e2b9f3d5b7fe8ccdb729 --- /dev/null +++ b/src/Repository/WishlistRepository.php @@ -0,0 +1,43 @@ +<?php + +namespace App\Repository; + +use App\Entity\Wishlist; +use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; +use Doctrine\Persistence\ManagerRegistry; + +/** + * @extends ServiceEntityRepository<Wishlist> + */ +class WishlistRepository extends ServiceEntityRepository +{ + public function __construct(ManagerRegistry $registry) + { + parent::__construct($registry, Wishlist::class); + } + + // /** + // * @return Wishlist[] Returns an array of Wishlist objects + // */ + // public function findByExampleField($value): array + // { + // return $this->createQueryBuilder('w') + // ->andWhere('w.exampleField = :val') + // ->setParameter('val', $value) + // ->orderBy('w.id', 'ASC') + // ->setMaxResults(10) + // ->getQuery() + // ->getResult() + // ; + // } + + // public function findOneBySomeField($value): ?Wishlist + // { + // return $this->createQueryBuilder('w') + // ->andWhere('w.exampleField = :val') + // ->setParameter('val', $value) + // ->getQuery() + // ->getOneOrNullResult() + // ; + // } +}