Jobs.php 641 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: Administrator
  5. * Date: 2019/4/8
  6. * Time: 15:24
  7. */
  8. namespace App\Transfer;
  9. use Illuminate\Database\Eloquent\Model;
  10. class Jobs extends Model
  11. {
  12. protected $connection = "transfer_center";
  13. protected $table = "qs_jobs";
  14. protected $guarded = [];
  15. public function jobsContact()
  16. {
  17. return $this->hasOne(JobsContact::class, 'pid')->with('jobs');
  18. }
  19. public function promotions()
  20. {
  21. return $this->hasMany(Promotion::class, 'cp_jobid', 'id');
  22. }
  23. public function autoRefresh()
  24. {
  25. return $this->hasMany(QueueAutoRefresh::class, 'pid');
  26. }
  27. }