mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-09 16:24:51 +00:00
43 lines
665 B
PHP
43 lines
665 B
PHP
<?php
|
|
|
|
namespace App;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class StatusHashtag extends Model
|
|
{
|
|
public $fillable = [
|
|
'status_id',
|
|
'hashtag_id',
|
|
'profile_id',
|
|
'status_visibility'
|
|
];
|
|
|
|
public function status()
|
|
{
|
|
return $this->belongsTo(Status::class);
|
|
}
|
|
|
|
public function hashtag()
|
|
{
|
|
return $this->belongsTo(Hashtag::class);
|
|
}
|
|
|
|
public function profile()
|
|
{
|
|
return $this->belongsTo(Profile::class);
|
|
}
|
|
|
|
public function media()
|
|
{
|
|
return $this->hasManyThrough(
|
|
Media::class,
|
|
Status::class,
|
|
'id',
|
|
'status_id',
|
|
'status_id',
|
|
'id'
|
|
);
|
|
}
|
|
}
|