src/Entity/Catalogue.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\CatalogueRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use App\Enum\TypeArticle;
  6. #[ORM\Entity(repositoryClass: CatalogueRepository::class)]
  7. #[ORM\Table(name: "Catalogue")]
  8. class Catalogue
  9. {
  10. #[ORM\Id]
  11. #[ORM\GeneratedValue]
  12. #[ORM\Column(type: "integer")]
  13. private ?int $id = null;
  14. #[ORM\Column(length: 20)]
  15. private ?string $typeArticle = null;
  16. #[ORM\ManyToOne(targetEntity: CategoryCatalogue::class)]
  17. #[ORM\JoinColumn(nullable: true)]
  18. private ?CategoryCatalogue $categorycatalogue = null;
  19. #[ORM\ManyToOne(targetEntity: SousCategoryCatalogue::class)]
  20. #[ORM\JoinColumn(nullable: true)]
  21. private ?SousCategoryCatalogue $sousCategoryCatalogue = null;
  22. #[ORM\ManyToOne(targetEntity: FamilleJ::class)]
  23. #[ORM\JoinColumn(nullable: true)]
  24. private ?FamilleJ $assetCodeFamille = null;
  25. #[ORM\ManyToOne(targetEntity: CategoryJ::class)]
  26. #[ORM\JoinColumn(nullable: true)]
  27. private ?CategoryJ $assetCodeCategory = null;
  28. #[ORM\OneToOne(targetEntity: Image::class, cascade: ["persist", "remove"])]
  29. #[ORM\JoinColumn(nullable: true)]
  30. private ?Image $image = null;
  31. #[ORM\ManyToOne(targetEntity: User::class)]
  32. #[ORM\JoinColumn(nullable: true)]
  33. private ?User $user = null;
  34. #[ORM\Column(type: "string", length: 255)]
  35. private ?string $designation = null;
  36. #[ORM\Column(type: "string", length: 255)]
  37. private ?string $description = null;
  38. #[ORM\Column(type: "string", length: 50, nullable: true)]
  39. private ?string $codeArticle = null;
  40. #[ORM\Column(type: "string", length: 10, nullable: true)]
  41. private ?string $asset = null;
  42. #[ORM\Column(type: "string", length: 10, nullable: true)]
  43. private ?string $stockable = null;
  44. #[ORM\Column(type: "string", length: 20, nullable: true)]
  45. private ?string $unite = null;
  46. #[ORM\Column(type: "decimal", precision: 10, scale: 2)]
  47. private ?string $prix = null;
  48. #[ORM\Column(type: "datetime_immutable")]
  49. private \DateTimeInterface $dateCreer;
  50. #[ORM\Column(type: "datetime_immutable")]
  51. private \DateTimeInterface $dateModif;
  52. #[ORM\Column(type: "decimal", precision: 10, nullable: true,scale: 2)]
  53. private ?string $prixHT = null;
  54. #[ORM\Column(type: "string", length: 10, nullable: true)]
  55. private ?string $taxe = null;
  56. #[ORM\Column(type: "integer", nullable: true)]
  57. private ?int $minStock = null;
  58. #[ORM\Column(type: "integer", nullable: true)]
  59. private ?int $maxStock = null;
  60. #[ORM\Column(type: "integer", nullable: true)]
  61. private ?int $stockSecurite = null;
  62. #[ORM\Column(type: "string", length: 20, nullable: true)]
  63. private ?string $typeMRP = null;
  64. #[ORM\Column(type: "integer", nullable: true)]
  65. private ?int $supplierLeadTime = null;
  66. #[ORM\Column(type: "integer", nullable: true)]
  67. private ?int $procurementLeadTime = null;
  68. #[ORM\Column(type: "integer", nullable: true)]
  69. private ?int $monthlyConsumption = null;
  70. public function __construct()
  71. {
  72. $this->dateCreer = new \DateTimeImmutable();
  73. $this->dateModif = new \DateTimeImmutable();
  74. }
  75. public function getId(): ?int
  76. {
  77. return $this->id;
  78. }
  79. public function getCategorycatalogue(): ?CategoryCatalogue
  80. {
  81. return $this->categorycatalogue;
  82. }
  83. public function setCategorycatalogue(?CategoryCatalogue $categorycatalogue): self
  84. {
  85. $this->categorycatalogue = $categorycatalogue;
  86. return $this;
  87. }
  88. public function getSousCategoryCatalogue(): ?SousCategoryCatalogue
  89. {
  90. return $this->sousCategoryCatalogue;
  91. }
  92. public function setSousCategoryCatalogue(?SousCategoryCatalogue $sousCategoryCatalogue): self
  93. {
  94. $this->sousCategoryCatalogue = $sousCategoryCatalogue;
  95. return $this;
  96. }
  97. public function getImage(): ?Image
  98. {
  99. return $this->image;
  100. }
  101. public function setImage(?Image $image): self
  102. {
  103. $this->image = $image;
  104. return $this;
  105. }
  106. public function getUser(): ?User
  107. {
  108. return $this->user;
  109. }
  110. public function setUser(?User $user): self
  111. {
  112. $this->user = $user;
  113. return $this;
  114. }
  115. public function getDesignation(): ?string
  116. {
  117. return $this->designation;
  118. }
  119. public function setDesignation(string $designation): self
  120. {
  121. $this->designation = $designation;
  122. return $this;
  123. }
  124. public function getDescription(): ?string
  125. {
  126. return $this->description;
  127. }
  128. public function setDescription(string $description): self
  129. {
  130. $this->description = $description;
  131. return $this;
  132. }
  133. public function getCodeArticle(): ?string
  134. {
  135. return $this->codeArticle;
  136. }
  137. public function setCodeArticle(?string $codeArticle): self
  138. {
  139. $this->codeArticle = $codeArticle;
  140. return $this;
  141. }
  142. public function getAsset(): ?string
  143. {
  144. return $this->asset;
  145. }
  146. public function setAsset(?string $asset): self
  147. {
  148. $this->asset = $asset;
  149. return $this;
  150. }
  151. public function getStockable(): ?string
  152. {
  153. return $this->stockable;
  154. }
  155. public function setStockable(?string $stockable): self
  156. {
  157. $this->stockable = $stockable;
  158. return $this;
  159. }
  160. public function getUnite(): ?string
  161. {
  162. return $this->unite;
  163. }
  164. public function setUnite(?string $unite): self
  165. {
  166. $this->unite = $unite;
  167. return $this;
  168. }
  169. public function getPrix(): ?string
  170. {
  171. return $this->prix;
  172. }
  173. public function setPrix(?string $prix): self
  174. {
  175. $this->prix = $prix;
  176. return $this;
  177. }
  178. public function getDateCreer(): \DateTimeInterface
  179. {
  180. return $this->dateCreer;
  181. }
  182. public function setDateCreer(\DateTimeInterface $dateCreer): self
  183. {
  184. $this->dateCreer = $dateCreer;
  185. return $this;
  186. }
  187. public function getDateModif(): \DateTimeInterface
  188. {
  189. return $this->dateModif;
  190. }
  191. public function setDateModif(\DateTimeInterface $dateModif): self
  192. {
  193. $this->dateModif = $dateModif;
  194. return $this;
  195. }
  196. public function getPrixHT(): ?string
  197. {
  198. return $this->prixHT;
  199. }
  200. public function setPrixHT(?string $prixHT): self
  201. {
  202. $this->prixHT = $prixHT;
  203. return $this;
  204. }
  205. public function getTaxe(): ?string
  206. {
  207. return $this->taxe;
  208. }
  209. public function setTaxe(?string $taxe): self
  210. {
  211. $this->taxe = $taxe;
  212. return $this;
  213. }
  214. public function getMinStock(): ?int
  215. {
  216. return $this->minStock;
  217. }
  218. public function setMinStock(?int $minStock): self
  219. {
  220. $this->minStock = $minStock;
  221. return $this;
  222. }
  223. public function getMaxStock(): ?int
  224. {
  225. return $this->maxStock;
  226. }
  227. public function setMaxStock(?int $maxStock): self
  228. {
  229. $this->maxStock = $maxStock;
  230. return $this;
  231. }
  232. public function getStockSecurite(): ?int
  233. {
  234. return $this->stockSecurite;
  235. }
  236. public function setStockSecurite(?int $stockSecurite): self
  237. {
  238. $this->stockSecurite = $stockSecurite;
  239. return $this;
  240. }
  241. public function getTypeMRP(): ?string
  242. {
  243. return $this->typeMRP;
  244. }
  245. public function setTypeMRP(?string $typeMRP): self
  246. {
  247. $this->typeMRP = $typeMRP;
  248. return $this;
  249. }
  250. public function getSupplierLeadTime(): ?int
  251. {
  252. return $this->supplierLeadTime;
  253. }
  254. public function setSupplierLeadTime(?int $supplierLeadTime): self
  255. {
  256. $this->supplierLeadTime = $supplierLeadTime;
  257. return $this;
  258. }
  259. public function getProcurementLeadTime(): ?int
  260. {
  261. return $this->procurementLeadTime;
  262. }
  263. public function setProcurementLeadTime(?int $procurementLeadTime): self
  264. {
  265. $this->procurementLeadTime = $procurementLeadTime;
  266. return $this;
  267. }
  268. public function getMonthlyConsumption(): ?int
  269. {
  270. return $this->monthlyConsumption;
  271. }
  272. public function setMonthlyConsumption(?int $monthlyConsumption): self
  273. {
  274. $this->monthlyConsumption = $monthlyConsumption;
  275. return $this;
  276. }
  277. public function getTypeArticle(): ?string
  278. {
  279. return $this->typeArticle;
  280. }
  281. public function setTypeArticle(?string $typeArticle): self
  282. {
  283. $this->typeArticle = $typeArticle;
  284. return $this;
  285. }
  286. public function getAssetCodeFamille(): ?FamilleJ
  287. {
  288. return $this->assetCodeFamille;
  289. }
  290. public function setAssetCodeFamille(?FamilleJ $assetCodeFamille): self
  291. {
  292. $this->assetCodeFamille = $assetCodeFamille;
  293. return $this;
  294. }
  295. public function getAssetCodeCategory(): ?CategoryJ
  296. {
  297. return $this->assetCodeCategory;
  298. }
  299. public function setAssetCodeCategory(?CategoryJ $assetCodeCategory): self
  300. {
  301. $this->assetCodeCategory = $assetCodeCategory;
  302. return $this;
  303. }
  304. }