src/Entity/CategoryJ.php line 9

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\CategoryJRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClass: CategoryJRepository::class)]
  6. class CategoryJ
  7. {
  8. #[ORM\Id]
  9. #[ORM\GeneratedValue]
  10. #[ORM\Column]
  11. private ?int $id = null;
  12. #[ORM\ManyToOne(targetEntity: FamilleJ::class)]
  13. #[ORM\JoinColumn(nullable: true)]
  14. private ?FamilleJ $famille = null;
  15. #[ORM\Column(nullable: true)]
  16. private ?int $dureeAmortissement = null;
  17. #[ORM\Column(length: 50)]
  18. private ?string $methodeAmortissement = 'LINEAIRE';
  19. #[ORM\Column(length: 50)]
  20. private ?string $libele = null;
  21. #[ORM\Column(length: 255)]
  22. private ?string $nomequip = null;
  23. public function getId(): ?int
  24. {
  25. return $this->id;
  26. }
  27. public function getFamille(): ?FamilleJ
  28. {
  29. return $this->famille;
  30. }
  31. public function setFamille(?FamilleJ $famille): self
  32. {
  33. $this->famille = $famille;
  34. return $this;
  35. }
  36. public function getLibele(): ?string
  37. {
  38. return $this->libele;
  39. }
  40. public function setLibele(string $libele): self
  41. {
  42. $this->libele = $libele;
  43. return $this;
  44. }
  45. public function getNomequip(): ?string
  46. {
  47. return $this->nomequip;
  48. }
  49. public function setNomequip(string $nomequip): self
  50. {
  51. $this->nomequip = $nomequip;
  52. return $this;
  53. }
  54. public function __toString(): string
  55. {
  56. return (string) $this->libele;
  57. }
  58. // --- dureeAmortissement ---
  59. public function getDureeAmortissement(): ?int
  60. {
  61. return $this->dureeAmortissement;
  62. }
  63. public function setDureeAmortissement(?int $dureeAmortissement): self
  64. {
  65. $this->dureeAmortissement = $dureeAmortissement;
  66. return $this;
  67. }
  68. // --- methodeAmortissement ---
  69. public function getMethodeAmortissement(): ?string
  70. {
  71. return $this->methodeAmortissement;
  72. }
  73. public function setMethodeAmortissement(string $methodeAmortissement): self
  74. {
  75. $this->methodeAmortissement = $methodeAmortissement;
  76. return $this;
  77. }
  78. }