<?php

namespace Hilco\Models;

use DB;

use Hilco\Models\SelectsRelatedCount;
use Illuminate\Database\Eloquent\Relations\HasOne;

class WebProductMenuConfigurationAlternate extends WebModel
{
    protected $table = 'WebProductMenuConfigurationAlternates';
    protected $fillable = ['webproductmenuconfiguration_id', 'targetCustomers', 'targetCustomersFormatted', 'visibleDates', 'visibleDatesFormatted'];


    public function alternateWebProductMenuConfiguration(){
        return $this->hasOne(WebProductMenuConfiguration::class, 'product_id', 'id')->where('product_type', 'webProductMenuConfigurationAlternate');
    }
}
