WeekTaskHistory.php 521 B

12345678910111213141516171819202122232425
  1. <?php
  2. namespace App\Http\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. class WeekTaskHistory extends Model
  5. {
  6. protected $primaryKey = 'id';
  7. protected $table = 'week_task_history';
  8. protected $guarded = [];
  9. public function designer()
  10. {
  11. return $this->hasOne(User::class,'id','design_id');
  12. }
  13. public function dutyMan()
  14. {
  15. return $this->hasOne(User::class,'id','duty_id');
  16. }
  17. public function webMan(){
  18. return $this->hasOne(User::class,'id','web_id');
  19. }
  20. }