mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 06:21:27 +00:00
Update models
This commit is contained in:
parent
796e374040
commit
7e333059fb
11 changed files with 20 additions and 1 deletions
|
@ -17,7 +17,7 @@ class Like extends Model
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $dates = ['deleted_at'];
|
protected $dates = ['deleted_at'];
|
||||||
protected $fillable = ['profile_id', 'status_id'];
|
protected $fillable = ['profile_id', 'status_id', 'status_profile_id'];
|
||||||
|
|
||||||
public function actor()
|
public function actor()
|
||||||
{
|
{
|
||||||
|
|
|
@ -19,6 +19,8 @@ class Media extends Model
|
||||||
*/
|
*/
|
||||||
protected $dates = ['deleted_at'];
|
protected $dates = ['deleted_at'];
|
||||||
|
|
||||||
|
protected $guarded = [];
|
||||||
|
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
'srcset' => 'array'
|
'srcset' => 'array'
|
||||||
];
|
];
|
||||||
|
|
|
@ -6,6 +6,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
class MediaTag extends Model
|
class MediaTag extends Model
|
||||||
{
|
{
|
||||||
|
protected $guarded = [];
|
||||||
|
|
||||||
public function status()
|
public function status()
|
||||||
{
|
{
|
||||||
return $this->belongsTo(Status::class);
|
return $this->belongsTo(Status::class);
|
||||||
|
|
|
@ -16,6 +16,8 @@ class Mention extends Model
|
||||||
*/
|
*/
|
||||||
protected $dates = ['deleted_at'];
|
protected $dates = ['deleted_at'];
|
||||||
|
|
||||||
|
protected $guarded = [];
|
||||||
|
|
||||||
public function profile()
|
public function profile()
|
||||||
{
|
{
|
||||||
return $this->belongsTo(Profile::class, 'profile_id', 'id');
|
return $this->belongsTo(Profile::class, 'profile_id', 'id');
|
||||||
|
|
|
@ -8,4 +8,6 @@ use Illuminate\Database\Eloquent\Model;
|
||||||
class Conversation extends Model
|
class Conversation extends Model
|
||||||
{
|
{
|
||||||
use HasFactory;
|
use HasFactory;
|
||||||
|
|
||||||
|
protected $fillable = ['from_id', 'to_id'];
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,7 @@ class Portfolio extends Model
|
||||||
use HasFactory;
|
use HasFactory;
|
||||||
|
|
||||||
public $fillable = [
|
public $fillable = [
|
||||||
|
'profile_id',
|
||||||
'active',
|
'active',
|
||||||
'show_captions',
|
'show_captions',
|
||||||
'show_license',
|
'show_license',
|
||||||
|
|
|
@ -8,4 +8,6 @@ use Illuminate\Database\Eloquent\Model;
|
||||||
class UserPronoun extends Model
|
class UserPronoun extends Model
|
||||||
{
|
{
|
||||||
use HasFactory;
|
use HasFactory;
|
||||||
|
|
||||||
|
protected $guarded = [];
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,8 @@ class Report extends Model
|
||||||
{
|
{
|
||||||
protected $dates = ['admin_seen'];
|
protected $dates = ['admin_seen'];
|
||||||
|
|
||||||
|
protected $guarded = [];
|
||||||
|
|
||||||
public function url()
|
public function url()
|
||||||
{
|
{
|
||||||
return url('/i/admin/reports/show/'.$this->id);
|
return url('/i/admin/reports/show/'.$this->id);
|
||||||
|
|
|
@ -6,6 +6,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
class ReportComment extends Model
|
class ReportComment extends Model
|
||||||
{
|
{
|
||||||
|
protected $guarded = [];
|
||||||
|
|
||||||
public function profile()
|
public function profile()
|
||||||
{
|
{
|
||||||
return $this->belongsTo(Profile::class);
|
return $this->belongsTo(Profile::class);
|
||||||
|
|
|
@ -6,6 +6,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
class ReportLog extends Model
|
class ReportLog extends Model
|
||||||
{
|
{
|
||||||
|
protected $guarded = [];
|
||||||
|
|
||||||
public function profile()
|
public function profile()
|
||||||
{
|
{
|
||||||
return $this->belongsTo(Profile::class);
|
return $this->belongsTo(Profile::class);
|
||||||
|
|
|
@ -8,4 +8,6 @@ use Illuminate\Database\Eloquent\Model;
|
||||||
class StatusArchived extends Model
|
class StatusArchived extends Model
|
||||||
{
|
{
|
||||||
use HasFactory;
|
use HasFactory;
|
||||||
|
|
||||||
|
protected $guarded = [];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue