src/Entity/UserAcademicTitle.php line 26

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use ApiPlatform\Core\Annotation\ApiResource;
  5. use App\Repository\UserAcademicTitleRepository;
  6. use Symfony\Component\Serializer\Annotation\Groups;
  7. /**
  8.  * @ApiResource(
  9.  *      attributes={"security"="is_granted('ROLE_SUPER_ADMIN')"},
  10.  *      normalizationContext={"groups"={"UserAcademicTitle:Read"}, "skip_null_values"=false},
  11.  *      denormalizationContext={"groups"={"UserAcademicTitle:Write"}},
  12.  *      collectionOperations={
  13.  *          "post",
  14.  *          "get"
  15.  *      },
  16.  *      itemOperations={
  17.  *          "get"
  18.  *     }
  19.  * )
  20.  * @ORM\Entity(repositoryClass=UserAcademicTitleRepository::class)
  21.  * @ORM\Table(name="rel_user_academic_title")
  22.  */
  23. class UserAcademicTitle
  24. {
  25.     /**
  26.      * @ORM\Id
  27.      * @ORM\GeneratedValue
  28.      * @ORM\Column(type="integer")
  29.      */
  30.     private $id;
  31.     /**
  32.      * @ORM\Column(type="integer")
  33.      * @Groups({"User:Imp", "User:Read", "User:Get-Admin","User:Write","User:Me", "User:Attendee-List", "User:Attendee-List-O", "User:Change-Profile", "User:Get-Limited","Session:Select","VideoGalleryHistory:Read" , "JobQueue:Read", "AccessLog:Read", "EventLog:Read", "WatchTime:Read", "CommonComment:Read", "CommonCommentLike:Read", "SessionQuestionLike:Read", "NewsfeedLike:Read", "SessionReaction:Read", "SessionComment:Read", "Session:Read", "DocFile:Read", "Session:PRead", "Conference:Read", "Conference:PRead", "ElCourse:PRead", "Session:Agenda", "Newsfeed:Read", "NewsfeedComment:Read", "ChatThread:Read", "ChatMessage:Read", "Session:VideoLibrary", "VoteResult:Read", "VoteResult:Exp", "SessionQuestion:Read", "Meeting:Read", "MeetingBooking:Read", "Import:Read", "SessionQuestion:Exp", "VoucherCode:Read", "ElCourse:Read", "ElTask:Read", "VideoLibrary:Read", "ElExamAttempt:Read", "ElExamAnswer:Read", "ElCourseJoin:Read", "ElTaskAttempt:Read", "ElExamAttempt:Read", "VideoGallery:Read", "VideoGallery:Read-Public", "VideoGallery:PRead", "SurveyResult:Read", "User:PRead", "User:PSRead", "Certificate:Read", "ElLession:Detail", "User:Assign-List", "Company:Read", "ElCourseRating:Read", "User:Get-Open"})
  34.      */
  35.     private $ord;
  36.     /**
  37.      * @ORM\ManyToOne(targetEntity=AcademicTitle::class)
  38.      * @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
  39.      * @Groups({"User:EL", "User:Imp", "User:Read", "User:Get-Admin","User:Write","User:Me", "User:Attendee-List", "User:Attendee-List-O", "User:Change-Profile", "User:Get-Limited","Session:Select","VideoGalleryHistory:Read" , "JobQueue:Read", "AccessLog:Read", "EventLog:Read", "WatchTime:Read", "CommonComment:Read", "CommonCommentLike:Read", "SessionQuestionLike:Read", "NewsfeedLike:Read", "SessionReaction:Read", "SessionComment:Read", "Session:Read", "DocFile:Read", "Session:PRead", "Conference:Read", "Conference:PRead", "ElCourse:PRead", "Session:Agenda", "Newsfeed:Read", "NewsfeedComment:Read", "ChatThread:Read", "ChatMessage:Read", "Session:VideoLibrary", "VoteResult:Read", "VoteResult:Exp", "SessionQuestion:Read", "Meeting:Read", "MeetingBooking:Read", "Import:Read", "SessionQuestion:Exp", "VoucherCode:Read", "ElCourse:Read", "ElTask:Read", "VideoLibrary:Read", "ElExamAttempt:Read", "ElExamAnswer:Read", "ElCourseJoin:Read", "ElTaskAttempt:Read", "ElExamAttempt:Read", "VideoGallery:Read", "VideoGallery:Read-Public", "VideoGallery:PRead", "SurveyResult:Read", "User:PRead", "User:PSRead", "Certificate:Read", "ElLession:Detail", "User:Assign-List", "Company:Read", "ElCourseRating:Read", "User:Get-Open"})
  40.      */
  41.     private $academicTitle;
  42.     /**
  43.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="userAcademicTitles")
  44.      * @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
  45.      */
  46.     private $user;
  47.     public function getId(): ?int
  48.     {
  49.         return $this->id;
  50.     }
  51.     public function getOrd(): ?int
  52.     {
  53.         return $this->ord;
  54.     }
  55.     public function setOrd(int $ord): self
  56.     {
  57.         $this->ord $ord;
  58.         return $this;
  59.     }
  60.     public function getAcademicTitle(): ?AcademicTitle
  61.     {
  62.         return $this->academicTitle;
  63.     }
  64.     public function setAcademicTitle(?AcademicTitle $academicTitle): self
  65.     {
  66.         $this->academicTitle $academicTitle;
  67.         return $this;
  68.     }
  69.     public function getUser(): ?User
  70.     {
  71.         return $this->user;
  72.     }
  73.     public function setUser(?User $user): self
  74.     {
  75.         $this->user $user;
  76.         return $this;
  77.     }
  78. }