ekart/backend/app/Models/Order.php
kusowl 0799965212 wip: stripe implementation
- add model, dto
2026-03-20 19:03:33 +05:30

34 lines
731 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasOne;
/**
* @mixin IdeHelperOrder
*/
class Order extends Model
{
public $fillable = [
'user_id', 'cart_id', 'status', 'shipping_city', 'shipping_street', 'shipping_last_name', 'shipping_first_name',
'shipping_state', 'shipping_pin',
];
public function user(): BelongsTo
{
return $this->belongsTo(User::class);
}
public function cart(): HasOne
{
return $this->hasOne(Cart::class);
}
public function stripeSession(): HasOne
{
return $this->hasOne(StripeSession::class);
}
}