<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class VanClosing extends Model
{
    protected $fillable = ['van_session_id', 'cash_sales', 'credit_sales', 'collections', 'expenses', 'expected_cash', 'actual_cash', 'cash_difference', 'stock_variances', 'notes', 'created_by'];
    protected $casts = ['cash_sales' => 'decimal:2', 'credit_sales' => 'decimal:2', 'collections' => 'decimal:2', 'expenses' => 'decimal:2', 'expected_cash' => 'decimal:2', 'actual_cash' => 'decimal:2', 'cash_difference' => 'decimal:2', 'stock_variances' => 'array'];
    public function session() { return $this->belongsTo(VanSession::class, 'van_session_id'); }
}
