src/Entity/Fournisseur.php line 18

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use JMS\Serializer\Annotation\ExclusionPolicy;
  6. use JMS\Serializer\Annotation\Expose;
  7. use Symfony\Component\Validator\Constraints as Assert;
  8. /**
  9. * Fournisseur
  10. * @ORM\Table(name="fournisseur", options={"collate"="latin1_general_ci","charset"="latin1"})
  11. * @ORM\Entity(repositoryClass="App\Repository\FournisseurRepository")
  12. * @ExclusionPolicy("all")
  13. * @ORM\HasLifecycleCallbacks()
  14. */
  15. class Fournisseur {
  16. /**
  17. * @var integer
  18. *
  19. * @ORM\Column(name="id", type="integer", nullable=false)
  20. * @ORM\Id
  21. * @ORM\GeneratedValue(strategy="IDENTITY")
  22. * @Expose
  23. */
  24. private $id;
  25. /**
  26. * @var \DateTime
  27. *
  28. * @ORM\Column(name="datefr", type="date", nullable=false)
  29. */
  30. private $datefr;
  31. /**
  32. * @var string
  33. *
  34. * @ORM\Column(name="user", type="string", length=11, nullable=true)
  35. */
  36. private $user;
  37. /**
  38. * @var string
  39. *
  40. * @ORM\Column(name="password", type="string", length=11, nullable=true)
  41. */
  42. private $password;
  43. /**
  44. * @var string
  45. *
  46. * @ORM\Column(name="source", type="string", length=10, nullable=false)
  47. */
  48. private $source;
  49. /**
  50. * @var string
  51. *
  52. * @ORM\Column(name="famille", type="string", length=100, nullable=true)
  53. */
  54. private $famille;
  55. /**
  56. * @var string
  57. *
  58. * @ORM\Column(name="nom", type="string", length=150, nullable=true)
  59. * @Expose
  60. */
  61. private $nom;
  62. /**
  63. * @var string
  64. *
  65. * @ORM\Column(name="raison", type="string", length=150, nullable=false)
  66. */
  67. private $raison;
  68. /**
  69. * @var string
  70. *
  71. * @ORM\Column(name="contact", type="string", length=100, nullable=true)
  72. */
  73. private $contact;
  74. /**
  75. * @var string
  76. *
  77. * @ORM\Column(name="fonction", type="string", length=100, nullable=true)
  78. */
  79. private $fonction;
  80. /**
  81. * @var string
  82. *
  83. * @ORM\Column(name="comment", type="text", nullable=true)
  84. */
  85. private $comment;
  86. /**
  87. * @var string
  88. *
  89. * @ORM\Column(name="adresse", type="string", length=150, nullable=true)
  90. * @Expose
  91. */
  92. private $adresse;
  93. /**
  94. * @var string
  95. *
  96. * @ORM\Column(name="cp", type="string", length=10, nullable=true)
  97. * @Expose
  98. */
  99. private $cp;
  100. /**
  101. * @var string
  102. *
  103. * @ORM\Column(name="ville", type="string", length=100, nullable=true)
  104. * @Expose
  105. */
  106. private $ville;
  107. /**
  108. * @var string
  109. *
  110. * @ORM\Column(name="pays", type="string", length=2, nullable=true)
  111. * @Expose
  112. */
  113. private $pays;
  114. /**
  115. * @var string
  116. *
  117. * @ORM\Column(name="tel", type="string", length=30, nullable=true)
  118. */
  119. private $tel;
  120. /**
  121. * @var string
  122. *
  123. * @ORM\Column(name="mobile", type="string", length=30, nullable=true)
  124. */
  125. private $mobile;
  126. /**
  127. * @var string
  128. *
  129. * @ORM\Column(name="fax", type="string", length=30, nullable=true)
  130. */
  131. private $fax;
  132. /**
  133. * @var string
  134. * @ORM\Column(name="email", type="string", length=150, nullable=true)
  135. */
  136. private $email;
  137. /**
  138. * @var string
  139. *
  140. * @ORM\Column(name="site", type="string", length=150, nullable=true)
  141. */
  142. private $site;
  143. /**
  144. * @var float
  145. * @ORM\Column(name="reversement", type="decimal", nullable=false, precision=8, scale=2)
  146. */
  147. private $reversement;
  148. /**
  149. * @var boolean
  150. *
  151. * @ORM\Column(name="activite", type="boolean", nullable=false)
  152. */
  153. private $activite;
  154. /**
  155. * @ORM\OneToMany(targetEntity="App\Entity\Clientrelation", mappedBy="idfournisseur", cascade={"persist", "remove"})
  156. */
  157. private $clientRelation;
  158. /**
  159. * @ORM\Column(type="datetime", nullable=true)
  160. */
  161. private $updatedAt;
  162. /**
  163. * @ORM\Column(type="string", length=255, nullable=true)
  164. */
  165. private $contactOuvertureNom;
  166. /**
  167. * @ORM\Column(type="string", length=255, nullable=true)
  168. */
  169. private $contactOuverturePrenom;
  170. /**
  171. * @ORM\Column(type="string", length=255, nullable=true)
  172. */
  173. private $contactOuvertureEmail;
  174. public function getContactOuvertureNom()
  175. {
  176. return $this->contactOuvertureNom;
  177. }
  178. public function setContactOuvertureNom($contactOuvertureNom)
  179. {
  180. $this->contactOuvertureNom = $contactOuvertureNom;
  181. return $this;
  182. }
  183. public function getContactOuverturePrenom()
  184. {
  185. return $this->contactOuverturePrenom;
  186. }
  187. public function setContactOuverturePrenom( $contactOuverturePrenom)
  188. {
  189. $this->contactOuverturePrenom = $contactOuverturePrenom;
  190. return $this;
  191. }
  192. public function getContactOuvertureEmail()
  193. {
  194. return $this->contactOuvertureEmail;
  195. }
  196. public function setContactOuvertureEmail( $contactOuvertureEmail)
  197. {
  198. $this->contactOuvertureEmail = $contactOuvertureEmail;
  199. return $this;
  200. }
  201. public function __toString() {
  202. return $this->nom." - ".$this->id;
  203. }
  204. public function __construct() {
  205. $this->datefr = new \DateTime("now");
  206. $this->source = 'malys';
  207. $this->activite = true;
  208. $this->reversement = false;
  209. $this->raison = '';
  210. }
  211. /**
  212. * @ORM\PrePersist
  213. */
  214. public function prePersist() {
  215. if ($this->nom == null) {
  216. $this->nom = 'Nouveau fournisseur';
  217. }
  218. }
  219. /**
  220. * Get id
  221. *
  222. * @return integer
  223. */
  224. public function getId() {
  225. return $this->id;
  226. }
  227. /**
  228. * Set datefr
  229. *
  230. * @param \DateTime $datefr
  231. * @return Fournisseur
  232. */
  233. public function setDatefr($datefr) {
  234. $this->datefr = $datefr;
  235. return $this;
  236. }
  237. /**
  238. * Get datefr
  239. *
  240. * @return \DateTime
  241. */
  242. public function getDatefr() {
  243. return $this->datefr;
  244. }
  245. /**
  246. * Set user
  247. *
  248. * @param string $user
  249. * @return Fournisseur
  250. */
  251. public function setUser($user) {
  252. $this->user = $user;
  253. return $this;
  254. }
  255. /**
  256. * Get user
  257. *
  258. * @return string
  259. */
  260. public function getUser() {
  261. return $this->user;
  262. }
  263. /**
  264. * Set password
  265. *
  266. * @param string $password
  267. * @return Fournisseur
  268. */
  269. public function setPassword($password) {
  270. $this->password = $password;
  271. return $this;
  272. }
  273. /**
  274. * Get password
  275. *
  276. * @return string
  277. */
  278. public function getPassword() {
  279. return $this->password;
  280. }
  281. /**
  282. * Set source
  283. *
  284. * @param string $source
  285. * @return Fournisseur
  286. */
  287. public function setSource($source) {
  288. $this->source = $source;
  289. return $this;
  290. }
  291. /**
  292. * Get source
  293. *
  294. * @return string
  295. */
  296. public function getSource() {
  297. return $this->source;
  298. }
  299. /**
  300. * Set famille
  301. *
  302. * @param string $famille
  303. * @return Fournisseur
  304. */
  305. public function setFamille($famille) {
  306. $this->famille = $famille;
  307. return $this;
  308. }
  309. /**
  310. * Get famille
  311. *
  312. * @return string
  313. */
  314. public function getFamille() {
  315. return $this->famille;
  316. }
  317. /**
  318. * Set nom
  319. *
  320. * @param string $nom
  321. * @return Fournisseur
  322. */
  323. public function setNom($nom) {
  324. $this->nom = $nom;
  325. return $this;
  326. }
  327. /**
  328. * Get nom
  329. *
  330. * @return string
  331. */
  332. public function getNom() {
  333. return $this->nom;
  334. }
  335. /**
  336. * Set raison
  337. *
  338. * @param string $raison
  339. * @return Fournisseur
  340. */
  341. public function setRaison($raison) {
  342. $this->raison = $raison;
  343. return $this;
  344. }
  345. /**
  346. * Get raison
  347. *
  348. * @return string
  349. */
  350. public function getRaison() {
  351. return $this->raison;
  352. }
  353. /**
  354. * Set contact
  355. *
  356. * @param string $contact
  357. * @return Fournisseur
  358. */
  359. public function setContact($contact) {
  360. $this->contact = $contact;
  361. return $this;
  362. }
  363. /**
  364. * Get contact
  365. *
  366. * @return string
  367. */
  368. public function getContact() {
  369. return $this->contact;
  370. }
  371. /**
  372. * Set fonction
  373. *
  374. * @param string $fonction
  375. * @return Fournisseur
  376. */
  377. public function setFonction($fonction) {
  378. $this->fonction = $fonction;
  379. return $this;
  380. }
  381. /**
  382. * Get fonction
  383. *
  384. * @return string
  385. */
  386. public function getFonction() {
  387. return $this->fonction;
  388. }
  389. /**
  390. * Set comment
  391. *
  392. * @param string $comment
  393. * @return Fournisseur
  394. */
  395. public function setComment($comment) {
  396. $this->comment = $comment;
  397. return $this;
  398. }
  399. /**
  400. * Get comment
  401. *
  402. * @return string
  403. */
  404. public function getComment() {
  405. return $this->comment;
  406. }
  407. /**
  408. * Set adresse
  409. *
  410. * @param string $adresse
  411. * @return Fournisseur
  412. */
  413. public function setAdresse($adresse) {
  414. $this->adresse = $adresse;
  415. return $this;
  416. }
  417. /**
  418. * Get adresse
  419. *
  420. * @return string
  421. */
  422. public function getAdresse() {
  423. return $this->adresse;
  424. }
  425. /**
  426. * Set cp
  427. *
  428. * @param string $cp
  429. * @return Fournisseur
  430. */
  431. public function setCp($cp) {
  432. $this->cp = $cp;
  433. return $this;
  434. }
  435. /**
  436. * Get cp
  437. *
  438. * @return string
  439. */
  440. public function getCp() {
  441. return $this->cp;
  442. }
  443. /**
  444. * Set ville
  445. *
  446. * @param string $ville
  447. * @return Fournisseur
  448. */
  449. public function setVille($ville) {
  450. $this->ville = $ville;
  451. return $this;
  452. }
  453. /**
  454. * Get ville
  455. *
  456. * @return string
  457. */
  458. public function getVille() {
  459. return $this->ville;
  460. }
  461. /**
  462. * Set pays
  463. *
  464. * @param string $pays
  465. * @return Fournisseur
  466. */
  467. public function setPays($pays) {
  468. $this->pays = $pays;
  469. return $this;
  470. }
  471. /**
  472. * Get pays
  473. *
  474. * @return string
  475. */
  476. public function getPays() {
  477. return $this->pays;
  478. }
  479. /**
  480. * Set tel
  481. *
  482. * @param string $tel
  483. * @return Fournisseur
  484. */
  485. public function setTel($tel) {
  486. $this->tel = $tel;
  487. return $this;
  488. }
  489. /**
  490. * Get tel
  491. *
  492. * @return string
  493. */
  494. public function getTel() {
  495. return $this->tel;
  496. }
  497. /**
  498. * Set mobile
  499. *
  500. * @param string $mobile
  501. * @return Fournisseur
  502. */
  503. public function setMobile($mobile) {
  504. $this->mobile = $mobile;
  505. return $this;
  506. }
  507. /**
  508. * Get mobile
  509. *
  510. * @return string
  511. */
  512. public function getMobile() {
  513. return $this->mobile;
  514. }
  515. /**
  516. * Set fax
  517. *
  518. * @param string $fax
  519. * @return Fournisseur
  520. */
  521. public function setFax($fax) {
  522. $this->fax = $fax;
  523. return $this;
  524. }
  525. /**
  526. * Get fax
  527. *
  528. * @return string
  529. */
  530. public function getFax() {
  531. return $this->fax;
  532. }
  533. /**
  534. * Set email
  535. *
  536. * @param string $email
  537. * @return Fournisseur
  538. */
  539. public function setEmail($email) {
  540. $this->email = $email;
  541. return $this;
  542. }
  543. /**
  544. * Get email
  545. *
  546. * @return string
  547. */
  548. public function getEmail() {
  549. return $this->email;
  550. }
  551. /**
  552. * Set site
  553. *
  554. * @param string $site
  555. * @return Fournisseur
  556. */
  557. public function setSite($site) {
  558. $this->site = $site;
  559. return $this;
  560. }
  561. /**
  562. * Get site
  563. *
  564. * @return string
  565. */
  566. public function getSite() {
  567. return $this->site;
  568. }
  569. /**
  570. * Set reversement
  571. *
  572. * @param float $reversement
  573. * @return Fournisseur
  574. */
  575. public function setReversement($reversement) {
  576. $this->reversement = $reversement;
  577. return $this;
  578. }
  579. /**
  580. * Get reversement
  581. *
  582. * @return float
  583. */
  584. public function getReversement() {
  585. return $this->reversement;
  586. }
  587. /**
  588. * Set activite
  589. *
  590. * @param boolean $activite
  591. * @return Fournisseur
  592. */
  593. public function setActivite($activite) {
  594. $this->activite = $activite;
  595. return $this;
  596. }
  597. /**
  598. * Get activite
  599. *
  600. * @return boolean
  601. */
  602. public function getActivite() {
  603. return $this->activite;
  604. }
  605. /**
  606. * Get clientRelation
  607. *
  608. * @return \App\Entity\Clientrelation
  609. */
  610. public function getClientRelation() {
  611. return $this->clientRelation;
  612. }
  613. /**
  614. * @return mixed
  615. */
  616. public function getUpdatedAt()
  617. {
  618. return $this->updatedAt;
  619. }
  620. /**
  621. * @param mixed $updatedAt
  622. */
  623. public function setUpdatedAt($updatedAt): void
  624. {
  625. $this->updatedAt = $updatedAt;
  626. }
  627. }