<?php

namespace App\Models;

class PropertyProductMapping extends BaseModel
{
    /**
     * The database table used by the model.
     *
     * @var string
     */
    protected $table = 'property_product_mapping';
    protected $appends = ['parameterArray'];

    const CREATED_AT = 'created_at';
    const UPDATED_AT = 'updated_at';

    protected $dateFormat = 'U';
    protected $guarded = [];

    /**
     * The attributes excluded from the model's JSON form.
     *
     * @var array
     */
    protected $hidden = [];

    function getParameterArrayAttribute()
    {
        $attribute = [];
        if (!empty($this->parameter)) {
            $attribute = json_decode($this->parameter, 1);
        }
        return $attribute;
    }


}
