Ad.php 363 B

123456789101112131415161718
  1. <?php
  2. namespace app\admin\model;
  3. use app\admin\model\Admin;
  4. use think\Model;
  5. /**
  6. */
  7. class Ad extends \app\common\model\Ad
  8. {
  9. public function admin(){
  10. return $this->belongsTo(Admin::class,'admin_id','id',[],'left');
  11. }
  12. public function uploadAdmin(){
  13. return $this->belongsTo(Admin::class,'upload_admin_id')->setEagerlyType(0);
  14. }
  15. }