<?php

namespace Modules\Mall\Models;

use App\Models\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Modules\Mall\Models\Traits\BelongsToShop;
use Modules\User\Traits\BelongsToUser;

class Cart extends Model
{

    use BelongsToShop,
        BelongsToUser;

    protected $table = 'mall_carts';

    /**
     * Notes   : 购物车商品
     * @Date   : 2021/5/13 2:25 下午
     * @Author : < Jason.C >
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function sku(): BelongsTo
    {
        return $this->belongsTo(GoodsSku::class, 'sku_id');
    }

}