orderModel.php 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. <?php
  2. /**
  3. * http://newopen.imdada.cn/#/development/file/add?_k=5f4vjj
  4. *
  5. */
  6. class OrderModel
  7. {
  8. public $shop_no;
  9. public $origin_id;
  10. public $city_code;
  11. public $cargo_price;
  12. public $is_prepay;
  13. public $receiver_name;
  14. public $receiver_address;
  15. public $receiver_lat;
  16. public $receiver_lng;
  17. public $receiver_phone;
  18. public $callback;
  19. public function setShopNo($shopNo)
  20. {
  21. !empty($shopNo) ? $this->shop_no = $shopNo : trigger_error('shop_no不能为空', E_USER_ERROR);
  22. }
  23. public function getShopNo()
  24. {
  25. return $this->shop_no;
  26. }
  27. public function setOriginId($originId)
  28. {
  29. !empty($originId) ? $this->origin_id = $originId : trigger_error('origin_id不能为空', E_USER_ERROR);
  30. }
  31. public function getOriginId()
  32. {
  33. return $this->origin_id;
  34. }
  35. public function setCityCode($cityCode)
  36. {
  37. !empty($cityCode) ? $this->city_code = $cityCode : trigger_error('city_code不能为空', E_USER_ERROR);
  38. }
  39. public function getCityCode()
  40. {
  41. return $this->city_code;
  42. }
  43. public function setCargoPrice($cargoPrice)
  44. {
  45. isset($cargoPrice) ? $this->cargo_price = $cargoPrice : trigger_error('cargo_price不能为空', E_USER_ERROR);
  46. }
  47. public function getCargoPrice()
  48. {
  49. return $this->cargo_price;
  50. }
  51. public function setIsPrepay($isPrepay)
  52. {
  53. isset($isPrepay) ? $this->is_prepay = $isPrepay : trigger_error('is_prepay不能为空', E_USER_ERROR);
  54. }
  55. public function getIsPrepay()
  56. {
  57. return $this->is_prepay;
  58. }
  59. public function setReceiverName($receiverName)
  60. {
  61. !empty($receiverName) ? $this->receiver_name = $receiverName : trigger_error('receiver_name不能为空', E_USER_ERROR);
  62. }
  63. public function getReceiverName()
  64. {
  65. return $this->receiver_name;
  66. }
  67. public function setReceiverAddress($receiverAddress)
  68. {
  69. !empty($receiverAddress) ? $this->receiver_address = $receiverAddress : trigger_error('receiver_address不能为空', E_USER_ERROR);
  70. }
  71. public function getReceiverAddress()
  72. {
  73. return $this->receiver_address;
  74. }
  75. public function setReceiverLat($receiverLat)
  76. {
  77. isset($receiverLat) ? $this->receiver_lat = $receiverLat : trigger_error('receiver_lat不能为空', E_USER_ERROR);
  78. }
  79. public function getReceiverLat()
  80. {
  81. return $this->receiver_lat;
  82. }
  83. public function setReceiverLng($receiverLng)
  84. {
  85. isset($receiverLng) ? $this->receiver_lng = $receiverLng : trigger_error('receiver_lng不能为空', E_USER_ERROR);
  86. }
  87. public function getReceiverLng()
  88. {
  89. return $this->receiver_lng;
  90. }
  91. public function setReceiverPhone($receiverPhone)
  92. {
  93. !empty($receiverPhone) ? $this->receiver_phone = $receiverPhone : trigger_error('receiver_phone不能为空', E_USER_ERROR);
  94. }
  95. public function getReceiverPhone()
  96. {
  97. return $this->receiver_phone;
  98. }
  99. public function setCallback($callback)
  100. {
  101. !empty($callback) ? $this->callback = $callback : trigger_error('callback不能为空', E_USER_ERROR);
  102. }
  103. //设置订单号
  104. public function setOrderId($id)
  105. {
  106. !empty($id) ? $this->order_id = $id : trigger_error('id不能为空', E_USER_ERROR);
  107. }
  108. public function getCallback()
  109. {
  110. return $this->callback;
  111. }
  112. }