src/Entity/ContractTemplates.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ContractTemplatesRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClass: ContractTemplatesRepository::class)]
  7. #[ORM\Table(name: 'contract_templates')]
  8. class ContractTemplates
  9. {
  10. #[ORM\Id]
  11. #[ORM\GeneratedValue]
  12. #[ORM\Column(type: 'integer')]
  13. private ?int $id = null;
  14. #[ORM\Column(type: 'string', length: 255)]
  15. private ?string $name = null;
  16. #[ORM\Column(type: Types::TEXT)]
  17. private ?string $template = null;
  18. #[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
  19. private ?\DateTimeInterface $created = null;
  20. #[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
  21. private ?\DateTimeInterface $updated = null;
  22. public function __construct()
  23. {
  24. $this->created = new \DateTime();
  25. }
  26. public function getId(): ?int
  27. {
  28. return $this->id;
  29. }
  30. public function getName(): ?string
  31. {
  32. return $this->name;
  33. }
  34. public function setName(string $name): self
  35. {
  36. $this->name = $name;
  37. return $this;
  38. }
  39. public function getTemplate(): ?string
  40. {
  41. return $this->template;
  42. }
  43. public function setTemplate(string $template): self
  44. {
  45. $this->template = $template;
  46. return $this;
  47. }
  48. public function getCreated(): ?\DateTimeInterface
  49. {
  50. return $this->created;
  51. }
  52. public function setCreated(?\DateTimeInterface $created): self
  53. {
  54. $this->created = $created;
  55. return $this;
  56. }
  57. public function getUpdated(): ?\DateTimeInterface
  58. {
  59. return $this->updated;
  60. }
  61. public function setUpdated(?\DateTimeInterface $updated): self
  62. {
  63. $this->updated = $updated;
  64. return $this;
  65. }
  66. public function __toString(): string
  67. {
  68. return (string) $this->name;
  69. }
  70. }