| 1 | <?php |
||
| 8 | class UserFriend 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 = 'messenger_friendships'; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Primary Key of the Table. |
||
| 26 | * |
||
| 27 | * @var string |
||
| 28 | */ |
||
| 29 | protected $primaryKey = 'id'; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * User Friend Data. |
||
| 33 | * |
||
| 34 | * @var User |
||
| 35 | */ |
||
| 36 | protected $friendData; |
||
| 37 | |||
| 38 | /** |
||
| 39 | * The attributes excluded from the model's JSON form. |
||
| 40 | * |
||
| 41 | * @var array |
||
| 42 | */ |
||
| 43 | protected $hidden = ['user_one_id', 'user_two_id', 'relation', 'friends_since']; |
||
| 44 | |||
| 45 | /** |
||
| 46 | * The Appender(s) of the Model. |
||
| 47 | * |
||
| 48 | * @var array |
||
| 49 | */ |
||
| 50 | protected $appends = ['figureString', 'motto', 'name', 'uniqueId']; |
||
| 51 | |||
| 52 | /** |
||
| 53 | * Get User Friend Figure String. |
||
| 54 | * |
||
| 55 | * @return string |
||
| 56 | */ |
||
| 57 | public function getFigureStringAttribute(): string |
||
| 61 | |||
| 62 | /** |
||
| 63 | * Get User Friend Data. |
||
| 64 | * |
||
| 65 | * @return User |
||
| 66 | */ |
||
| 67 | protected function getUserFriendData(): User |
||
| 71 | |||
| 72 | /** |
||
| 73 | * Get User Friend Motto. |
||
| 74 | * |
||
| 75 | * @return string |
||
| 76 | */ |
||
| 77 | public function getMottoAttribute(): string |
||
| 81 | |||
| 82 | /** |
||
| 83 | * Get User Friend Name. |
||
| 84 | * |
||
| 85 | * @return string |
||
| 86 | */ |
||
| 87 | public function getNameAttribute(): string |
||
| 91 | |||
| 92 | /** |
||
| 93 | * Get User Friend UniqueId. |
||
| 94 | * |
||
| 95 | * @return int |
||
| 96 | */ |
||
| 97 | public function getUniqueIdAttribute(): int |
||
| 101 | } |
||
| 102 |