const eventos = await this.repositorioEvento.find({
where: gte(ev.fecha, new Date().toISOString().split('T')[0]),
with: {
local: {
where: and(
lte(locales.latitud, boundaries.northEast.lat),
lte(locales.longitud, boundaries.northEast.lng),
gte(locales.latitud, boundaries.southEast.lat),
lte(locales.longitud, boundaries.southEast.lng),
lte(locales.latitud, boundaries.northWest.lat),
gte(locales.longitud, boundaries.northWest.lng),
gte(locales.latitud, boundaries.southWest.lat),
gte(locales.longitud, boundaries.southWest.lng),
),
columns: {
nombre: true,
direccion: true,
latitud: true,
longitud: true,
},
},
},
});
const eventos = await this.repositorioEvento.find({
where: gte(ev.fecha, new Date().toISOString().split('T')[0]),
with: {
local: {
where: and(
lte(locales.latitud, boundaries.northEast.lat),
lte(locales.longitud, boundaries.northEast.lng),
gte(locales.latitud, boundaries.southEast.lat),
lte(locales.longitud, boundaries.southEast.lng),
lte(locales.latitud, boundaries.northWest.lat),
gte(locales.longitud, boundaries.northWest.lng),
gte(locales.latitud, boundaries.southWest.lat),
gte(locales.longitud, boundaries.southWest.lng),
),
columns: {
nombre: true,
direccion: true,
latitud: true,
longitud: true,
},
},
},
});