You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
420 B

  1. <?php
  2. namespace App;
  3. use Awobaz\Compoships\Database\Eloquent\Model;
  4. class Affiliation extends Model
  5. {
  6. public $primaryKey = ['server', 'node', 'jid'];
  7. public $incrementing = false;
  8. public function contact()
  9. {
  10. return $this->hasOne(Contact::class, 'id', 'jid');
  11. }
  12. public function getAffiliationtextAttribute(): string
  13. {
  14. return getAffiliations()[$this->affiliation];
  15. }
  16. }