ServersRelations.php 763 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. namespace ThurData\Servers\KerioEmail\Core\Models\Whmcs;
  3. use Illuminate\Database\Eloquent\model as EloquentModel;
  4. /**
  5. * Description of ServersRelations
  6. *
  7. * @autor ThurData <info@thrudata.ch>
  8. *
  9. * @property int $groupid
  10. * @property int $serverid
  11. */
  12. class ServersRelations extends EloquentModel
  13. {
  14. /**
  15. * Table name
  16. *
  17. * @var string
  18. */
  19. protected $table = 'tblservergroupsrel';
  20. /**
  21. * Indicates if the model should be timestamped.
  22. *
  23. * @var bool
  24. */
  25. public $timestamps = false;
  26. public function servers()
  27. {
  28. return $this->hasOne(Servers::class, 'id', 'serverid');
  29. }
  30. public function group()
  31. {
  32. return $this->hasOne(ServersGroups::class, 'id', 'serverid');
  33. }
  34. }