<?php
namespace App\Entity;
use App\Repository\CommitteeRepository;
use Doctrine\ORM\Event\PreUpdateEventArgs;
use Doctrine\ORM\Mapping as ORM;
use ApiPlatform\Core\Annotation\ApiResource;
use ApiPlatform\Core\Annotation\ApiFilter;
use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\SearchFilter;
use Symfony\Component\Serializer\Annotation\Groups;
/**
* @ORM\Entity(repositoryClass=CommitteeRepository::class)
* @ORM\HasLifecycleCallbacks()
* @ApiResource(
* normalizationContext={"groups"={"committee:read", "base:read", "assign:read"}},
* denormalizationContext={"groups"={"committee:write", "base:write", "assign:write"}},
* )
*/
class Committee
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
* @Groups({"committee:read"})
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
* @Groups({"committee:read", "committee:write"})
*/
private $name;
/**
* @ORM\Column(type="string", length=255)
* @Groups({"committee:read", "committee:write"})
*/
private $type;
/**
* @ORM\Column(type="text")
* @Groups({"committee:read", "committee:write"})
*/
private $description;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups({"committee:read", "committee:write"})
*/
private $timeNote;
/**
* @ORM\Column(type="integer", options={"default": 0})
* @Groups({"committee:read", "committee:write"})
*/
private $members = 0;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups({"committee:read", "committee:write"})
*/
private $chairName;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups({"committee:read", "committee:write"})
*/
private $chairEmail;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups({"committee:read", "committee:write"})
*/
private $chairPhone;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups({"committee:read", "committee:write"})
*/
private $staffLiaisonName;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups({"committee:read", "committee:write"})
*/
private $staffLiaisonEmail;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups({"committee:read", "committee:write"})
*/
private $staffLiaisonPhone;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups({"committee:read", "committee:write"})
*/
private $staffPhoneExtension;
/**
* @ORM\Column(type="text", nullable=true)
* @Groups({"committee:read", "committee:write"})
*/
private $newMemberEmailTemplate;
/**
* @ORM\Column(type="date", nullable=true)
* @Groups({"committee:read", "committee:write"})
*/
private $startDate;
/**
* @ORM\Column(type="integer", nullable=true)
* @Groups({"committee:read", "committee:write"})
*/
private $startHour;
/**
* @ORM\Column(type="integer", nullable=true)
* @Groups({"committee:read", "committee:write"})
*/
private $startMinute;
/**
* @ORM\Column(type="date", nullable=true)
* @Groups({"committee:read", "committee:write"})
*/
private $endDate;
/**
* @ORM\Column(type="integer", nullable=true)
* @Groups({"committee:read", "committee:write"})
*/
private $endHour;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups({"committee:read", "committee:write"})
*/
private $meridiemStart;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups({"committee:read", "committee:write"})
*/
private $meridiemEnd;
/**
* @ORM\Column(type="integer", nullable=true)
* @Groups({"committee:read", "committee:write"})
*/
private $endMinute;
/**
* @ORM\Column(type="boolean", nullable=true)
* @Groups({"committee:read", "committee:write"})
*/
private $isAllDay;
/**
* @ORM\Column(type="boolean", nullable=true)
* @Groups({"committee:read", "committee:write"})
*/
private $isRepeat;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups({"committee:read", "committee:write"})
*/
private $repeatType;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups({"committee:read", "committee:write"})
*/
private $meetingLink;
/**
* @ORM\Column(type="json", nullable=true)
* @Groups({"committee:read", "committee:write"})
*/
private $repeatOptions = [];
/**
* @ORM\ManyToOne(targetEntity=User::class)
* @Groups({"committee:read", "committee:write"})
*/
private $chair;
/**
* @ORM\ManyToOne(targetEntity=User::class)
* @Groups({"committee:read", "committee:write"})
*/
private $staffLiaison;
/**
* @ORM\ManyToOne(targetEntity=Committee::class)
* @Groups({"committee:read", "committee:write"})
*/
private $parent;
/**
* @ORM\Column(type="boolean", nullable=true)
* @Groups({"committee:read", "committee:write"})
*/
private $deleted = false;
/**
* @ORM\Column(type="integer", nullable=true)
* @Groups({"committee:read", "committee:write"})
*/
private $sequence;
/**
* @ORM\Column(type="string", length=50, options={"default": "Active"})
* @Groups({"committee:read", "committee:write"})
*/
private $status = 'Active';
/**
* @ORM\PrePersist
*/
public function PreCreate()
{
$this->endDate = $this->startDate;
}
/**
* @ORM\PreUpdate
*/
public function PreUpdate(PreUpdateEventArgs $event)
{
$this->endDate = $this->startDate;
}
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;
}
public function getType(): ?string
{
return $this->type;
}
public function setType(string $type): self
{
$this->type = $type;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(string $description): self
{
$this->description = $description;
return $this;
}
public function getTimeNote(): ?string
{
return $this->timeNote;
}
public function setTimeNote(?string $timeNote): self
{
$this->timeNote = $timeNote;
return $this;
}
public function getMembers(): ?int
{
return $this->members;
}
public function setMembers(int $members): self
{
$this->members = $members;
return $this;
}
public function getChairName(): ?string
{
return $this->chairName;
}
public function setChairName(?string $chairName): self
{
$this->chairName = $chairName;
return $this;
}
public function getChairEmail(): ?string
{
return $this->chairEmail;
}
public function setChairEmail(?string $chairEmail): self
{
$this->chairEmail = $chairEmail;
return $this;
}
public function getChairPhone(): ?string
{
return $this->chairPhone;
}
public function setChairPhone(?string $chairPhone): self
{
$this->chairPhone = $chairPhone;
return $this;
}
public function getStaffLiaisonName(): ?string
{
return $this->staffLiaisonName;
}
public function setStaffLiaisonName(?string $staffLiaisonName): self
{
$this->staffLiaisonName = $staffLiaisonName;
return $this;
}
public function getStaffLiaisonEmail(): ?string
{
return $this->staffLiaisonEmail;
}
public function setStaffLiaisonEmail(?string $staffLiaisonEmail): self
{
$this->staffLiaisonEmail = $staffLiaisonEmail;
return $this;
}
public function getStaffLiaisonPhone(): ?string
{
return $this->staffLiaisonPhone;
}
public function setStaffLiaisonPhone(?string $staffLiaisonPhone): self
{
$this->staffLiaisonPhone = $staffLiaisonPhone;
return $this;
}
public function getStaffPhoneExtension(): ?string
{
return $this->staffPhoneExtension;
}
public function setStaffPhoneExtension(?string $staffPhoneExtension): self
{
$this->staffPhoneExtension = $staffPhoneExtension;
return $this;
}
public function getNewMemberEmailTemplate(): ?string
{
return $this->newMemberEmailTemplate;
}
public function setNewMemberEmailTemplate(?string $newMemberEmailTemplate): self
{
$this->newMemberEmailTemplate = $newMemberEmailTemplate;
return $this;
}
public function getStartDate(): ?\DateTimeInterface
{
return $this->startDate;
}
public function setStartDate(?\DateTimeInterface $startDate): self
{
$this->startDate = $startDate;
return $this;
}
public function getStartHour(): ?int
{
return $this->startHour;
}
public function setStartHour(?int $startHour): self
{
$this->startHour = $startHour;
return $this;
}
public function getStartMinute(): ?int
{
return $this->startMinute;
}
public function setStartMinute(?int $startMinute): self
{
$this->startMinute = $startMinute;
return $this;
}
public function getEndDate(): ?\DateTimeInterface
{
return $this->endDate;
}
public function setEndDate(?\DateTimeInterface $endDate): self
{
$this->endDate = $endDate;
return $this;
}
public function getEndHour(): ?int
{
return $this->endHour;
}
public function setEndHour(?int $endHour): self
{
$this->endHour = $endHour;
return $this;
}
public function getEndMinute(): ?int
{
return $this->endMinute;
}
public function setEndMinute(?int $endMinute): self
{
$this->endMinute = $endMinute;
return $this;
}
public function isIsAllDay(): ?bool
{
return $this->isAllDay;
}
public function setIsAllDay(?bool $isAllDay): self
{
$this->isAllDay = $isAllDay;
return $this;
}
public function isIsRepeat(): ?bool
{
return $this->isRepeat;
}
public function setIsRepeat(?bool $isRepeat): self
{
$this->isRepeat = $isRepeat;
return $this;
}
public function getRepeatType(): ?string
{
return $this->repeatType;
}
public function setRepeatType(?string $repeatType): self
{
$this->repeatType = $repeatType;
return $this;
}
public function getMeetingLink(): ?string
{
return $this->meetingLink;
}
public function setMeetingLink(?string $meetingLink): self
{
$this->meetingLink = $meetingLink;
return $this;
}
public function getRepeatOptions(): ?array
{
return $this->repeatOptions;
}
public function setRepeatOptions(?array $repeatOptions): self
{
$this->repeatOptions = $repeatOptions;
return $this;
}
public function getChair(): ?User
{
return $this->chair;
}
public function setChair(?User $chair): self
{
$this->chair = $chair;
return $this;
}
public function getStaffLiaison(): ?User
{
return $this->staffLiaison;
}
public function setStaffLiaison(?User $staffLiaison): self
{
$this->staffLiaison = $staffLiaison;
return $this;
}
public function getParent(): ?Committee
{
return $this->parent;
}
public function setParent(?Committee $parent): self
{
$this->parent = $parent;
return $this;
}
public function isDeleted(): ?bool
{
return $this->deleted;
}
public function setDeleted(?bool $deleted): self
{
$this->deleted = $deleted;
return $this;
}
public function getSequence(): ?int
{
return $this->sequence;
}
public function setSequence(?int $sequence): self
{
$this->sequence = $sequence;
return $this;
}
public function getMeridiemStart(): ?string
{
return $this->meridiemStart;
}
public function setMeridiemStart(string $meridiemStart): self
{
$this->meridiemStart = $meridiemStart;
return $this;
}
public function getMeridiemEnd(): ?string
{
return $this->meridiemEnd;
}
public function setMeridiemEnd(string $meridiemEnd): self
{
$this->meridiemEnd = $meridiemEnd;
return $this;
}
public function getStatus(): ?string
{
return $this->status;
}
public function setStatus(string $status): self
{
$this->status = $status;
return $this;
}
}