<?php

namespace Modules\Chip\Models;


use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasOne;
use Illuminate\Database\Eloquent\SoftDeletes;

class Chip extends Model
{
    //use soft delete
    use SoftDeletes;

    protected $fillable = [
        'cost',
        'count',
        'image',
    ];

    /**
     * Get current description of the the Chip
     * @return HasOne
     */
    public function currentDescription(): HasOne
    {
        return $this->hasOne(ChipDescription::class)->where('language_id', currentLanguage()->id);
    }


}
