Initial commit

This commit is contained in:
lizandrogd
2023-07-26 08:28:13 -05:00
commit 8ce210f27c
1207 changed files with 36066 additions and 0 deletions
+50
View File
@@ -0,0 +1,50 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Historiale extends Model
{
use HasFactory;
protected $fillable = [
'fecha_inicio',
'fecha_final',
'valor',
'tipo_pago',
'estado',
'vendedor_id',
'tarifa_id',
'promocion_id',
'cliente_id',
'nombre_cliente'
];
public function vendedor(){
return $this ->belongsTo(User::class);
}
public function tarifa(){
return $this ->belongsTo(Tarifas::class);
}
public function promocion(){
return $this ->belongsTo(Promociones::class);
}
public function cliente(){
return $this ->belongsTo(User::class);
}
public function cuentas(){
return $this ->belongsToMany(Cuentas::class,'historial_cuentas','historial_id','cuenta_id');
}
public function cuentas_obsoletas(){
return $this ->belongsToMany(Cuentas::class,'logs','historial_id','cuenta_id');
}
}