<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class PemesananItem extends Model
{
    use HasFactory;
    protected $fillable = [
        'user_id',
        'service_id',
        'quantity',
        'desc',
        'subtotal',
        'order_id'
    ];

    public function pemesanan()
    {
        return $this->belongsTo(Pemesanan::class, 'pemesanan_id');
    }

    public function userprofile()
    {
        return $this->belongsTo(UserProfile::class, 'profile');
    }
}
