mirror of https://github.com/movim/movim
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
21 lines
420 B
<?php
|
|
|
|
namespace App;
|
|
|
|
use Awobaz\Compoships\Database\Eloquent\Model;
|
|
|
|
class Affiliation extends Model
|
|
{
|
|
public $primaryKey = ['server', 'node', 'jid'];
|
|
public $incrementing = false;
|
|
|
|
public function contact()
|
|
{
|
|
return $this->hasOne(Contact::class, 'id', 'jid');
|
|
}
|
|
|
|
public function getAffiliationtextAttribute(): string
|
|
{
|
|
return getAffiliations()[$this->affiliation];
|
|
}
|
|
}
|