<?php

namespace App\Models;

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

class CorporateIncomeTax extends Model
{
    use HasFactory;

    protected $table = 'corporate_income_taxes';

    protected $fillable = ['*'];

    protected $casts = [
        'date' => 'date:Y-m-d',
    ];

    public function creditCashTransactions()
    {
        return $this->hasMany(CreditCashTransaction::class, 'corporateincome_id');
    }

    public function taxFiscalCorrections()
    {
        return $this->hasMany(TaxFiscalCorrection::class, 'corporateincome_id');
    }
}
