<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Promocion extends Model
{
    protected $table = 'promociones';
    protected $primaryKey = 'id';
    public $timestamps = false;

    protected $fillable = [
        'nombre',
        'direccion',
        'lat',
        'lng',
        'contacto',
        'descripcion',
        'descripcion_lugar',
        'categoria',
        'imagen',
    ];

    protected $casts = [
        'id' => 'integer',
        'lat' => 'decimal:8',
        'lng' => 'decimal:8',
    ];

    public function promoQrs()
    {
        return $this->hasMany(PromoQr::class, 'id_promo', 'id');
    }
}
