mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-14 02:24:31 +00:00
22 lines
389 B
PHP
22 lines
389 B
PHP
<?php
|
|
|
|
namespace App;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Activity extends Model
|
|
{
|
|
protected $dates = ['processed_at'];
|
|
protected $fillable = ['data', 'to_id', 'from_id', 'object_type'];
|
|
|
|
public function toProfile()
|
|
{
|
|
return $this->belongsTo(Profile::class, 'to_id');
|
|
}
|
|
|
|
public function fromProfile()
|
|
{
|
|
return $this->belongsTo(Profile::class, 'from_id');
|
|
}
|
|
}
|