<?php

namespace Modules\Mall\Models;

use App\Models\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\SoftDeletes;

class DeliveryRule extends Model
{

    use SoftDeletes;

    protected $table = 'mall_delivery_rules';

    protected $casts = [
        'regions' => 'json',
    ];

    /**
     * Notes   : 隶属的模板
     * @Date   : 2021/3/15 1:12 下午
     * @Author : < Jason.C >
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function delivery(): BelongsTo
    {
        return $this->belongsTo(Delivery::class);
    }

}