42 lines
761 B
PHP
42 lines
761 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class MovimientoCaja extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
/**
|
|
* The attributes that are mass assignable.
|
|
*
|
|
* @var array
|
|
*/
|
|
protected $fillable = [
|
|
'caja_id',
|
|
'tipo',
|
|
'monto',
|
|
'descripcion',
|
|
|
|
];
|
|
|
|
/**
|
|
* The attributes that should be cast to native types.
|
|
*
|
|
* @var array
|
|
*/
|
|
protected $casts = [
|
|
'id' => 'integer',
|
|
'caja_id' => 'integer',
|
|
'monto' => 'decimal:2',
|
|
];
|
|
|
|
public function caja(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Caja::class);
|
|
}
|
|
}
|