<?php

namespace App\Models;

use Dcat\Admin\Traits\HasDateTimeFormatter;

use Illuminate\Database\Eloquent\Model;

class DistAppearanceVariable extends Model
{
	use HasDateTimeFormatter;
    protected $table = 'dist_appearance_variable';

    protected $fillable = ['dist_id', 'appearance_id', 'variable_name','variable_value','variable_type','created_at','updated_at','template_ids'];

    /*
     * 关联到分销商表
     */
    public function distributor()
    {
        return $this->hasOne(DistAdminDistributor::class, 'id', 'dist_id');
    }

    /*
     * 关联到外观表
     */
    public function appearance()
    {
        return $this->hasOne(DistAppearance::class, 'id', 'appearance_id');
    }

}
