Create Entities
parent
ef8e2fd64f
commit
b42185258c
@ -0,0 +1,88 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Entity;
|
||||||
|
|
||||||
|
use DateTimeInterface;
|
||||||
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Entity(repositoryClass="App\Repository\CommentRepository")
|
||||||
|
*/
|
||||||
|
class Comment {
|
||||||
|
/**
|
||||||
|
* @ORM\Id() @ORM\ManyToOne(targetEntity="App\Entity\Wish", inversedBy="comments")
|
||||||
|
* @ORM\JoinColumn(nullable=false)
|
||||||
|
*/
|
||||||
|
private $wish;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Id() @ORM\ManyToOne(targetEntity="App\Entity\User", inversedBy="comments")
|
||||||
|
* @ORM\JoinColumn(nullable=false)
|
||||||
|
*/
|
||||||
|
private $user;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="datetime")
|
||||||
|
*/
|
||||||
|
private $date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="boolean")
|
||||||
|
*/
|
||||||
|
private $anonymous;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="text")
|
||||||
|
*/
|
||||||
|
private $content;
|
||||||
|
|
||||||
|
public function getWish (): ?Wish {
|
||||||
|
return $this->wish;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setWish (?Wish $wish): self {
|
||||||
|
$this->wish = $wish;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getUser (): ?User {
|
||||||
|
return $this->user;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setUser (?User $user): self {
|
||||||
|
$this->user = $user;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getDate (): ?DateTimeInterface {
|
||||||
|
return $this->date;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setDate (DateTimeInterface $date): self {
|
||||||
|
$this->date = $date;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getAnonymous (): ?bool {
|
||||||
|
return $this->anonymous;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setAnonymous (bool $anonymous): self {
|
||||||
|
$this->anonymous = $anonymous;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getContent (): ?string {
|
||||||
|
return $this->content;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setContent (string $content): self {
|
||||||
|
$this->content = $content;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,72 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Entity;
|
||||||
|
|
||||||
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Entity(repositoryClass="App\Repository\ConfigNotificationRepository")
|
||||||
|
*/
|
||||||
|
class ConfigNotification {
|
||||||
|
/**
|
||||||
|
* @ORM\Id() @ORM\ManyToOne(targetEntity="App\Entity\User", inversedBy="configNotifications")
|
||||||
|
* @ORM\JoinColumn(nullable=false)
|
||||||
|
*/
|
||||||
|
private $user;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Id() @ORM\ManyToOne(targetEntity="App\Entity\Notification")
|
||||||
|
* @ORM\JoinColumn(nullable=false)
|
||||||
|
*/
|
||||||
|
private $notif;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="boolean")
|
||||||
|
*/
|
||||||
|
private $site;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="boolean")
|
||||||
|
*/
|
||||||
|
private $email;
|
||||||
|
|
||||||
|
public function getUser (): ?User {
|
||||||
|
return $this->user;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setUser (?User $user): self {
|
||||||
|
$this->user = $user;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getNotif (): ?Notification {
|
||||||
|
return $this->notif;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setNotif (?Notification $notif): self {
|
||||||
|
$this->notif = $notif;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getSite (): ?bool {
|
||||||
|
return $this->site;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setSite (bool $site): self {
|
||||||
|
$this->site = $site;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getEmail (): ?bool {
|
||||||
|
return $this->email;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setEmail (bool $email): self {
|
||||||
|
$this->email = $email;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,120 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Entity;
|
||||||
|
|
||||||
|
use Doctrine\Common\Collections\ArrayCollection;
|
||||||
|
use Doctrine\Common\Collections\Collection;
|
||||||
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Entity(repositoryClass="App\Repository\GroupRepository")
|
||||||
|
*/
|
||||||
|
class Group
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @ORM\Id()
|
||||||
|
* @ORM\GeneratedValue()
|
||||||
|
* @ORM\Column(type="integer")
|
||||||
|
*/
|
||||||
|
private $id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="string", length=255)
|
||||||
|
*/
|
||||||
|
private $name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\OneToMany(targetEntity="App\Entity\Member", mappedBy="id_group", orphanRemoval=true)
|
||||||
|
*/
|
||||||
|
private $members;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\OneToMany(targetEntity="App\Entity\Wish", mappedBy="target", orphanRemoval=true)
|
||||||
|
*/
|
||||||
|
private $wishes;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->members = new ArrayCollection();
|
||||||
|
$this->wishes = new ArrayCollection();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getId(): ?int
|
||||||
|
{
|
||||||
|
return $this->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getName(): ?string
|
||||||
|
{
|
||||||
|
return $this->name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setName(string $name): self
|
||||||
|
{
|
||||||
|
$this->name = $name;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Collection|Member[]
|
||||||
|
*/
|
||||||
|
public function getMembers(): Collection
|
||||||
|
{
|
||||||
|
return $this->members;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function addMember(Member $member): self
|
||||||
|
{
|
||||||
|
if (!$this->members->contains($member)) {
|
||||||
|
$this->members[] = $member;
|
||||||
|
$member->setGroup($this);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function removeMember(Member $member): self
|
||||||
|
{
|
||||||
|
if ($this->members->contains($member)) {
|
||||||
|
$this->members->removeElement($member);
|
||||||
|
// set the owning side to null (unless already changed)
|
||||||
|
if ($member->getGroup() === $this) {
|
||||||
|
$member->setGroup(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Collection|Wish[]
|
||||||
|
*/
|
||||||
|
public function getWishes(): Collection
|
||||||
|
{
|
||||||
|
return $this->wishes;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function addWish(Wish $wish): self
|
||||||
|
{
|
||||||
|
if (!$this->wishes->contains($wish)) {
|
||||||
|
$this->wishes[] = $wish;
|
||||||
|
$wish->setTarget($this);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function removeWish(Wish $wish): self
|
||||||
|
{
|
||||||
|
if ($this->wishes->contains($wish)) {
|
||||||
|
$this->wishes->removeElement($wish);
|
||||||
|
// set the owning side to null (unless already changed)
|
||||||
|
if ($wish->getTarget() === $this) {
|
||||||
|
$wish->setTarget(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,36 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Entity;
|
||||||
|
|
||||||
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Entity(repositoryClass="App\Repository\LanguageRepository")
|
||||||
|
*/
|
||||||
|
class Language {
|
||||||
|
/**
|
||||||
|
* @ORM\Id()
|
||||||
|
* @ORM\GeneratedValue()
|
||||||
|
* @ORM\Column(type="integer")
|
||||||
|
*/
|
||||||
|
private $id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="string", length=50)
|
||||||
|
*/
|
||||||
|
private $name;
|
||||||
|
|
||||||
|
public function getId (): ?int {
|
||||||
|
return $this->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getName (): ?string {
|
||||||
|
return $this->name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setName (string $name): self {
|
||||||
|
$this->name = $name;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,67 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Entity;
|
||||||
|
|
||||||
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Entity(repositoryClass="App\Repository\MemberRepository")
|
||||||
|
*/
|
||||||
|
class Member {
|
||||||
|
/**
|
||||||
|
* @ORM\Id()
|
||||||
|
* @ORM\GeneratedValue()
|
||||||
|
* @ORM\Column(type="integer")
|
||||||
|
*/
|
||||||
|
private $id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\ManyToOne(targetEntity="App\Entity\Group", inversedBy="members")
|
||||||
|
* @ORM\JoinColumn(name="group_id", nullable=false)
|
||||||
|
*/
|
||||||
|
private $group;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\ManyToOne(targetEntity="App\Entity\User", inversedBy="memberOfGroups")
|
||||||
|
*/
|
||||||
|
private $user;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="string", length=255, nullable=true)
|
||||||
|
*/
|
||||||
|
private $fakeuser_name;
|
||||||
|
|
||||||
|
public function getId (): ?int {
|
||||||
|
return $this->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getGroup (): ?Group {
|
||||||
|
return $this->group;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setGroup (?Group $group): self {
|
||||||
|
$this->group = $group;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getUser (): ?User {
|
||||||
|
return $this->user;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setUser (?User $user): self {
|
||||||
|
$this->user = $user;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getFakeuserName (): ?string {
|
||||||
|
return $this->fakeuser_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setFakeuserName (?string $fakeuser_name): self {
|
||||||
|
$this->fakeuser_name = $fakeuser_name;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,40 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Entity;
|
||||||
|
|
||||||
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Entity(repositoryClass="App\Repository\NotificationRepository")
|
||||||
|
*/
|
||||||
|
class Notification
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @ORM\Id()
|
||||||
|
* @ORM\GeneratedValue()
|
||||||
|
* @ORM\Column(type="integer")
|
||||||
|
*/
|
||||||
|
private $id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="string", length=50)
|
||||||
|
*/
|
||||||
|
private $name;
|
||||||
|
|
||||||
|
public function getId(): ?int
|
||||||
|
{
|
||||||
|
return $this->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getName(): ?string
|
||||||
|
{
|
||||||
|
return $this->name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setName(string $name): self
|
||||||
|
{
|
||||||
|
$this->name = $name;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,87 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Entity;
|
||||||
|
|
||||||
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Entity(repositoryClass="App\Repository\ParticipantRepository")
|
||||||
|
*/
|
||||||
|
class Participant {
|
||||||
|
/**
|
||||||
|
* @ORM\Id() @ORM\ManyToOne(targetEntity="App\Entity\Wish", inversedBy="participants")
|
||||||
|
* @ORM\JoinColumn(nullable=false)
|
||||||
|
*/
|
||||||
|
private $wish;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Id() @ORM\ManyToOne(targetEntity="App\Entity\User", inversedBy="participations")
|
||||||
|
* @ORM\JoinColumn(nullable=false)
|
||||||
|
*/
|
||||||
|
private $user;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="boolean")
|
||||||
|
*/
|
||||||
|
private $anonymous;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="decimal", precision=11, scale=2, nullable=true)
|
||||||
|
*/
|
||||||
|
private $price;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="boolean")
|
||||||
|
*/
|
||||||
|
private $paid;
|
||||||
|
|
||||||
|
public function getWish (): ?Wish {
|
||||||
|
return $this->wish;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setWish (?Wish $wish): self {
|
||||||
|
$this->wish = $wish;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getUser (): ?User {
|
||||||
|
return $this->user;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setUser (?User $user): self {
|
||||||
|
$this->user = $user;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getAnonymous (): ?bool {
|
||||||
|
return $this->anonymous;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setAnonymous (bool $anonymous): self {
|
||||||
|
$this->anonymous = $anonymous;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getPrice (): ?string {
|
||||||
|
return $this->price;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setPrice (?string $price): self {
|
||||||
|
$this->price = $price;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getPaid (): ?bool {
|
||||||
|
return $this->paid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setPaid (bool $paid): self {
|
||||||
|
$this->paid = $paid;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,340 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Entity;
|
||||||
|
|
||||||
|
use Doctrine\Common\Collections\ArrayCollection;
|
||||||
|
use Doctrine\Common\Collections\Collection;
|
||||||
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Entity(repositoryClass="App\Repository\UserRepository")
|
||||||
|
*/
|
||||||
|
class User {
|
||||||
|
/**
|
||||||
|
* @ORM\Id()
|
||||||
|
* @ORM\GeneratedValue()
|
||||||
|
* @ORM\Column(type="integer")
|
||||||
|
*/
|
||||||
|
private $id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="string", length=70)
|
||||||
|
*/
|
||||||
|
private $email;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="string", length=255)
|
||||||
|
*/
|
||||||
|
private $pass;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="string", length=255)
|
||||||
|
*/
|
||||||
|
private $name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="string", length=255, nullable=true)
|
||||||
|
*/
|
||||||
|
private $fistname;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="smallint")
|
||||||
|
*/
|
||||||
|
private $gender;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="string", length=255, nullable=true)
|
||||||
|
*/
|
||||||
|
private $avatar;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\ManyToOne(targetEntity="App\Entity\Language")
|
||||||
|
*/
|
||||||
|
private $language;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\ManyToMany(targetEntity="App\Entity\User")
|
||||||
|
*/
|
||||||
|
private $friends;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\OneToMany(targetEntity="App\Entity\ConfigNotification", mappedBy="user", orphanRemoval=true)
|
||||||
|
*/
|
||||||
|
private $configNotifications;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\OneToMany(targetEntity="App\Entity\UserNotification", mappedBy="user", orphanRemoval=true)
|
||||||
|
*/
|
||||||
|
private $notifications;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\OneToMany(targetEntity="App\Entity\Wish", mappedBy="owner")
|
||||||
|
*/
|
||||||
|
private $ownedWishes;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\OneToMany(targetEntity="App\Entity\Participant", mappedBy="user", orphanRemoval=true)
|
||||||
|
*/
|
||||||
|
private $participations;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\OneToMany(targetEntity="App\Entity\Comment", mappedBy="user", orphanRemoval=true)
|
||||||
|
*/
|
||||||
|
private $comments;
|
||||||
|
|
||||||
|
public function __construct () {
|
||||||
|
$this->friends = new ArrayCollection();
|
||||||
|
$this->configNotifications = new ArrayCollection();
|
||||||
|
$this->notifications = new ArrayCollection();
|
||||||
|
$this->memberOfGroups = new ArrayCollection();
|
||||||
|
$this->ownedWishes = new ArrayCollection();
|
||||||
|
$this->participations = new ArrayCollection();
|
||||||
|
$this->comments = new ArrayCollection();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getId (): ?int {
|
||||||
|
return $this->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getEmail (): ?string {
|
||||||
|
return $this->email;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setEmail (string $email): self {
|
||||||
|
$this->email = $email;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getPass (): ?string {
|
||||||
|
return $this->pass;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setPass (string $pass): self {
|
||||||
|
$this->pass = $pass;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getName (): ?string {
|
||||||
|
return $this->name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setName (string $name): self {
|
||||||
|
$this->name = $name;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getFistname (): ?string {
|
||||||
|
return $this->fistname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setFistname (?string $fistname): self {
|
||||||
|
$this->fistname = $fistname;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getGender (): ?int {
|
||||||
|
return $this->gender;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setGender (int $gender): self {
|
||||||
|
$this->gender = $gender;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getAvatar (): ?string {
|
||||||
|
return $this->avatar;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setAvatar (?string $avatar): self {
|
||||||
|
$this->avatar = $avatar;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getLanguage (): ?Language {
|
||||||
|
return $this->language;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setLanguage (?Language $language): self {
|
||||||
|
$this->language = $language;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Collection|self[]
|
||||||
|
*/
|
||||||
|
public function getFriends (): Collection {
|
||||||
|
return $this->friends;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function addFriend (self $friend): self {
|
||||||
|
if (!$this->friends->contains($friend)) {
|
||||||
|
$this->friends[] = $friend;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function removeFriend (self $friend): self {
|
||||||
|
if ($this->friends->contains($friend)) {
|
||||||
|
$this->friends->removeElement($friend);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Collection|ConfigNotification[]
|
||||||
|
*/
|
||||||
|
public function getConfigNotifications (): Collection {
|
||||||
|
return $this->configNotifications;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function addConfigNotification (ConfigNotification $configNotification): self {
|
||||||
|
if (!$this->configNotifications->contains($configNotification)) {
|
||||||
|
$this->configNotifications[] = $configNotification;
|
||||||
|
$configNotification->setUser($this);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function removeConfigNotification (ConfigNotification $configNotification): self {
|
||||||
|
if ($this->configNotifications->contains($configNotification)) {
|
||||||
|
$this->configNotifications->removeElement($configNotification);
|
||||||
|
// set the owning side to null (unless already changed)
|
||||||
|
if ($configNotification->getUser() === $this) {
|
||||||
|
$configNotification->setUser(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Collection|UserNotification[]
|
||||||
|
*/
|
||||||
|
public function getNotifications (): Collection {
|
||||||
|
return $this->notifications;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function addNotification (UserNotification $notification): self {
|
||||||
|
if (!$this->notifications->contains($notification)) {
|
||||||
|
$this->notifications[] = $notification;
|
||||||
|
$notification->setUser($this);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function removeNotification (UserNotification $notification): self {
|
||||||
|
if ($this->notifications->contains($notification)) {
|
||||||
|
$this->notifications->removeElement($notification);
|
||||||
|
// set the owning side to null (unless already changed)
|
||||||
|
if ($notification->getUser() === $this) {
|
||||||
|
$notification->setUser(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Collection|Wish[]
|
||||||
|
*/
|
||||||
|
public function getOwnedWishes(): Collection
|
||||||
|
{
|
||||||
|
return $this->ownedWishes;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function addOwnedWish(Wish $ownedWish): self
|
||||||
|
{
|
||||||
|
if (!$this->ownedWishes->contains($ownedWish)) {
|
||||||
|
$this->ownedWishes[] = $ownedWish;
|
||||||
|
$ownedWish->setOwner($this);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function removeOwnedWish(Wish $ownedWish): self
|
||||||
|
{
|
||||||
|
if ($this->ownedWishes->contains($ownedWish)) {
|
||||||
|
$this->ownedWishes->removeElement($ownedWish);
|
||||||
|
// set the owning side to null (unless already changed)
|
||||||
|
if ($ownedWish->getOwner() === $this) {
|
||||||
|
$ownedWish->setOwner(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Collection|Participant[]
|
||||||
|
*/
|
||||||
|
public function getParticipations(): Collection
|
||||||
|
{
|
||||||
|
return $this->participations;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function addParticipation(Participant $participation): self
|
||||||
|
{
|
||||||
|
if (!$this->participations->contains($participation)) {
|
||||||
|
$this->participations[] = $participation;
|
||||||
|
$participation->setUser($this);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function removeParticipation(Participant $participation): self
|
||||||
|
{
|
||||||
|
if ($this->participations->contains($participation)) {
|
||||||
|
$this->participations->removeElement($participation);
|
||||||
|
// set the owning side to null (unless already changed)
|
||||||
|
if ($participation->getUser() === $this) {
|
||||||
|
$participation->setUser(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Collection|Comment[]
|
||||||
|
*/
|
||||||
|
public function getComments(): Collection
|
||||||
|
{
|
||||||
|
return $this->comments;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function addComment(Comment $comment): self
|
||||||
|
{
|
||||||
|
if (!$this->comments->contains($comment)) {
|
||||||
|
$this->comments[] = $comment;
|
||||||
|
$comment->setUser($this);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function removeComment(Comment $comment): self
|
||||||
|
{
|
||||||
|
if ($this->comments->contains($comment)) {
|
||||||
|
$this->comments->removeElement($comment);
|
||||||
|
// set the owning side to null (unless already changed)
|
||||||
|
if ($comment->getUser() === $this) {
|
||||||
|
$comment->setUser(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,88 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Entity;
|
||||||
|
|
||||||
|
use DateTimeInterface;
|
||||||
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Entity(repositoryClass="App\Repository\UserNotificationRepository")
|
||||||
|
*/
|
||||||
|
class UserNotification {
|
||||||
|
/**
|
||||||
|
* @ORM\Id() @ORM\ManyToOne(targetEntity="App\Entity\User", inversedBy="notifications")
|
||||||
|
* @ORM\JoinColumn(nullable=false)
|
||||||
|
*/
|
||||||
|
private $user;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Id() @ORM\ManyToOne(targetEntity="App\Entity\Notification")
|
||||||
|
* @ORM\JoinColumn(nullable=false)
|
||||||
|
*/
|
||||||
|
private $notif;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="datetime")
|
||||||
|
*/
|
||||||
|
private $date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="string", length=255)
|
||||||
|
*/
|
||||||
|
private $description;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="boolean")
|
||||||
|
*/
|
||||||
|
private $seen;
|
||||||
|
|
||||||
|
public function getUser (): ?User {
|
||||||
|
return $this->user;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setUser (?User $user): self {
|
||||||
|
$this->user = $user;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getNotif (): ?Notification {
|
||||||
|
return $this->notif;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setNotif (?Notification $notif): self {
|
||||||
|
$this->notif = $notif;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getDate (): ?DateTimeInterface {
|
||||||
|
return $this->date;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setDate (DateTimeInterface $date): self {
|
||||||
|
$this->date = $date;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getDescription (): ?string {
|
||||||
|
return $this->description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setDescription (string $description): self {
|
||||||
|
$this->description = $description;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getSeen (): ?bool {
|
||||||
|
return $this->seen;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setSeen (bool $seen): self {
|
||||||
|
$this->seen = $seen;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,247 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Entity;
|
||||||
|
|
||||||
|
use DateTimeInterface;
|
||||||
|
use Doctrine\Common\Collections\ArrayCollection;
|
||||||
|
use Doctrine\Common\Collections\Collection;
|
||||||
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Entity(repositoryClass="App\Repository\WishRepository")
|
||||||
|
*/
|
||||||
|
class Wish {
|
||||||
|
/**
|
||||||
|
* @ORM\Id()
|
||||||
|
* @ORM\GeneratedValue()
|
||||||
|
* @ORM\Column(type="integer")
|
||||||
|
*/
|
||||||
|
private $id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\ManyToOne(targetEntity="App\Entity\Group", inversedBy="wishes")
|
||||||
|
* @ORM\JoinColumn(nullable=false)
|
||||||
|
*/
|
||||||
|
private $target;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\ManyToOne(targetEntity="App\Entity\User", inversedBy="ownedWishes")
|
||||||
|
* @ORM\JoinColumn(nullable=false)
|
||||||
|
*/
|
||||||
|
private $owner;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="datetime")
|
||||||
|
*/
|
||||||
|
private $date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="string", length=255)
|
||||||
|
*/
|
||||||
|
private $name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="text", nullable=true)
|
||||||
|
*/
|
||||||
|
private $description;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="boolean")
|
||||||
|
*/
|
||||||
|
private $visible;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="decimal", precision=11, scale=2, nullable=true)
|
||||||
|
*/
|
||||||
|
private $price_estimated;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="decimal", precision=11, scale=2, nullable=true)
|
||||||
|
*/
|
||||||
|
private $price_real;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="boolean")
|
||||||
|
*/
|
||||||
|
private $crowdfunding;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="datetime", nullable=true)
|
||||||
|
*/
|
||||||
|
private $finished;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\OneToMany(targetEntity="App\Entity\Participant", mappedBy="wish", orphanRemoval=true)
|
||||||
|
*/
|
||||||
|
private $participants;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\OneToMany(targetEntity="App\Entity\Comment", mappedBy="wish", orphanRemoval=true)
|
||||||
|
*/
|
||||||
|
private $comments;
|
||||||
|
|
||||||
|
public function __construct () {
|
||||||
|
$this->participants = new ArrayCollection();
|
||||||
|
$this->comments = new ArrayCollection();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getId (): ?int {
|
||||||
|
return $this->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getTarget (): ?Group {
|
||||||
|
return $this->target;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setTarget (?Group $target): self {
|
||||||
|
$this->target = $target;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getOwner (): ?User {
|
||||||
|
return $this->owner;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setOwner (?User $owner): self {
|
||||||
|
$this->owner = $owner;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getDate (): ?DateTimeInterface {
|
||||||
|
return $this->date;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setDate (DateTimeInterface $date): self {
|
||||||
|
$this->date = $date;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getName (): ?string {
|
||||||
|
return $this->name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setName (string $name): self {
|
||||||
|
$this->name = $name;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getDescription (): ?string {
|
||||||
|
return $this->description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setDescription (?string $description): self {
|
||||||
|
$this->description = $description;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getVisible (): ?bool {
|
||||||
|
return $this->visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setVisible (bool $visible): self {
|
||||||
|
$this->visible = $visible;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getPriceEstimated (): ?string {
|
||||||
|
return $this->price_estimated;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setPriceEstimated (?string $price_estimated): self {
|
||||||
|
$this->price_estimated = $price_estimated;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getPriceReal (): ?string {
|
||||||
|
return $this->price_real;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setPriceReal (?string $price_real): self {
|
||||||
|
$this->price_real = $price_real;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getCrowdfunding (): ?bool {
|
||||||
|
return $this->crowdfunding;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setCrowdfunding (bool $crowdfunding): self {
|
||||||
|
$this->crowdfunding = $crowdfunding;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getFinished (): ?DateTimeInterface {
|
||||||
|
return $this->finished;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setFinished (?DateTimeInterface $finished): self {
|
||||||
|
$this->finished = $finished;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Collection|Participant[]
|
||||||
|
*/
|
||||||
|
public function getParticipants (): Collection {
|
||||||
|
return $this->participants;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function addParticipant (Participant $participant): self {
|
||||||
|
if (!$this->participants->contains($participant)) {
|
||||||
|
$this->participants[] = $participant;
|
||||||
|
$participant->setWish($this);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function removeParticipant (Participant $participant): self {
|
||||||
|
if ($this->participants->contains($participant)) {
|
||||||
|
$this->participants->removeElement($participant);
|
||||||
|
// set the owning side to null (unless already changed)
|
||||||
|
if ($participant->getWish() === $this) {
|
||||||
|
$participant->setWish(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Collection|Comment[]
|
||||||
|
*/
|
||||||
|
public function getComments (): Collection {
|
||||||
|
return $this->comments;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function addComment (Comment $comment): self {
|
||||||
|
if (!$this->comments->contains($comment)) {
|
||||||
|
$this->comments[] = $comment;
|
||||||
|
$comment->setWish($this);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function removeComment (Comment $comment): self {
|
||||||
|
if ($this->comments->contains($comment)) {
|
||||||
|
$this->comments->removeElement($comment);
|
||||||
|
// set the owning side to null (unless already changed)
|
||||||
|
if ($comment->getWish() === $this) {
|
||||||
|
$comment->setWish(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,50 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Repository;
|
||||||
|
|
||||||
|
use App\Entity\Comment;
|
||||||
|
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||||
|
use Doctrine\Common\Persistence\ManagerRegistry;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @method Comment|null find($id, $lockMode = null, $lockVersion = null)
|
||||||
|
* @method Comment|null findOneBy(array $criteria, array $orderBy = null)
|
||||||
|
* @method Comment[] findAll()
|
||||||
|
* @method Comment[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
|
||||||
|
*/
|
||||||
|
class CommentRepository extends ServiceEntityRepository
|
||||||
|
{
|
||||||
|
public function __construct(ManagerRegistry $registry)
|
||||||
|
{
|
||||||
|
parent::__construct($registry, Comment::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * @return Comment[] Returns an array of Comment objects
|
||||||
|
// */
|
||||||
|
/*
|
||||||
|
public function findByExampleField($value)
|
||||||
|
{
|
||||||
|
return $this->createQueryBuilder('c')
|
||||||
|
->andWhere('c.exampleField = :val')
|
||||||
|
->setParameter('val', $value)
|
||||||
|
->orderBy('c.id', 'ASC')
|
||||||
|
->setMaxResults(10)
|
||||||
|
->getQuery()
|
||||||
|
->getResult()
|
||||||
|
;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
public function findOneBySomeField($value): ?Comment
|
||||||
|
{
|
||||||
|
return $this->createQueryBuilder('c')
|
||||||
|
->andWhere('c.exampleField = :val')
|
||||||
|
->setParameter('val', $value)
|
||||||
|
->getQuery()
|
||||||
|
->getOneOrNullResult()
|
||||||
|
;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
}
|
@ -0,0 +1,50 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Repository;
|
||||||
|
|
||||||
|
use App\Entity\ConfigNotification;
|
||||||
|
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||||
|
use Doctrine\Common\Persistence\ManagerRegistry;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @method ConfigNotification|null find($id, $lockMode = null, $lockVersion = null)
|
||||||
|
* @method ConfigNotification|null findOneBy(array $criteria, array $orderBy = null)
|
||||||
|
* @method ConfigNotification[] findAll()
|
||||||
|
* @method ConfigNotification[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
|
||||||
|
*/
|
||||||
|
class ConfigNotificationRepository extends ServiceEntityRepository
|
||||||
|
{
|
||||||
|
public function __construct(ManagerRegistry $registry)
|
||||||
|
{
|
||||||
|
parent::__construct($registry, ConfigNotification::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * @return ConfigNotification[] Returns an array of ConfigNotification objects
|
||||||
|
// */
|
||||||
|
/*
|
||||||
|
public function findByExampleField($value)
|
||||||
|
{
|
||||||
|
return $this->createQueryBuilder('c')
|
||||||
|
->andWhere('c.exampleField = :val')
|
||||||
|
->setParameter('val', $value)
|
||||||
|
->orderBy('c.id', 'ASC')
|
||||||
|
->setMaxResults(10)
|
||||||
|
->getQuery()
|
||||||
|
->getResult()
|
||||||
|
;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
public function findOneBySomeField($value): ?ConfigNotification
|
||||||
|
{
|
||||||
|
return $this->createQueryBuilder('c')
|
||||||
|
->andWhere('c.exampleField = :val')
|
||||||
|
->setParameter('val', $value)
|
||||||
|
->getQuery()
|
||||||
|
->getOneOrNullResult()
|
||||||
|
;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
}
|
@ -0,0 +1,50 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Repository;
|
||||||
|
|
||||||
|
use App\Entity\Group;
|
||||||
|
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||||
|
use Doctrine\Common\Persistence\ManagerRegistry;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @method Group|null find($id, $lockMode = null, $lockVersion = null)
|
||||||
|
* @method Group|null findOneBy(array $criteria, array $orderBy = null)
|
||||||
|
* @method Group[] findAll()
|
||||||
|
* @method Group[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
|
||||||
|
*/
|
||||||
|
class GroupRepository extends ServiceEntityRepository
|
||||||
|
{
|
||||||
|
public function __construct(ManagerRegistry $registry)
|
||||||
|
{
|
||||||
|
parent::__construct($registry, Group::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * @return Group[] Returns an array of Group objects
|
||||||
|
// */
|
||||||
|
/*
|
||||||
|
public function findByExampleField($value)
|
||||||
|
{
|
||||||
|
return $this->createQueryBuilder('g')
|
||||||
|
->andWhere('g.exampleField = :val')
|
||||||
|
->setParameter('val', $value)
|
||||||
|
->orderBy('g.id', 'ASC')
|
||||||
|
->setMaxResults(10)
|
||||||
|
->getQuery()
|
||||||
|
->getResult()
|
||||||
|
;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
public function findOneBySomeField($value): ?Group
|
||||||
|
{
|
||||||
|
return $this->createQueryBuilder('g')
|
||||||
|
->andWhere('g.exampleField = :val')
|
||||||
|
->setParameter('val', $value)
|
||||||
|
->getQuery()
|
||||||
|
->getOneOrNullResult()
|
||||||
|
;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
}
|
@ -0,0 +1,50 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Repository;
|
||||||
|
|
||||||
|
use App\Entity\Language;
|
||||||
|
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||||
|
use Doctrine\Common\Persistence\ManagerRegistry;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @method Language|null find($id, $lockMode = null, $lockVersion = null)
|
||||||
|
* @method Language|null findOneBy(array $criteria, array $orderBy = null)
|
||||||
|
* @method Language[] findAll()
|
||||||
|
* @method Language[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
|
||||||
|
*/
|
||||||
|
class LanguageRepository extends ServiceEntityRepository
|
||||||
|
{
|
||||||
|
public function __construct(ManagerRegistry $registry)
|
||||||
|
{
|
||||||
|
parent::__construct($registry, Language::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * @return Language[] Returns an array of Language objects
|
||||||
|
// */
|
||||||
|
/*
|
||||||
|
public function findByExampleField($value)
|
||||||
|
{
|
||||||
|
return $this->createQueryBuilder('l')
|
||||||
|
->andWhere('l.exampleField = :val')
|
||||||
|
->setParameter('val', $value)
|
||||||
|
->orderBy('l.id', 'ASC')
|
||||||
|
->setMaxResults(10)
|
||||||
|
->getQuery()
|
||||||
|
->getResult()
|
||||||
|
;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
public function findOneBySomeField($value): ?Language
|
||||||
|
{
|
||||||
|
return $this->createQueryBuilder('l')
|
||||||
|
->andWhere('l.exampleField = :val')
|
||||||
|
->setParameter('val', $value)
|
||||||
|
->getQuery()
|
||||||
|
->getOneOrNullResult()
|
||||||
|
;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
}
|
@ -0,0 +1,50 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Repository;
|
||||||
|
|
||||||
|
use App\Entity\Member;
|
||||||
|
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||||
|
use Doctrine\Common\Persistence\ManagerRegistry;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @method Member|null find($id, $lockMode = null, $lockVersion = null)
|
||||||
|
* @method Member|null findOneBy(array $criteria, array $orderBy = null)
|
||||||
|
* @method Member[] findAll()
|
||||||
|
* @method Member[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
|
||||||
|
*/
|
||||||
|
class MemberRepository extends ServiceEntityRepository
|
||||||
|
{
|
||||||
|
public function __construct(ManagerRegistry $registry)
|
||||||
|
{
|
||||||
|
parent::__construct($registry, Member::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * @return Member[] Returns an array of Member objects
|
||||||
|
// */
|
||||||
|
/*
|
||||||
|
public function findByExampleField($value)
|
||||||
|
{
|
||||||
|
return $this->createQueryBuilder('m')
|
||||||
|
->andWhere('m.exampleField = :val')
|
||||||
|
->setParameter('val', $value)
|
||||||
|
->orderBy('m.id', 'ASC')
|
||||||
|
->setMaxResults(10)
|
||||||
|
->getQuery()
|
||||||
|
->getResult()
|
||||||
|
;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
public function findOneBySomeField($value): ?Member
|
||||||
|
{
|
||||||
|
return $this->createQueryBuilder('m')
|
||||||
|
->andWhere('m.exampleField = :val')
|
||||||
|
->setParameter('val', $value)
|
||||||
|
->getQuery()
|
||||||
|
->getOneOrNullResult()
|
||||||
|
;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
}
|
@ -0,0 +1,50 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Repository;
|
||||||
|
|
||||||
|
use App\Entity\Notification;
|
||||||
|
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||||
|
use Doctrine\Common\Persistence\ManagerRegistry;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @method Notification|null find($id, $lockMode = null, $lockVersion = null)
|
||||||
|
* @method Notification|null findOneBy(array $criteria, array $orderBy = null)
|
||||||
|
* @method Notification[] findAll()
|
||||||
|
* @method Notification[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
|
||||||
|
*/
|
||||||
|
class NotificationRepository extends ServiceEntityRepository
|
||||||
|
{
|
||||||
|
public function __construct(ManagerRegistry $registry)
|
||||||
|
{
|
||||||
|
parent::__construct($registry, Notification::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * @return Notification[] Returns an array of Notification objects
|
||||||
|
// */
|
||||||
|
/*
|
||||||
|
public function findByExampleField($value)
|
||||||
|
{
|
||||||
|
return $this->createQueryBuilder('n')
|
||||||
|
->andWhere('n.exampleField = :val')
|
||||||
|
->setParameter('val', $value)
|
||||||
|
->orderBy('n.id', 'ASC')
|
||||||
|
->setMaxResults(10)
|
||||||
|
->getQuery()
|
||||||
|
->getResult()
|
||||||
|
;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
public function findOneBySomeField($value): ?Notification
|
||||||
|
{
|
||||||
|
return $this->createQueryBuilder('n')
|
||||||
|
->andWhere('n.exampleField = :val')
|
||||||
|
->setParameter('val', $value)
|
||||||
|
->getQuery()
|
||||||
|
->getOneOrNullResult()
|
||||||
|
;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
}
|
@ -0,0 +1,50 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Repository;
|
||||||
|
|
||||||
|
use App\Entity\Participant;
|
||||||
|
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||||
|
use Doctrine\Common\Persistence\ManagerRegistry;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @method Participant|null find($id, $lockMode = null, $lockVersion = null)
|
||||||
|
* @method Participant|null findOneBy(array $criteria, array $orderBy = null)
|
||||||
|
* @method Participant[] findAll()
|
||||||
|
* @method Participant[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
|
||||||
|
*/
|
||||||
|
class ParticipantRepository extends ServiceEntityRepository
|
||||||
|
{
|
||||||
|
public function __construct(ManagerRegistry $registry)
|
||||||
|
{
|
||||||
|
parent::__construct($registry, Participant::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * @return Participant[] Returns an array of Participant objects
|
||||||
|
// */
|
||||||
|
/*
|
||||||
|
public function findByExampleField($value)
|
||||||
|
{
|
||||||
|
return $this->createQueryBuilder('p')
|
||||||
|
->andWhere('p.exampleField = :val')
|
||||||
|
->setParameter('val', $value)
|
||||||
|
->orderBy('p.id', 'ASC')
|
||||||
|
->setMaxResults(10)
|
||||||
|
->getQuery()
|
||||||
|
->getResult()
|
||||||
|
;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
public function findOneBySomeField($value): ?Participant
|
||||||
|
{
|
||||||
|
return $this->createQueryBuilder('p')
|
||||||
|
->andWhere('p.exampleField = :val')
|
||||||
|
->setParameter('val', $value)
|
||||||
|
->getQuery()
|
||||||
|
->getOneOrNullResult()
|
||||||
|
;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
}
|
@ -0,0 +1,50 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Repository;
|
||||||
|
|
||||||
|
use App\Entity\UserNotification;
|
||||||
|
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||||
|
use Doctrine\Common\Persistence\ManagerRegistry;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @method UserNotification|null find($id, $lockMode = null, $lockVersion = null)
|
||||||
|
* @method UserNotification|null findOneBy(array $criteria, array $orderBy = null)
|
||||||
|
* @method UserNotification[] findAll()
|
||||||
|
* @method UserNotification[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
|
||||||
|
*/
|
||||||
|
class UserNotificationRepository extends ServiceEntityRepository
|
||||||
|
{
|
||||||
|
public function __construct(ManagerRegistry $registry)
|
||||||
|
{
|
||||||
|
parent::__construct($registry, UserNotification::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * @return UserNotification[] Returns an array of UserNotification objects
|
||||||
|
// */
|
||||||
|
/*
|
||||||
|
public function findByExampleField($value)
|
||||||
|
{
|
||||||
|
return $this->createQueryBuilder('u')
|
||||||
|
->andWhere('u.exampleField = :val')
|
||||||
|
->setParameter('val', $value)
|
||||||
|
->orderBy('u.id', 'ASC')
|
||||||
|
->setMaxResults(10)
|
||||||
|
->getQuery()
|
||||||
|
->getResult()
|
||||||
|
;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
public function findOneBySomeField($value): ?UserNotification
|
||||||
|
{
|
||||||
|
return $this->createQueryBuilder('u')
|
||||||
|
->andWhere('u.exampleField = :val')
|
||||||
|
->setParameter('val', $value)
|
||||||
|
->getQuery()
|
||||||
|
->getOneOrNullResult()
|
||||||
|
;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
}
|
@ -0,0 +1,50 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Repository;
|
||||||
|
|
||||||
|
use App\Entity\User;
|
||||||
|
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||||
|
use Doctrine\Common\Persistence\ManagerRegistry;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @method User|null find($id, $lockMode = null, $lockVersion = null)
|
||||||
|
* @method User|null findOneBy(array $criteria, array $orderBy = null)
|
||||||
|
* @method User[] findAll()
|
||||||
|
* @method User[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
|
||||||
|
*/
|
||||||
|
class UserRepository extends ServiceEntityRepository
|
||||||
|
{
|
||||||
|
public function __construct(ManagerRegistry $registry)
|
||||||
|
{
|
||||||
|
parent::__construct($registry, User::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * @return User[] Returns an array of User objects
|
||||||
|
// */
|
||||||
|
/*
|
||||||
|
public function findByExampleField($value)
|
||||||
|
{
|
||||||
|
return $this->createQueryBuilder('u')
|
||||||
|
->andWhere('u.exampleField = :val')
|
||||||
|
->setParameter('val', $value)
|
||||||
|
->orderBy('u.id', 'ASC')
|
||||||
|
->setMaxResults(10)
|
||||||
|
->getQuery()
|
||||||
|
->getResult()
|
||||||
|
;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
public function findOneBySomeField($value): ?User
|
||||||
|
{
|
||||||
|
return $this->createQueryBuilder('u')
|
||||||
|
->andWhere('u.exampleField = :val')
|
||||||
|
->setParameter('val', $value)
|
||||||
|
->getQuery()
|
||||||
|
->getOneOrNullResult()
|
||||||
|
;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
}
|
@ -0,0 +1,50 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Repository;
|
||||||
|
|
||||||
|
use App\Entity\Wish;
|
||||||
|
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||||
|
use Doctrine\Common\Persistence\ManagerRegistry;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @method Wish|null find($id, $lockMode = null, $lockVersion = null)
|
||||||
|
* @method Wish|null findOneBy(array $criteria, array $orderBy = null)
|
||||||
|
* @method Wish[] findAll()
|
||||||
|
* @method Wish[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
|
||||||
|
*/
|
||||||
|
class WishRepository extends ServiceEntityRepository
|
||||||
|
{
|
||||||
|
public function __construct(ManagerRegistry $registry)
|
||||||
|
{
|
||||||
|
parent::__construct($registry, Wish::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * @return Wish[] Returns an array of Wish objects
|
||||||
|
// */
|
||||||
|
/*
|
||||||
|
public function findByExampleField($value)
|
||||||
|
{
|
||||||
|
return $this->createQueryBuilder('w')
|
||||||
|
->andWhere('w.exampleField = :val')
|
||||||
|
->setParameter('val', $value)
|
||||||
|
->orderBy('w.id', 'ASC')
|
||||||
|
->setMaxResults(10)
|
||||||
|
->getQuery()
|
||||||
|
->getResult()
|
||||||
|
;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
public function findOneBySomeField($value): ?Wish
|
||||||
|
{
|
||||||
|
return $this->createQueryBuilder('w')
|
||||||
|
->andWhere('w.exampleField = :val')
|
||||||
|
->setParameter('val', $value)
|
||||||
|
->getQuery()
|
||||||
|
->getOneOrNullResult()
|
||||||
|
;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
}
|
Loading…
Reference in New Issue