Lock.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\MessageQueue\Model;
  7. /**
  8. * Class Lock to handle message lock transactions.
  9. */
  10. class Lock extends \Magento\Framework\Model\AbstractModel
  11. {
  12. /**
  13. * Class constructor
  14. *
  15. * @return void
  16. */
  17. protected function _construct()
  18. {
  19. $this->_init(\Magento\MessageQueue\Model\ResourceModel\Lock::class);
  20. }
  21. /**
  22. * Get message code
  23. *
  24. * @return string
  25. */
  26. public function getMessageCode()
  27. {
  28. return $this->_getData('message_code');
  29. }
  30. /**
  31. * Set message code
  32. *
  33. * @param string $value
  34. * @return $this
  35. */
  36. public function setMessageCode($value)
  37. {
  38. return $this->setData('message_code', $value);
  39. }
  40. /**
  41. * Get lock date
  42. *
  43. * @return string
  44. */
  45. public function getCreatedAt()
  46. {
  47. return $this->_getData('created_at');
  48. }
  49. /**
  50. * Set lock date
  51. *
  52. * @param string $value
  53. * @return $this
  54. */
  55. public function setCreatedAt($value)
  56. {
  57. return $this->setData('created_at', $value);
  58. }
  59. }