src/Entity/Committee.php line 21

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\CommitteeRepository;
  4. use Doctrine\ORM\Event\PreUpdateEventArgs;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use ApiPlatform\Core\Annotation\ApiResource;
  7. use ApiPlatform\Core\Annotation\ApiFilter;
  8. use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\SearchFilter;
  9. use Symfony\Component\Serializer\Annotation\Groups;
  10. /**
  11.  * @ORM\Entity(repositoryClass=CommitteeRepository::class)
  12.  * @ORM\HasLifecycleCallbacks()
  13.  * @ApiResource(
  14.  *     normalizationContext={"groups"={"committee:read", "base:read", "assign:read"}},
  15.  *     denormalizationContext={"groups"={"committee:write", "base:write", "assign:write"}},
  16.  * )
  17.  */
  18. class Committee
  19. {
  20.     /**
  21.      * @ORM\Id
  22.      * @ORM\GeneratedValue
  23.      * @ORM\Column(type="integer")
  24.      * @Groups({"committee:read"})
  25.      */
  26.     private $id;
  27.     /**
  28.      * @ORM\Column(type="string", length=255)
  29.      * @Groups({"committee:read", "committee:write"})
  30.      */
  31.     private $name;
  32.     /**
  33.      * @ORM\Column(type="string", length=255)
  34.      * @Groups({"committee:read", "committee:write"})
  35.      */
  36.     private $type;
  37.     /**
  38.      * @ORM\Column(type="text")
  39.      * @Groups({"committee:read", "committee:write"})
  40.      */
  41.     private $description;
  42.     /**
  43.      * @ORM\Column(type="string", length=255, nullable=true)
  44.      * @Groups({"committee:read", "committee:write"})
  45.      */
  46.     private $timeNote;
  47.     /**
  48.      * @ORM\Column(type="integer", options={"default": 0})
  49.      * @Groups({"committee:read", "committee:write"})
  50.      */
  51.     private $members 0;
  52.     /**
  53.      * @ORM\Column(type="string", length=255, nullable=true)
  54.      * @Groups({"committee:read", "committee:write"})
  55.      */
  56.     private $chairName;
  57.     /**
  58.      * @ORM\Column(type="string", length=255, nullable=true)
  59.      * @Groups({"committee:read", "committee:write"})
  60.      */
  61.     private $chairEmail;
  62.     /**
  63.      * @ORM\Column(type="string", length=255, nullable=true)
  64.      * @Groups({"committee:read", "committee:write"})
  65.      */
  66.     private $chairPhone;
  67.     /**
  68.      * @ORM\Column(type="string", length=255, nullable=true)
  69.      * @Groups({"committee:read", "committee:write"})
  70.      */
  71.     private $staffLiaisonName;
  72.     /**
  73.      * @ORM\Column(type="string", length=255, nullable=true)
  74.      * @Groups({"committee:read", "committee:write"})
  75.      */
  76.     private $staffLiaisonEmail;
  77.     /**
  78.      * @ORM\Column(type="string", length=255, nullable=true)
  79.      * @Groups({"committee:read", "committee:write"})
  80.      */
  81.     private $staffLiaisonPhone;
  82.     /**
  83.      * @ORM\Column(type="string", length=255, nullable=true)
  84.      * @Groups({"committee:read", "committee:write"})
  85.      */
  86.     private $staffPhoneExtension;
  87.     /**
  88.      * @ORM\Column(type="text", nullable=true)
  89.      * @Groups({"committee:read", "committee:write"})
  90.      */
  91.     private $newMemberEmailTemplate;
  92.     /**
  93.      * @ORM\Column(type="date", nullable=true)
  94.      * @Groups({"committee:read", "committee:write"})
  95.      */
  96.     private $startDate;
  97.     /**
  98.      * @ORM\Column(type="integer", nullable=true)
  99.      * @Groups({"committee:read", "committee:write"})
  100.      */
  101.     private $startHour;
  102.     /**
  103.      * @ORM\Column(type="integer", nullable=true)
  104.      * @Groups({"committee:read", "committee:write"})
  105.      */
  106.     private $startMinute;
  107.     /**
  108.      * @ORM\Column(type="date", nullable=true)
  109.      * @Groups({"committee:read", "committee:write"})
  110.      */
  111.     private $endDate;
  112.     /**
  113.      * @ORM\Column(type="integer", nullable=true)
  114.      * @Groups({"committee:read", "committee:write"})
  115.      */
  116.     private $endHour;
  117.     /**
  118.      * @ORM\Column(type="string", length=255, nullable=true)
  119.      * @Groups({"committee:read", "committee:write"})
  120.      */
  121.     private $meridiemStart;
  122.     /**
  123.      * @ORM\Column(type="string", length=255, nullable=true)
  124.      * @Groups({"committee:read", "committee:write"})
  125.      */
  126.     private $meridiemEnd;
  127.     /**
  128.      * @ORM\Column(type="integer", nullable=true)
  129.      * @Groups({"committee:read", "committee:write"})
  130.      */
  131.     private $endMinute;
  132.     /**
  133.      * @ORM\Column(type="boolean", nullable=true)
  134.      * @Groups({"committee:read", "committee:write"})
  135.      */
  136.     private $isAllDay;
  137.     /**
  138.      * @ORM\Column(type="boolean", nullable=true)
  139.      * @Groups({"committee:read", "committee:write"})
  140.      */
  141.     private $isRepeat;
  142.     /**
  143.      * @ORM\Column(type="string", length=255, nullable=true)
  144.      * @Groups({"committee:read", "committee:write"})
  145.      */
  146.     private $repeatType;
  147.     /**
  148.      * @ORM\Column(type="string", length=255, nullable=true)
  149.      * @Groups({"committee:read", "committee:write"})
  150.      */
  151.     private $meetingLink;
  152.     /**
  153.      * @ORM\Column(type="json", nullable=true)
  154.      * @Groups({"committee:read", "committee:write"})
  155.      */
  156.     private $repeatOptions = [];
  157.     /**
  158.      * @ORM\ManyToOne(targetEntity=User::class)
  159.      * @Groups({"committee:read", "committee:write"})
  160.      */
  161.     private $chair;
  162.     /**
  163.      * @ORM\ManyToOne(targetEntity=User::class)
  164.      * @Groups({"committee:read", "committee:write"})
  165.      */
  166.     private $staffLiaison;
  167.     /**
  168.      * @ORM\ManyToOne(targetEntity=Committee::class)
  169.      * @Groups({"committee:read", "committee:write"})
  170.      */
  171.     private $parent;
  172.     /**
  173.      * @ORM\Column(type="boolean", nullable=true)
  174.      * @Groups({"committee:read", "committee:write"})
  175.      */
  176.     private $deleted false;
  177.     /**
  178.      * @ORM\Column(type="integer", nullable=true)
  179.      * @Groups({"committee:read", "committee:write"})
  180.      */
  181.     private $sequence;
  182.     /**
  183.      * @ORM\Column(type="string", length=50, options={"default": "Active"})
  184.      * @Groups({"committee:read", "committee:write"})
  185.      */
  186.     private $status 'Active';
  187.     /**
  188.      * @ORM\PrePersist
  189.      */
  190.     public function PreCreate()
  191.     {
  192.         $this->endDate $this->startDate;
  193.     }
  194.     /**
  195.      * @ORM\PreUpdate
  196.      */
  197.     public function PreUpdate(PreUpdateEventArgs $event)
  198.     {
  199.         $this->endDate $this->startDate;
  200.     }
  201.     public function getId(): ?int
  202.     {
  203.         return $this->id;
  204.     }
  205.     public function getName(): ?string
  206.     {
  207.         return $this->name;
  208.     }
  209.     public function setName(string $name): self
  210.     {
  211.         $this->name $name;
  212.         return $this;
  213.     }
  214.     public function getType(): ?string
  215.     {
  216.         return $this->type;
  217.     }
  218.     public function setType(string $type): self
  219.     {
  220.         $this->type $type;
  221.         return $this;
  222.     }
  223.     public function getDescription(): ?string
  224.     {
  225.         return $this->description;
  226.     }
  227.     public function setDescription(string $description): self
  228.     {
  229.         $this->description $description;
  230.         return $this;
  231.     }
  232.     public function getTimeNote(): ?string
  233.     {
  234.         return $this->timeNote;
  235.     }
  236.     public function setTimeNote(?string $timeNote): self
  237.     {
  238.         $this->timeNote $timeNote;
  239.         return $this;
  240.     }
  241.     public function getMembers(): ?int
  242.     {
  243.         return $this->members;
  244.     }
  245.     public function setMembers(int $members): self
  246.     {
  247.         $this->members $members;
  248.         return $this;
  249.     }
  250.     public function getChairName(): ?string
  251.     {
  252.         return $this->chairName;
  253.     }
  254.     public function setChairName(?string $chairName): self
  255.     {
  256.         $this->chairName $chairName;
  257.         return $this;
  258.     }
  259.     public function getChairEmail(): ?string
  260.     {
  261.         return $this->chairEmail;
  262.     }
  263.     public function setChairEmail(?string $chairEmail): self
  264.     {
  265.         $this->chairEmail $chairEmail;
  266.         return $this;
  267.     }
  268.     public function getChairPhone(): ?string
  269.     {
  270.         return $this->chairPhone;
  271.     }
  272.     public function setChairPhone(?string $chairPhone): self
  273.     {
  274.         $this->chairPhone $chairPhone;
  275.         return $this;
  276.     }
  277.     public function getStaffLiaisonName(): ?string
  278.     {
  279.         return $this->staffLiaisonName;
  280.     }
  281.     public function setStaffLiaisonName(?string $staffLiaisonName): self
  282.     {
  283.         $this->staffLiaisonName $staffLiaisonName;
  284.         return $this;
  285.     }
  286.     public function getStaffLiaisonEmail(): ?string
  287.     {
  288.         return $this->staffLiaisonEmail;
  289.     }
  290.     public function setStaffLiaisonEmail(?string $staffLiaisonEmail): self
  291.     {
  292.         $this->staffLiaisonEmail $staffLiaisonEmail;
  293.         return $this;
  294.     }
  295.     public function getStaffLiaisonPhone(): ?string
  296.     {
  297.         return $this->staffLiaisonPhone;
  298.     }
  299.     public function setStaffLiaisonPhone(?string $staffLiaisonPhone): self
  300.     {
  301.         $this->staffLiaisonPhone $staffLiaisonPhone;
  302.         return $this;
  303.     }
  304.     public function getStaffPhoneExtension(): ?string
  305.     {
  306.         return $this->staffPhoneExtension;
  307.     }
  308.     public function setStaffPhoneExtension(?string $staffPhoneExtension): self
  309.     {
  310.         $this->staffPhoneExtension $staffPhoneExtension;
  311.         return $this;
  312.     }
  313.     public function getNewMemberEmailTemplate(): ?string
  314.     {
  315.         return $this->newMemberEmailTemplate;
  316.     }
  317.     public function setNewMemberEmailTemplate(?string $newMemberEmailTemplate): self
  318.     {
  319.         $this->newMemberEmailTemplate $newMemberEmailTemplate;
  320.         return $this;
  321.     }
  322.     public function getStartDate(): ?\DateTimeInterface
  323.     {
  324.         return $this->startDate;
  325.     }
  326.     public function setStartDate(?\DateTimeInterface $startDate): self
  327.     {
  328.         $this->startDate $startDate;
  329.         return $this;
  330.     }
  331.     public function getStartHour(): ?int
  332.     {
  333.         return $this->startHour;
  334.     }
  335.     public function setStartHour(?int $startHour): self
  336.     {
  337.         $this->startHour $startHour;
  338.         return $this;
  339.     }
  340.     public function getStartMinute(): ?int
  341.     {
  342.         return $this->startMinute;
  343.     }
  344.     public function setStartMinute(?int $startMinute): self
  345.     {
  346.         $this->startMinute $startMinute;
  347.         return $this;
  348.     }
  349.     public function getEndDate(): ?\DateTimeInterface
  350.     {
  351.         return $this->endDate;
  352.     }
  353.     public function setEndDate(?\DateTimeInterface $endDate): self
  354.     {
  355.         $this->endDate $endDate;
  356.         return $this;
  357.     }
  358.     public function getEndHour(): ?int
  359.     {
  360.         return $this->endHour;
  361.     }
  362.     public function setEndHour(?int $endHour): self
  363.     {
  364.         $this->endHour $endHour;
  365.         return $this;
  366.     }
  367.     public function getEndMinute(): ?int
  368.     {
  369.         return $this->endMinute;
  370.     }
  371.     public function setEndMinute(?int $endMinute): self
  372.     {
  373.         $this->endMinute $endMinute;
  374.         return $this;
  375.     }
  376.     public function isIsAllDay(): ?bool
  377.     {
  378.         return $this->isAllDay;
  379.     }
  380.     public function setIsAllDay(?bool $isAllDay): self
  381.     {
  382.         $this->isAllDay $isAllDay;
  383.         return $this;
  384.     }
  385.     public function isIsRepeat(): ?bool
  386.     {
  387.         return $this->isRepeat;
  388.     }
  389.     public function setIsRepeat(?bool $isRepeat): self
  390.     {
  391.         $this->isRepeat $isRepeat;
  392.         return $this;
  393.     }
  394.     public function getRepeatType(): ?string
  395.     {
  396.         return $this->repeatType;
  397.     }
  398.     public function setRepeatType(?string $repeatType): self
  399.     {
  400.         $this->repeatType $repeatType;
  401.         return $this;
  402.     }
  403.     public function getMeetingLink(): ?string
  404.     {
  405.         return $this->meetingLink;
  406.     }
  407.     public function setMeetingLink(?string $meetingLink): self
  408.     {
  409.         $this->meetingLink $meetingLink;
  410.         return $this;
  411.     }
  412.     public function getRepeatOptions(): ?array
  413.     {
  414.         return $this->repeatOptions;
  415.     }
  416.     public function setRepeatOptions(?array $repeatOptions): self
  417.     {
  418.         $this->repeatOptions $repeatOptions;
  419.         return $this;
  420.     }
  421.     public function getChair(): ?User
  422.     {
  423.         return $this->chair;
  424.     }
  425.     public function setChair(?User $chair): self
  426.     {
  427.         $this->chair $chair;
  428.         return $this;
  429.     }
  430.     public function getStaffLiaison(): ?User
  431.     {
  432.         return $this->staffLiaison;
  433.     }
  434.     public function setStaffLiaison(?User $staffLiaison): self
  435.     {
  436.         $this->staffLiaison $staffLiaison;
  437.         return $this;
  438.     }
  439.     public function getParent(): ?Committee
  440.     {
  441.         return $this->parent;
  442.     }
  443.     public function setParent(?Committee $parent): self
  444.     {
  445.         $this->parent $parent;
  446.         return $this;
  447.     }
  448.     public function isDeleted(): ?bool
  449.     {
  450.         return $this->deleted;
  451.     }
  452.     public function setDeleted(?bool $deleted): self
  453.     {
  454.         $this->deleted $deleted;
  455.         return $this;
  456.     }
  457.     public function getSequence(): ?int
  458.     {
  459.         return $this->sequence;
  460.     }
  461.     public function setSequence(?int $sequence): self
  462.     {
  463.         $this->sequence $sequence;
  464.         return $this;
  465.     }
  466.     public function getMeridiemStart(): ?string
  467.     {
  468.         return $this->meridiemStart;
  469.     }
  470.     public function setMeridiemStart(string $meridiemStart): self
  471.     {
  472.         $this->meridiemStart $meridiemStart;
  473.         return $this;
  474.     }
  475.     public function getMeridiemEnd(): ?string
  476.     {
  477.         return $this->meridiemEnd;
  478.     }
  479.     public function setMeridiemEnd(string $meridiemEnd): self
  480.     {
  481.         $this->meridiemEnd $meridiemEnd;
  482.         return $this;
  483.     }
  484.     public function getStatus(): ?string
  485.     {
  486.         return $this->status;
  487.     }
  488.     public function setStatus(string $status): self
  489.     {
  490.         $this->status $status;
  491.         return $this;
  492.     }
  493. }