<?php

namespace App\Models;

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

class Apphistory extends Model
{
    use HasFactory;

    protected  $table = 'app_history';

    protected $fillable = [
        'purpose',
        'who_performed_action',
        'comments',
        'reports_from_branchmanger',
        'previous_ads_price',
        'current_ads_price',
        'ads_price',
        'bank_and_others',
        'product_on_sign'
    ];
    
    protected $casts = [
        'bank_and_others' => 'boolean',
        'product_on_sign' => 'boolean',
    ];

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