| Total Complexity | 3 |
| Total Lines | 21 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | class InteractionModel extends Model |
||
| 12 | { |
||
| 13 | protected $table = 'interactions'; |
||
| 14 | |||
| 15 | protected $fillable = ['follow', 'applause', 'done', 'page_id', 'value']; |
||
| 16 | |||
| 17 | protected $casts = ['value' => 'array', 'start_done_at' => 'datetime']; |
||
| 18 | |||
| 19 | public function page() |
||
| 20 | { |
||
| 21 | return $this->belongsTo(PageModel::class, 'page_id', 'page_id'); |
||
| 22 | } |
||
| 23 | |||
| 24 | public function user() |
||
| 25 | { |
||
| 26 | return $this->belongsTo(User::class, 'user_id', 'id'); |
||
| 27 | } |
||
| 28 | |||
| 29 | public function toDto():InteractionDto |
||
| 32 | } |
||
| 33 | } |
||
| 34 |