<?php

namespace Modules\Mall\Models;

use App\Models\Model;
use App\Traits\HasCovers;
use GeneaLabs\LaravelModelCaching\Traits\Cachable;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Database\Eloquent\SoftDeletes;

class Express extends Model
{

    use Cachable,
        HasCovers,
        SoftDeletes;

    protected $table = 'mall_expresses';

    /**
     * Notes   : 使用该物流的公司
     * @Date   : 2021/5/6 5:23 下午
     * @Author : < Jason.C >
     * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
     */
    public function shops(): BelongsToMany
    {
        return $this->belongsToMany(Shop::class, 'mall_shop_express')
                    ->withTimestamps();
    }

}
