Juan Felipe Zapata Moreno db49b127db ADD: Corte de caja creado
2025-11-05 16:24:22 -06:00

44 lines
849 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 Client extends Model
{
protected $fillable = [
'name',
'paternal',
'maternal',
'email',
'phone',
'rfc',
];
public function sales()
{
return $this->hasMany(Sale::class);
}
public function clientSims()
{
return $this->hasMany(ClientSim::class);
}
public function simCards()
{
return $this->belongsToMany(SimCard::class, 'client_sims')
->withPivot('assigned_at', 'released_at', 'is_active')
->withTimestamps();
}
}