Advertisement
Guest User

Untitled

a guest
Sep 24th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.37 KB | None | 0 0
  1. <?php
  2.  
  3. /*
  4. * This file is the main User Entity
  5. *
  6. * Works with FOSUserBundle
  7. */
  8.  
  9. namespace Handelsdeal\Bundle\UserBundle\Entity;
  10. use FOS\UserBundle\Entity\User as BaseUser;
  11. use Doctrine\ORM\Mapping as ORM;
  12. use Symfony\Component\Validator\Constraints as Assert;
  13.  
  14. /**
  15. * @ORM\Entity
  16. * @ORM\Table(name="fos_user")
  17. */
  18. class User extends BaseUser {
  19. /**
  20. * @ORM\Id
  21. * @ORM\Column(type="integer")
  22. * @ORM\generatedValue(strategy="AUTO")
  23. */
  24. protected $id;
  25.  
  26. public function __construct() {
  27. parent::__construct();
  28. }
  29.  
  30. /**
  31. * @ORM\Column(name="salutation", type="string", length="30")
  32. */
  33. protected $salutation;
  34.  
  35. /**
  36. * @ORM\Column(name="name_first", type="string", length="55")
  37. */
  38. protected $nameFirst;
  39.  
  40. /**
  41. * @ORM\Column(name="name_last", type="string", length="55")
  42. */
  43. protected $nameLast;
  44.  
  45. /**
  46. * @ORM\Column(name="vat_number", type="string", length="30")
  47. */
  48. protected $vatNumber;
  49.  
  50. /**
  51. * @ORM\Column(name="company_name", type="string", length="220")
  52. */
  53. protected $companyName;
  54.  
  55. /**
  56. * @ORM\Column(name="company_branch", type="string", length="120")
  57. */
  58. protected $companyBranch;
  59.  
  60. /**
  61. * @ORM\Column(name="company_number_of_employees", type="string", length="30")
  62. */
  63. protected $companyNumberOfEmployees;
  64.  
  65. /**
  66. * Get id
  67. *
  68. * @return integer
  69. */
  70. public function getId()
  71. {
  72. return $this->id;
  73. }
  74.  
  75. /**
  76. * Set salutation
  77. *
  78. * @param string $salutation
  79. */
  80. public function setSalutation($salutation)
  81. {
  82. $this->salutation = $salutation;
  83. }
  84.  
  85. /**
  86. * Get salutation
  87. *
  88. * @return string
  89. */
  90. public function getSalutation()
  91. {
  92. return $this->salutation;
  93. }
  94.  
  95. /**
  96. * Set nameFirst
  97. *
  98. * @param string $nameFirst
  99. */
  100. public function setNameFirst($nameFirst)
  101. {
  102. $this->nameFirst = $nameFirst;
  103. }
  104.  
  105. /**
  106. * Get nameFirst
  107. *
  108. * @return string
  109. */
  110. public function getNameFirst()
  111. {
  112. return $this->nameFirst;
  113. }
  114.  
  115. /**
  116. * Set nameLast
  117. *
  118. * @param string $nameLast
  119. */
  120. public function setNameLast($nameLast)
  121. {
  122. $this->nameLast = $nameLast;
  123. }
  124.  
  125. /**
  126. * Get nameLast
  127. *
  128. * @return string
  129. */
  130. public function getNameLast()
  131. {
  132. return $this->nameLast;
  133. }
  134.  
  135. /**
  136. * Set vatNumber
  137. *
  138. * @param string $vatNumber
  139. */
  140. public function setVatNumber($vatNumber)
  141. {
  142. $this->vatNumber = $vatNumber;
  143. }
  144.  
  145. /**
  146. * Get vatNumber
  147. *
  148. * @return string
  149. */
  150. public function getVatNumber()
  151. {
  152. return $this->vatNumber;
  153. }
  154.  
  155. /**
  156. * Set companyName
  157. *
  158. * @param string $companyName
  159. */
  160. public function setCompanyName($companyName)
  161. {
  162. $this->companyName = $companyName;
  163. }
  164.  
  165. /**
  166. * Get companyName
  167. *
  168. * @return string
  169. */
  170. public function getCompanyName()
  171. {
  172. return $this->companyName;
  173. }
  174.  
  175. /**
  176. * Set companyBranch
  177. *
  178. * @param string $companyBranch
  179. */
  180. public function setCompanyBranch($companyBranch)
  181. {
  182. $this->companyBranch = $companyBranch;
  183. }
  184.  
  185. /**
  186. * Get companyBranch
  187. *
  188. * @return string
  189. */
  190. public function getCompanyBranch()
  191. {
  192. return $this->companyBranch;
  193. }
  194.  
  195. /**
  196. * Set companyNumberOfEmployees
  197. *
  198. * @param string $companyNumberOfEmployees
  199. */
  200. public function setCompanyNumberOfEmployees($companyNumberOfEmployees)
  201. {
  202. $this->companyNumberOfEmployees = $companyNumberOfEmployees;
  203. }
  204.  
  205. /**
  206. * Get companyNumberOfEmployees
  207. *
  208. * @return string
  209. */
  210. public function getCompanyNumberOfEmployees()
  211. {
  212. return $this->companyNumberOfEmployees;
  213. }
  214. /**
  215. * @var string $username
  216. */
  217. private $username;
  218.  
  219. /**
  220. * @var string $usernameCanonical
  221. */
  222. private $usernameCanonical;
  223.  
  224. /**
  225. * @var string $email
  226. */
  227. private $email;
  228.  
  229. /**
  230. * @var string $emailCanonical
  231. */
  232. private $emailCanonical;
  233.  
  234. /**
  235. * @var boolean $enabled
  236. */
  237. private $enabled;
  238.  
  239. /**
  240. * @var string $algorithm
  241. */
  242. private $algorithm;
  243.  
  244. /**
  245. * @var string $salt
  246. */
  247. private $salt;
  248.  
  249. /**
  250. * @var string $password
  251. */
  252. private $password;
  253.  
  254. /**
  255. * @var datetime $createdAt
  256. */
  257. private $createdAt;
  258.  
  259. /**
  260. * @var datetime $updatedAt
  261. */
  262. private $updatedAt;
  263.  
  264. /**
  265. * @var datetime $lastLogin
  266. */
  267. private $lastLogin;
  268.  
  269. /**
  270. * @var boolean $locked
  271. */
  272. private $locked;
  273.  
  274. /**
  275. * @var boolean $expired
  276. */
  277. private $expired;
  278.  
  279. /**
  280. * @var datetime $expiresAt
  281. */
  282. private $expiresAt;
  283.  
  284. /**
  285. * @var string $confirmationToken
  286. */
  287. private $confirmationToken;
  288.  
  289. /**
  290. * @var datetime $passwordRequestedAt
  291. */
  292. private $passwordRequestedAt;
  293.  
  294. /**
  295. * @var array $roles
  296. */
  297. private $roles;
  298.  
  299. /**
  300. * @var boolean $credentialsExpired
  301. */
  302. private $credentialsExpired;
  303.  
  304. /**
  305. * @var datetime $credentialsExpireAt
  306. */
  307. private $credentialsExpireAt;
  308.  
  309.  
  310. /**
  311. * Set username
  312. *
  313. * @param string $username
  314. */
  315. public function setUsername($username)
  316. {
  317. $this->username = $username;
  318. }
  319.  
  320. /**
  321. * Get username
  322. *
  323. * @return string
  324. */
  325. public function getUsername()
  326. {
  327. return $this->username;
  328. }
  329.  
  330. /**
  331. * Set usernameCanonical
  332. *
  333. * @param string $usernameCanonical
  334. */
  335. public function setUsernameCanonical($usernameCanonical)
  336. {
  337. $this->usernameCanonical = $usernameCanonical;
  338. }
  339.  
  340. /**
  341. * Get usernameCanonical
  342. *
  343. * @return string
  344. */
  345. public function getUsernameCanonical()
  346. {
  347. return $this->usernameCanonical;
  348. }
  349.  
  350. /**
  351. * Set email
  352. *
  353. * @param string $email
  354. */
  355. public function setEmail($email)
  356. {
  357. $this->email = $email;
  358. }
  359.  
  360. /**
  361. * Get email
  362. *
  363. * @return string
  364. */
  365. public function getEmail()
  366. {
  367. return $this->email;
  368. }
  369.  
  370. /**
  371. * Set emailCanonical
  372. *
  373. * @param string $emailCanonical
  374. */
  375. public function setEmailCanonical($emailCanonical)
  376. {
  377. $this->emailCanonical = $emailCanonical;
  378. }
  379.  
  380. /**
  381. * Get emailCanonical
  382. *
  383. * @return string
  384. */
  385. public function getEmailCanonical()
  386. {
  387. return $this->emailCanonical;
  388. }
  389.  
  390. /**
  391. * Set enabled
  392. *
  393. * @param boolean $enabled
  394. */
  395. public function setEnabled($enabled)
  396. {
  397. $this->enabled = $enabled;
  398. }
  399.  
  400. /**
  401. * Get enabled
  402. *
  403. * @return boolean
  404. */
  405. public function getEnabled()
  406. {
  407. return $this->enabled;
  408. }
  409.  
  410. /**
  411. * Set algorithm
  412. *
  413. * @param string $algorithm
  414. */
  415. public function setAlgorithm($algorithm)
  416. {
  417. $this->algorithm = $algorithm;
  418. }
  419.  
  420. /**
  421. * Get algorithm
  422. *
  423. * @return string
  424. */
  425. public function getAlgorithm()
  426. {
  427. return $this->algorithm;
  428. }
  429.  
  430. /**
  431. * Set salt
  432. *
  433. * @param string $salt
  434. */
  435. public function setSalt($salt)
  436. {
  437. $this->salt = $salt;
  438. }
  439.  
  440. /**
  441. * Get salt
  442. *
  443. * @return string
  444. */
  445. public function getSalt()
  446. {
  447. return $this->salt;
  448. }
  449.  
  450. /**
  451. * Set password
  452. *
  453. * @param string $password
  454. */
  455. public function setPassword($password)
  456. {
  457. $this->password = $password;
  458. }
  459.  
  460. /**
  461. * Get password
  462. *
  463. * @return string
  464. */
  465. public function getPassword()
  466. {
  467. return $this->password;
  468. }
  469.  
  470. /**
  471. * Set createdAt
  472. *
  473. * @param datetime $createdAt
  474. */
  475. public function setCreatedAt($createdAt)
  476. {
  477. $this->createdAt = $createdAt;
  478. }
  479.  
  480. /**
  481. * Get createdAt
  482. *
  483. * @return datetime
  484. */
  485. public function getCreatedAt()
  486. {
  487. return $this->createdAt;
  488. }
  489.  
  490. /**
  491. * Set updatedAt
  492. *
  493. * @param datetime $updatedAt
  494. */
  495. public function setUpdatedAt($updatedAt)
  496. {
  497. $this->updatedAt = $updatedAt;
  498. }
  499.  
  500. /**
  501. * Get updatedAt
  502. *
  503. * @return datetime
  504. */
  505. public function getUpdatedAt()
  506. {
  507. return $this->updatedAt;
  508. }
  509.  
  510. /**
  511. * Set lastLogin
  512. *
  513. * @param datetime $lastLogin
  514. */
  515. public function setLastLogin($lastLogin)
  516. {
  517. $this->lastLogin = $lastLogin;
  518. }
  519.  
  520. /**
  521. * Get lastLogin
  522. *
  523. * @return datetime
  524. */
  525. public function getLastLogin()
  526. {
  527. return $this->lastLogin;
  528. }
  529.  
  530. /**
  531. * Set locked
  532. *
  533. * @param boolean $locked
  534. */
  535. public function setLocked($locked)
  536. {
  537. $this->locked = $locked;
  538. }
  539.  
  540. /**
  541. * Get locked
  542. *
  543. * @return boolean
  544. */
  545. public function getLocked()
  546. {
  547. return $this->locked;
  548. }
  549.  
  550. /**
  551. * Set expired
  552. *
  553. * @param boolean $expired
  554. */
  555. public function setExpired($expired)
  556. {
  557. $this->expired = $expired;
  558. }
  559.  
  560. /**
  561. * Get expired
  562. *
  563. * @return boolean
  564. */
  565. public function getExpired()
  566. {
  567. return $this->expired;
  568. }
  569.  
  570. /**
  571. * Set expiresAt
  572. *
  573. * @param datetime $expiresAt
  574. */
  575. public function setExpiresAt($expiresAt)
  576. {
  577. $this->expiresAt = $expiresAt;
  578. }
  579.  
  580. /**
  581. * Get expiresAt
  582. *
  583. * @return datetime
  584. */
  585. public function getExpiresAt()
  586. {
  587. return $this->expiresAt;
  588. }
  589.  
  590. /**
  591. * Set confirmationToken
  592. *
  593. * @param string $confirmationToken
  594. */
  595. public function setConfirmationToken($confirmationToken)
  596. {
  597. $this->confirmationToken = $confirmationToken;
  598. }
  599.  
  600. /**
  601. * Get confirmationToken
  602. *
  603. * @return string
  604. */
  605. public function getConfirmationToken()
  606. {
  607. return $this->confirmationToken;
  608. }
  609.  
  610. /**
  611. * Set passwordRequestedAt
  612. *
  613. * @param datetime $passwordRequestedAt
  614. */
  615. public function setPasswordRequestedAt($passwordRequestedAt)
  616. {
  617. $this->passwordRequestedAt = $passwordRequestedAt;
  618. }
  619.  
  620. /**
  621. * Get passwordRequestedAt
  622. *
  623. * @return datetime
  624. */
  625. public function getPasswordRequestedAt()
  626. {
  627. return $this->passwordRequestedAt;
  628. }
  629.  
  630. /**
  631. * Set roles
  632. *
  633. * @param array $roles
  634. */
  635. public function setRoles($roles)
  636. {
  637. $this->roles = $roles;
  638. }
  639.  
  640. /**
  641. * Get roles
  642. *
  643. * @return array
  644. */
  645. public function getRoles()
  646. {
  647. return $this->roles;
  648. }
  649.  
  650. /**
  651. * Set credentialsExpired
  652. *
  653. * @param boolean $credentialsExpired
  654. */
  655. public function setCredentialsExpired($credentialsExpired)
  656. {
  657. $this->credentialsExpired = $credentialsExpired;
  658. }
  659.  
  660. /**
  661. * Get credentialsExpired
  662. *
  663. * @return boolean
  664. */
  665. public function getCredentialsExpired()
  666. {
  667. return $this->credentialsExpired;
  668. }
  669.  
  670. /**
  671. * Set credentialsExpireAt
  672. *
  673. * @param datetime $credentialsExpireAt
  674. */
  675. public function setCredentialsExpireAt($credentialsExpireAt)
  676. {
  677. $this->credentialsExpireAt = $credentialsExpireAt;
  678. }
  679.  
  680. /**
  681. * Get credentialsExpireAt
  682. *
  683. * @return datetime
  684. */
  685. public function getCredentialsExpireAt()
  686. {
  687. return $this->credentialsExpireAt;
  688. }
  689. /**
  690. * @ORM\prePersist
  691. */
  692. public function incrementCreatedAt()
  693. {
  694. // Add your code here
  695. }
  696.  
  697. /**
  698. * @ORM\preUpdate
  699. */
  700. public function incrementUpdatedAt()
  701. {
  702. // Add your code here
  703. }
  704. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement