PersonFavorite.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. /**
  5. * App\Models\PersonFavorite
  6. *
  7. * @property int $id
  8. * @property int $uid 会员uid
  9. * @property int $job_id 职位ID
  10. * @property string $job_name 职位名称
  11. * @property \Illuminate\Support\Carbon|null $created_at
  12. * @property \Illuminate\Support\Carbon|null $updated_at
  13. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PersonFavorite newModelQuery()
  14. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PersonFavorite newQuery()
  15. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PersonFavorite query()
  16. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PersonFavorite whereCreatedAt($value)
  17. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PersonFavorite whereId($value)
  18. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PersonFavorite whereJobId($value)
  19. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PersonFavorite whereJobName($value)
  20. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PersonFavorite whereUid($value)
  21. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PersonFavorite whereUpdatedAt($value)
  22. * @mixin \Eloquent
  23. */
  24. class PersonFavorite extends Model
  25. {
  26. protected $table = 'person_favorite';
  27. protected $fillable = ['uid','job_id','job_name'];
  28. protected $guarded = [];
  29. public function jobs()
  30. {
  31. return $this->belongsTo(Jobs::class, 'job_id');
  32. }
  33. public function personalJobsApply()
  34. {
  35. return $this->hasMany(PersonalJobsApply::class,'jobs_id','job_id');
  36. }
  37. }