35 lines
611 B
PHP

<?php namespace App\Models;
/**
* @copyright (c) 2025 Notsoweb Software (https://notsoweb.com) - All Rights Reserved
*/
use Illuminate\Database\Eloquent\Model;
/**
* Descripción
*
* @author Moisés Cortés C. <moises.cortes@notsoweb.com>
*
* @version 1.0.0
*/
class Sale extends Model
{
protected $fillable = [
'client_id',
'total_amount',
'payment_method',
'sale_date',
];
public function client()
{
return $this->belongsTo(Client::class);
}
public function saleItems()
{
return $this->hasMany(SaleItem::class);
}
}