80 rindas
1.5KB

  1. <?php
  2. namespace Lc\ShopBundle\Model;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5. * @ORM\MappedSuperclass()
  6. */
  7. abstract class Visitor
  8. {
  9. /**
  10. * @ORM\Column(type="string", length=255)
  11. */
  12. protected $cookie;
  13. /**
  14. * @ORM\Column(type="datetime")
  15. */
  16. protected $lastAccess;
  17. /**
  18. * @ORM\Column(type="string", length=255)
  19. */
  20. protected $ip;
  21. /**
  22. * @ORM\Column(type="integer")
  23. */
  24. protected $totalVisit;
  25. public function getCookie(): ?string
  26. {
  27. return $this->cookie;
  28. }
  29. public function setCookie(?string $cookie): self
  30. {
  31. $this->cookie = $cookie;
  32. return $this;
  33. }
  34. public function getLastAccess(): ?\DateTimeInterface
  35. {
  36. return $this->lastAccess;
  37. }
  38. public function setLastAccess(\DateTimeInterface $lastAccess): self
  39. {
  40. $this->lastAccess = $lastAccess;
  41. return $this;
  42. }
  43. public function getIp(): ?string
  44. {
  45. return $this->ip;
  46. }
  47. public function setIp(?string $ip): self
  48. {
  49. $this->ip = $ip;
  50. return $this;
  51. }
  52. public function getTotalVisit(): ?int
  53. {
  54. return $this->totalVisit;
  55. }
  56. public function setTotalVisit(int $totalVisit): self
  57. {
  58. $this->totalVisit = $totalVisit;
  59. return $this;
  60. }
  61. }