<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

/**
 * @property int $attribute_id
 * @property int $attribute_group_id
 * @property int $position
 * @property AttributeGroup $attributeGroup
 * @property Attribute $attribute
 */
class AttributeGroupMapping extends Model
{
    /**
     * @var array
     */
    protected $fillable = ['position'];

    /**
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function attributeGroup()
    {
        return $this->belongsTo('App\AttributeGroup');
    }

    /**
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function attribute()
    {
        return $this->belongsTo('App\Attribute');
    }
}
