UserOrderLog.php 970 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace app\common\model;
  3. use think\Model;
  4. class UserOrderLog extends Model
  5. {
  6. public static $status=[
  7. UserOrder::STATUS_WAIT_GETTING=>'已接单正在取宠',
  8. UserOrder::STATUS_SENDING=>'已取宠正在运输',
  9. UserOrder::STATUS_GIVING=>'宠物已启程,请关注收宠',
  10. UserOrder::STATUS_COMPLETE=>'订单已完成',
  11. 0=>'状态更新',
  12. ];
  13. public static $txt=[
  14. UserOrder::STATUS_WAIT_GETTING=>'请您保持电话畅通方便与您联系',
  15. UserOrder::STATUS_SENDING=>'正在快马加鞭运输中请您耐心等待',
  16. UserOrder::STATUS_GIVING=>'感谢您的支持正在努力送宠中',
  17. UserOrder::STATUS_COMPLETE=>'订单已完成服务永不止哦~~~',
  18. 0=>'',
  19. ];
  20. public function orders(){
  21. return $this->belongsTo(UserOrder::class,'order_id');
  22. }
  23. public function getStatusAttr($v,$data){
  24. return self::$status[$data['status']];
  25. }
  26. }