ActionItem.php 621 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. namespace App\Models;
  3. # use Illuminate\Database\Eloquent\Model;
  4. class ActionItem extends Model
  5. {
  6. protected $table = 'action_item';
  7. public function facility()
  8. {
  9. return $this->belongsTo(Facility::class, 'to_facility_id', 'id');
  10. }
  11. public function client()
  12. {
  13. return $this->belongsTo(Client::class, 'client_id', 'id');
  14. }
  15. public function pro()
  16. {
  17. return $this->belongsTo(Pro::class, 'ally_pro_id', 'id');
  18. }
  19. public function actionItemContentUpdates()
  20. {
  21. return $this->hasMany(ActionItemContentUpdate::class, 'action_item_id');
  22. }
  23. }