This commit is contained in:
Laucha1312
2026-06-04 15:15:23 -03:00
parent 0841794c50
commit 90c5f85512
167 changed files with 15870 additions and 0 deletions
+48
View File
@@ -0,0 +1,48 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class QrCode extends Model
{
protected $table = 'qr_codes';
protected $primaryKey = 'id_qr';
public $timestamps = false;
public $incrementing = false;
protected $fillable = [
'id_qr',
'id_evento',
'id_jugador',
'tipo_qr',
'escaneos_restantes',
'creado',
'id_aficionado',
];
protected $casts = [
'id_qr' => 'string',
'id_evento' => 'string',
'id_jugador' => 'string',
'tipo_qr' => 'string',
'escaneos_restantes' => 'integer',
'creado' => 'datetime',
'id_aficionado' => 'integer',
];
public function evento()
{
return $this->belongsTo(Evento::class, 'id_evento', 'id_evento');
}
public function jugador()
{
return $this->belongsTo(Jugador::class, 'id_jugador', 'id_jugador');
}
public function aficionado()
{
return $this->belongsTo(Aficionado::class, 'id_aficionado', 'id_aficionado');
}
}