src/Entity/Core/RelationActivityFolderActivity.php line 9

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Core;
  3. use Doctrine\ORM\Mapping as ORM;
  4. #[ORM\Table(name: 'relation_activity_folder_activity')]
  5. #[ORM\Entity]
  6. class RelationActivityFolderActivity
  7. {
  8. #[ORM\Id]
  9. #[ORM\GeneratedValue]
  10. #[ORM\Column(type: 'integer')]
  11. private int $id;
  12. #[ORM\JoinColumn(name: 'activity_folder_id', referencedColumnName: 'id', nullable: true)]
  13. #[ORM\ManyToOne(targetEntity: ActivityFolder::class)]
  14. private ?ActivityFolder $activityFolder = null;
  15. #[ORM\Column(name: 'activity_type', type: 'string', length: 255)]
  16. private string $activityType;
  17. #[ORM\Column(name: 'activity_id', type: 'integer')]
  18. private int $activityId;
  19. #[ORM\Column(type: 'integer', nullable: false)]
  20. private int $duration = 0;
  21. #[ORM\Column(name: 'sort_order', type: 'integer', nullable: true)]
  22. private ?int $sortOrder = null;
  23. public function getId(): int
  24. {
  25. return $this->id;
  26. }
  27. public function getActivityFolder(): ?ActivityFolder
  28. {
  29. return $this->activityFolder;
  30. }
  31. /**
  32. * @return $this
  33. */
  34. public function setActivityFolder(?ActivityFolder $activityFolder): self
  35. {
  36. $this->activityFolder = $activityFolder;
  37. return $this;
  38. }
  39. public function getActivityType(): string
  40. {
  41. return $this->activityType;
  42. }
  43. /**
  44. * @return $this
  45. */
  46. public function setActivityType(string $activityType): self
  47. {
  48. $this->activityType = strtolower($activityType);
  49. return $this;
  50. }
  51. public function getActivityId(): int
  52. {
  53. return $this->activityId;
  54. }
  55. /**
  56. * @return $this
  57. */
  58. public function setActivityId(int $activityId): self
  59. {
  60. $this->activityId = $activityId;
  61. return $this;
  62. }
  63. public function getDuration(): int
  64. {
  65. return $this->duration;
  66. }
  67. /**
  68. * @return $this
  69. */
  70. public function setDuration(int $duration): self
  71. {
  72. $this->duration = $duration;
  73. return $this;
  74. }
  75. public function getSortOrder(): ?int
  76. {
  77. return $this->sortOrder;
  78. }
  79. /**
  80. * @return $this
  81. */
  82. public function setSortOrder(?int $sortOrder): self
  83. {
  84. $this->sortOrder = $sortOrder;
  85. return $this;
  86. }
  87. }