| 1 | <?php |
||
| 8 | class GroupMember extends ChocolateyModel |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * Disable Timestamps. |
||
| 12 | * |
||
| 13 | * @var bool |
||
| 14 | */ |
||
| 15 | public $timestamps = false; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * The table associated with the model. |
||
| 19 | * |
||
| 20 | * @var string |
||
| 21 | */ |
||
| 22 | protected $table = 'guilds_members'; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Primary Key of the Table. |
||
| 26 | * |
||
| 27 | * @var string |
||
| 28 | */ |
||
| 29 | protected $primaryKey = 'id'; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * The attributes excluded from the model's JSON form. |
||
| 33 | * |
||
| 34 | * @var array |
||
| 35 | */ |
||
| 36 | protected $hidden = ['id', 'member_since', 'guild_id', 'level_id', 'user_id']; |
||
| 37 | |||
| 38 | /** |
||
| 39 | * The Appender(s) of the Model. |
||
| 40 | * |
||
| 41 | * @var array |
||
| 42 | */ |
||
| 43 | protected $appends = ['guild']; |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Get User Group by Member Group Id. |
||
| 47 | * |
||
| 48 | * @return UserGroup |
||
| 49 | */ |
||
| 50 | public function getGuildAttribute(): UserGroup |
||
| 54 | |||
| 55 | /** |
||
| 56 | * Get Description Attribute. |
||
| 57 | * |
||
| 58 | * @TODO: Get Real Badge Description |
||
| 59 | * |
||
| 60 | * @return string |
||
| 61 | */ |
||
| 62 | public function getDescriptionAttribute(): string |
||
| 66 | } |
||
| 67 |