src/Entity/TareaCurso.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\TareaCursoRepository;
  4. use DateTimeInterface;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Symfony\Component\Validator\Constraints as Assert;
  8. #[ORM\Entity(repositoryClass: TareaCursoRepository::class)]
  9. class TareaCurso
  10. {
  11. #[ORM\Id]
  12. #[ORM\GeneratedValue]
  13. #[ORM\Column]
  14. private ?int $id = null;
  15. #[ORM\ManyToOne(inversedBy: 'tareas')]
  16. #[ORM\JoinColumn(nullable: false)]
  17. private ?Curso $curso = null;
  18. #[Assert\NotBlank]
  19. #[ORM\Column(length: 255)]
  20. private ?string $nombre = null;
  21. #[ORM\Column(type: Types::TEXT, nullable: true)]
  22. private ?string $descripcion = null;
  23. #[ORM\Column]
  24. private ?bool $completada = false;
  25. #[ORM\Column(type: Types::DATE_MUTABLE, nullable: true)]
  26. private ?DateTimeInterface $fechaLimite = null;
  27. public function getId(): ?int
  28. {
  29. return $this->id;
  30. }
  31. public function getCurso(): ?Curso
  32. {
  33. return $this->curso;
  34. }
  35. public function setCurso(?Curso $curso): static
  36. {
  37. $this->curso = $curso;
  38. return $this;
  39. }
  40. public function getNombre(): ?string
  41. {
  42. return $this->nombre;
  43. }
  44. public function setNombre(?string $nombre): static
  45. {
  46. $this->nombre = $nombre;
  47. return $this;
  48. }
  49. public function getDescripcion(): ?string
  50. {
  51. return $this->descripcion;
  52. }
  53. public function setDescripcion(?string $descripcion): static
  54. {
  55. $this->descripcion = $descripcion;
  56. return $this;
  57. }
  58. public function isCompletada(): ?bool
  59. {
  60. return $this->completada;
  61. }
  62. public function setCompletada(bool $completada): static
  63. {
  64. $this->completada = $completada;
  65. return $this;
  66. }
  67. public function getFechaLimite(): ?DateTimeInterface
  68. {
  69. return $this->fechaLimite;
  70. }
  71. public function setFechaLimite(?DateTimeInterface $fechaLimite): static
  72. {
  73. $this->fechaLimite = $fechaLimite;
  74. return $this;
  75. }
  76. }