<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class InstagramRepost extends Model
{
    protected $table = 'instagram_reposts';

    protected $fillable = [
        'reel_id',
        'reposted',
        'account_id',
    ];

    public function account()
    {
        return $this->belongsTo(InstagramAccount::class, 'account_id');
    }

    public function getUrl(): string
    {
        return "https://www.instagram.com/reel/{$this->reel_id}/";
    }
}
