<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class CustomerProductPrice extends Model
{
    protected $fillable = [
        'customer_id', 'product_id', 'special_price', 'vat_mode',
        'start_date', 'end_date', 'status',
    ];

    protected $casts = [
        'special_price' => 'decimal:2',
        'start_date'    => 'date',
        'end_date'      => 'date',
    ];

    public function customer()
    {
        return $this->belongsTo(Customer::class);
    }

    public function product()
    {
        return $this->belongsTo(Product::class);
    }
}
