mirror of
https://github.com/Bigherollc/wticreatorstudio.git
synced 2026-07-31 14:16:57 -04:00
28 lines
633 B
PHP
28 lines
633 B
PHP
<?php
|
|
|
|
namespace Modules\Shipping\Entities;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use App\Models\User;
|
|
|
|
class ShippingMethod extends Model
|
|
{
|
|
use HasFactory;
|
|
protected $guarded = ['id'];
|
|
|
|
public function request_user()
|
|
{
|
|
return $this->belongsTo(User::class,'request_by_user','id')->withDefault();
|
|
}
|
|
|
|
public function methodUse(){
|
|
return $this->hasMany(ProductShipping::class,'shipping_method_id', 'id');
|
|
}
|
|
|
|
public function carrier()
|
|
{
|
|
return $this->belongsTo(Carrier::class,'carrier_id','id')->withDefault();
|
|
}
|
|
}
|