order.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <?php
  2. namespace MGModule\DNSManager2\models\whmcs\orders;
  3. use MGModule\DNSManager2 as main;
  4. /**
  5. * Description of order
  6. *
  7. * @Table(name=tblorders,preventUpdate,prefixed=false)
  8. * @author Michal Czech <michael@modulesgarden.com>
  9. */
  10. class order extends main\mgLibs\models\orm{
  11. /**
  12. *
  13. * @Column(int)
  14. * @var int
  15. */
  16. public $id;
  17. /**
  18. *
  19. * @Column()
  20. * @var string
  21. */
  22. public $ordernum;
  23. /**
  24. *
  25. * @Column()
  26. * @var string
  27. */
  28. public $userid;
  29. /**
  30. *
  31. * @Column()
  32. * @var string
  33. */
  34. public $date;
  35. /**
  36. *
  37. * @Column()
  38. * @var string
  39. */
  40. public $invoiceid;
  41. /**
  42. *
  43. * @Column()
  44. * @var string
  45. */
  46. public $status;
  47. /**
  48. *
  49. * @Column()
  50. * @var string
  51. */
  52. public $ipaddress;
  53. /**
  54. *
  55. * @var main\models\whmcs\clients\client
  56. */
  57. private $_client;
  58. /**
  59. *
  60. * @return main\models\whmcs\clients\client
  61. */
  62. public function client(){
  63. if(empty($this->_client))
  64. {
  65. $this->_client = new main\models\whmcs\clients\client($this->userid);
  66. }
  67. return $this->_client;
  68. }
  69. function getOrderUrl(){
  70. return 'orders.php?action=view&id='.$this->id;
  71. }
  72. }