vista tarifas
This commit is contained in:
+24
-18
@@ -8,6 +8,7 @@ use Illuminate\Database\Eloquent\Model;
|
||||
class Tarifas extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'pantallas',
|
||||
'dias',
|
||||
@@ -15,37 +16,42 @@ class Tarifas extends Model
|
||||
'utilidad',
|
||||
'estado',
|
||||
'servicio_id',
|
||||
'rol_id'
|
||||
|
||||
'rol_id',
|
||||
'subvendedor_id',
|
||||
];
|
||||
|
||||
public function servicio(){
|
||||
return $this ->belongsTo(Servicio::class);
|
||||
public function servicio()
|
||||
{
|
||||
return $this->belongsTo(Servicio::class);
|
||||
}
|
||||
|
||||
public function preferenciales(){
|
||||
return $this ->hasMany(Preferencial::class,'tarifa_id');
|
||||
public function preferenciales()
|
||||
{
|
||||
return $this->hasMany(Preferencial::class, 'tarifa_id');
|
||||
}
|
||||
|
||||
public function cuentas(){
|
||||
return $this ->hasMany(Cuentas::class,'tarifa_id');
|
||||
public function cuentas()
|
||||
{
|
||||
return $this->hasMany(Cuentas::class, 'tarifa_id');
|
||||
}
|
||||
|
||||
public function historiales(){
|
||||
return $this ->hasMany(Historiale::class,'tarifa_id');
|
||||
public function historiales()
|
||||
{
|
||||
return $this->hasMany(Historiale::class, 'tarifa_id');
|
||||
}
|
||||
|
||||
public function promociones(){
|
||||
return $this ->belongsToMany(Promociones::class,'promocion_tarifas','tarifa_id','promocion_id');
|
||||
public function promociones()
|
||||
{
|
||||
return $this->belongsToMany(Promociones::class, 'promocion_tarifas', 'tarifa_id', 'promocion_id');
|
||||
}
|
||||
|
||||
public function rol(){
|
||||
return $this ->belongsTo(Role::class);
|
||||
public function rol()
|
||||
{
|
||||
return $this->belongsTo(Role::class);
|
||||
}
|
||||
|
||||
public function usuario_tarifas(){
|
||||
return $this ->hasMany(Usuario_tarifa::class,'tarifa_id');
|
||||
public function usuario_tarifas()
|
||||
{
|
||||
return $this->hasMany(Usuario_tarifa::class, 'tarifa_id');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user