lan_kiosk/app/Models/Customer.php
2025-05-05 19:10:40 +02:00

40 lines
720 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use App\Models\Puchase;
use App\Models\Deposit;
class Customer extends Model
{
/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
'name',
'guardian_name',
'amount left',
'amount used',
'deposit',
'give_leftover',
];
/**
* Get the purchases for the customer.
*/
public function purchases()
{
return $this->hasMany(Purchase::class);
}
/**
* Get the deposit for the customer.
*/
public function deposits()
{
return $this->hasMany(Deposit::class);
}
}