<?php

namespace App\Models;

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

class Service extends Model
{
    use HasFactory;

    protected $fillable = [
        'offer_id', 'name', 'price', 'period', 'discount', 'tax', 'totel'
    ];

    public function offer()
    {
        # code...
        return $this->belongsTo(Offer::class, 'offer_id', 'id');
    }
}
