OrderOutChild.php 497 B

12345678910111213141516171819202122
  1. <?php
  2. declare (strict_types = 1);
  3. namespace app\report\model;
  4. use think\Model;
  5. /**
  6. * @mixin \think\Model
  7. */
  8. class OrderOutChild extends Model
  9. {
  10. // protected $append=["expire"];
  11. // public function GetExpireAttr($v,$row){
  12. // return date_diff(new \DateTime($row['sendtime']??date("Y-m-d H:i:s")),new \DateTime($row['addtime']))->days+1;
  13. // }
  14. public function WsmInfo(){
  15. return $this->belongsTo(Ware::class,"wsm_code","wsm_code")->bind(["contactor","contactor_name"]);
  16. }
  17. }