<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class SupportPolicy extends Model
{
    use HasFactory;

    protected $fillable = [
        'product_id',
        'enabled',
        'support_duration',
        'support_duration_unit',
        'support_description',
        'discount_type',
        'discount_value',
        // 'support_start_from',
        // 'enable_renewal_reminders',
        // 'reminder_days_before_expiry',
    ];

    protected $casts = [
        'enabled' => 'boolean',
        'support_duration' => 'integer',
        'discount_value' => 'decimal:2',
        // 'enable_renewal_reminders' => 'boolean',
    ];

    public function product()
    {
        return $this->belongsTo(Product::class);
    }
}
