<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

class LiftProductVariant extends Model
{
    protected $casts = [
        'mrp_price' => 'decimal:2',
        'gst_percentage' => 'decimal:2',
        'gst_amount' => 'decimal:2',
        'net_amount' => 'decimal:2',
        'installation_cost' => 'decimal:2',
        'transport_cost' => 'decimal:2',
        'unloading_cost' => 'decimal:2',
        'load_kg' => 'decimal:2',
        'capacity_persons' => 'integer',
        'specifications' => 'array',
        'status' => 'boolean',
        'sort_order' => 'integer',
    ];

    public function product(): BelongsTo
    {
        return $this->belongsTo(LiftProduct::class, 'lift_product_id');
    }
}
