<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;

/**
 * @property mixed id
 */
class AttributeChoice extends Model
{
    //use soft delete
    public $timestamps = false;

    protected $fillable = [
        'image','count','choice_id','attribute_id'
    ];

    public function choice()
    {
        return $this->belongsTo(Choice::class)->withTrashed();
    }

    public function attribute()
    {
        return $this->hasOne(ChoiceAttribute::class,'attribute_choice_id');
    }
}
