<?php

namespace Modules\Mall\Models;

use App\Models\Model;
use GeneaLabs\LaravelModelCaching\Traits\Cachable;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\SoftDeletes;
use Modules\Mall\Models\Traits\BelongsToShop;
use Overtrue\LaravelVersionable\Versionable;

class Brand extends Model
{

    use BelongsToShop,
        Cachable,
        Versionable,
        SoftDeletes;

    protected $table = 'mall_brands';

    /**
     * 不参与版本记录的字段
     * @var array|string[]
     */
    protected array $dontVersionable = ['updated_at'];

    /**
     * Notes   : 品牌下的商品
     * @Date   : 2021/5/25 12:05 下午
     * @Author : < Jason.C >
     * @return \Illuminate\Database\Eloquent\Relations\HasMany
     */
    public function goods(): HasMany
    {
        return $this->hasMany(Goods::class);
    }

}