Files
sirpremiumv2/app/Models/Usuario_tarifa.php
T
Juan Felipe Duarte 0e2a7e9a20 Copy tarifas and promos on user registration
When a new user registers with a referral code, their tarifas and promos are now copied from the referring user. Also refactored Usuario_promo and Usuario_tarifa models to use fillable attributes and improved method formatting. Added Swiper CSS/JS to app layout.
2025-10-16 14:46:17 -05:00

29 lines
527 B
PHP
Executable File

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Usuario_tarifa extends Model
{
use HasFactory;
protected $fillable = [
'usuario_id',
'tarifa_id',
'precio',
'utilidad',
'visible',
];
public function usuario()
{
return $this->belongsTo(User::class, 'usuario_id');
}
public function tarifa()
{
return $this->belongsTo(Tarifas::class, 'tarifa_id');
}
}