<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class SubscriptionRenewal extends Model
{
    protected $fillable = [
        'service_subscription_id',
        'invoice_number',
        'renewal_date',
        'amount',
        'payment_method',
        'note',
        'created_by',
    ];

    public function serviceSubscription()
    {
        return $this->belongsTo(ServiceSubscription::class);
    }

    public function creator()
    {
        return $this->belongsTo(User::class, 'created_by');
    }
}
