<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use App\Models\Subcategory;
use App\Models\Category;

class SizeChart extends Model
{

    //size_chart
    use SoftDeletes;
    protected $table      = 'size_chart';
    protected $primaryKey = 'size_chart_id';
    protected $fillable   = [
                                'size_name',
                                'size_chart_image',
                                'active_status',
                            ];
    protected $hidden     = [
                                'created_at',
                                'updated_at',
                                'deleted_at',
                            ];

    // public function subcategoryDetails() {
    //     return $this->hasMany(Subcategory::class, 'subcategory_id', 'subcategory_id');
    // }

    public function categoryDetails() {
        return $this->hasMany(Category::class, 'category_id', 'category_id');
    }
}
