You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.1 KiB

7 years ago
7 years ago
7 years ago
  1. <?php
  2. namespace App\Http\Model;
  3. use DB;
  4. class OrderGoods extends BaseModel
  5. {
  6. //产品模型
  7. /**
  8. * 关联到模型的数据表
  9. *
  10. * @var string
  11. */
  12. protected $table = 'order_goods';
  13. /**
  14. * 表明模型是否应该被打上时间戳
  15. * 默认情况下,Eloquent 期望 created_at 和updated_at 已经存在于数据表中,如果你不想要这些 Laravel 自动管理的数据列,在模型类中设置 $timestamps 属性为 false
  16. *
  17. * @var bool
  18. */
  19. public $timestamps = false;
  20. //获取退货状态文字:0无退货,1退款中,2退款成功,3不同意退款
  21. public static function getRefundStatusText($where)
  22. {
  23. $res = '';
  24. if($where['refund_status'] == 0)
  25. {
  26. $res = '无退货';
  27. }
  28. elseif($where['refund_status'] == 1)
  29. {
  30. $res = '退款中';
  31. }
  32. elseif($where['refund_status'] == 2)
  33. {
  34. $res = '退款成功';
  35. }
  36. elseif($where['refund_status'] == 3)
  37. {
  38. $res = '不同意退款';
  39. }
  40. return $res;
  41. }
  42. }