<?php

namespace App\Models\Backend\System;

use Illuminate\Database\Eloquent\Model;

class Setting extends Model
{
    protected $table = 'oc_setting';
    protected $primaryKey = 'setting_id';
    public $timestamps = false;

    protected $fillable = [
        'store_id',
        'code',
        'key',
        'value',
        'serialized'
    ];

    protected $casts = [
        'store_id' => 'integer',
        'serialized' => 'boolean'
    ];

    public function store()
    {
        return $this->belongsTo(Store::class, 'store_id', 'store_id');
    }
}
