usuarios falsos
This commit is contained in:
Vendored
-32
@@ -1,32 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const typeorm_1 = require("typeorm");
|
||||
const Horario_1 = require("./entity/Horario");
|
||||
const Mesa_1 = require("./entity/Mesa");
|
||||
typeorm_1.createConnection()
|
||||
.then(async (connection) => {
|
||||
const horarioRepository = typeorm_1.getRepository(Horario_1.Horario);
|
||||
const mesaRepository = typeorm_1.getRepository(Mesa_1.Mesa);
|
||||
const horarios = [
|
||||
'8:00-10:00',
|
||||
'10:00-12:00',
|
||||
'12:00-14:00',
|
||||
'14:00-16:00',
|
||||
'16:00-18:00',
|
||||
'18:00-20:00'
|
||||
];
|
||||
for (let index = 0; index < horarios.length; index++) {
|
||||
const horario = new Horario_1.Horario();
|
||||
horario.hora = horarios[index];
|
||||
console.log(horario);
|
||||
await horarioRepository.save(horario);
|
||||
}
|
||||
for (let i = 1; i < 30; i++) {
|
||||
const mesa = new Mesa_1.Mesa();
|
||||
mesa.nombre = String(i);
|
||||
await mesaRepository.save(mesa);
|
||||
}
|
||||
process.exit();
|
||||
})
|
||||
.catch((error) => console.log('TypeORM connection error: ', error));
|
||||
//# sourceMappingURL=catalogos.js.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"catalogos.js","sourceRoot":"","sources":["../src/catalogos.ts"],"names":[],"mappings":";;AAAA,qCAAyD;AACzD,8CAA0C;AAC1C,wCAAoC;AAEpC,0BAAgB,EAAE;KACf,IAAI,CAAC,KAAK,EAAE,UAAU,EAAE,EAAE;IACzB,MAAM,iBAAiB,GAAG,uBAAa,CAAC,iBAAO,CAAC,CAAA;IAChD,MAAM,cAAc,GAAG,uBAAa,CAAC,WAAI,CAAC,CAAA;IAC1C,MAAM,QAAQ,GAAG;QACf,YAAY;QACZ,aAAa;QACb,aAAa;QACb,aAAa;QACb,aAAa;QACb,aAAa;KACd,CAAA;IACD,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;QACpD,MAAM,OAAO,GAAG,IAAI,iBAAO,EAAE,CAAA;QAC7B,OAAO,CAAC,IAAI,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAA;QAC9B,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;QACpB,MAAM,iBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;KACtC;IACD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE;QAC3B,MAAM,IAAI,GAAG,IAAI,WAAI,EAAE,CAAA;QACvB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,CAAA;QACvB,MAAM,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;KAChC;IAED,OAAO,CAAC,IAAI,EAAE,CAAA;AAChB,CAAC,CAAC;KACD,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,4BAA4B,EAAE,KAAK,CAAC,CAAC,CAAA"}
|
||||
Vendored
-9
@@ -1,9 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const typeorm_1 = require("typeorm");
|
||||
typeorm_1.createConnection()
|
||||
.then(async (connection) => {
|
||||
console.log('base de datos configurada');
|
||||
})
|
||||
.catch((error) => console.log('TypeORM connection error: ', error));
|
||||
//# sourceMappingURL=config.js.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";;AAAA,qCAAyD;AAGzD,0BAAgB,EAAE;KACf,IAAI,CAAC,KAAK,EAAE,UAAU,EAAE,EAAE;IACzB,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAA;AAC1C,CAAC,CAAC;KACD,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,4BAA4B,EAAE,KAAK,CAAC,CAAC,CAAA"}
|
||||
Vendored
-12
@@ -1,12 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const jwt = require("jsonwebtoken");
|
||||
class AuthController {
|
||||
static async signUsuario(type, usuarioId) {
|
||||
const secret = 'Holabeb';
|
||||
const token = jwt.sign({ type, usuarioId }, secret, { expiresIn: '1h' });
|
||||
return token;
|
||||
}
|
||||
}
|
||||
exports.AuthController = AuthController;
|
||||
//# sourceMappingURL=Auth.js.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"Auth.js","sourceRoot":"","sources":["../../src/controller/Auth.ts"],"names":[],"mappings":";;AAAA,oCAAmC;AACnC,MAAa,cAAc;IACzB,MAAM,CAAC,KAAK,CAAC,WAAW,CAAE,IAAY,EAAE,SAAiB;QACvD,MAAM,MAAM,GAAG,SAAS,CAAA;QACxB,MAAM,KAAK,GAAG,GAAG,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;QACxE,OAAO,KAAK,CAAA;IACd,CAAC;CACF;AAND,wCAMC"}
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
//# sourceMappingURL=Ayuda.js.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"Ayuda.js","sourceRoot":"","sources":["../../src/controller/Ayuda.ts"],"names":[],"mappings":""}
|
||||
Vendored
-83
@@ -1,83 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const Papa = require("papaparse");
|
||||
const fs = require("fs");
|
||||
const Carrito_1 = require("../entity/Carrito");
|
||||
const typeorm_1 = require("typeorm");
|
||||
const Tipo_1 = require("../entity/Tipo");
|
||||
const Equipo_1 = require("../entity/Equipo");
|
||||
class CarritoController {
|
||||
async carga(req, res) {
|
||||
const cargaFile = req.file;
|
||||
if (!cargaFile) {
|
||||
res.status(400).send({
|
||||
status: false,
|
||||
data: 'No file is selected.'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
const fileReadResult = fs.readFileSync(cargaFile.path, 'utf-8');
|
||||
const parseResult = await Papa.parse(fileReadResult, {
|
||||
header: true
|
||||
});
|
||||
console.log(parseResult);
|
||||
let data = {};
|
||||
try {
|
||||
for (const i in parseResult.data) {
|
||||
data = parseResult.data[i];
|
||||
if (!data.kiosko ||
|
||||
!data.alias_carrito ||
|
||||
!data.no_serie ||
|
||||
!data.no_inventario) {
|
||||
continue;
|
||||
}
|
||||
console.log(data);
|
||||
await this.saveCarrito(data);
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
res.status(400).send(err.message);
|
||||
return;
|
||||
}
|
||||
res.status(200).send('okay');
|
||||
}
|
||||
async saveCarrito(data) {
|
||||
const carritoRepository = typeorm_1.getRepository(Carrito_1.Carrito);
|
||||
const tipoRepository = typeorm_1.getRepository(Tipo_1.Tipo);
|
||||
const equipoRepository = typeorm_1.getRepository(Equipo_1.Equipo);
|
||||
const tipo = new Tipo_1.Tipo();
|
||||
const carrito = new Carrito_1.Carrito();
|
||||
const equipo = new Equipo_1.Equipo();
|
||||
const tipoFind = await tipoRepository.findOne({
|
||||
where: {
|
||||
nombre: data.tipo
|
||||
}
|
||||
});
|
||||
if (!tipoFind) {
|
||||
tipo.nombre = data.tipo;
|
||||
}
|
||||
const carritoFind = await carritoRepository.findOne({
|
||||
where: {
|
||||
kiosko: data.kiosko,
|
||||
alias: data.alias_carrito,
|
||||
tipo: tipoFind
|
||||
}
|
||||
});
|
||||
if (!carritoFind) {
|
||||
carrito.kiosko = data.kiosko;
|
||||
carrito.alias = data.alias_carrito;
|
||||
carrito.tipo = !tipoFind ? tipo : tipoFind;
|
||||
}
|
||||
equipo.alias = data.equipo_carrito;
|
||||
equipo.noSerie = data.no_serie;
|
||||
equipo.noInventario = data.no_inventario;
|
||||
equipo.carrito = !carritoFind ? carrito : carritoFind;
|
||||
if (!tipoFind)
|
||||
await tipoRepository.save(tipo);
|
||||
if (!carritoFind)
|
||||
await carritoRepository.save(carrito);
|
||||
await equipoRepository.save(equipo);
|
||||
}
|
||||
}
|
||||
exports.CarritoController = CarritoController;
|
||||
//# sourceMappingURL=Carrito.js.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"Carrito.js","sourceRoot":"","sources":["../../src/controller/Carrito.ts"],"names":[],"mappings":"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"}
|
||||
Vendored
-13
@@ -1,13 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const typeorm_1 = require("typeorm");
|
||||
const Horario_1 = require("../entity/Horario");
|
||||
class HorarioController {
|
||||
static async getAll(req, res) {
|
||||
const repository = typeorm_1.getRepository(Horario_1.Horario);
|
||||
const horarios = await repository.find();
|
||||
res.status(200).json(horarios);
|
||||
}
|
||||
}
|
||||
exports.HorarioController = HorarioController;
|
||||
//# sourceMappingURL=Horario.js.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"Horario.js","sourceRoot":"","sources":["../../src/controller/Horario.ts"],"names":[],"mappings":";;AACA,qCAAuC;AACvC,iDAA6C;AAE7C,MAAa,iBAAiB;IAC5B,MAAM,CAAC,KAAK,CAAC,MAAM,CAAE,GAAY,EAAE,GAAa;QAC9C,MAAM,UAAU,GAAG,uBAAa,CAAC,iBAAO,CAAC,CAAA;QACzC,MAAM,QAAQ,GAAG,MAAM,UAAU,CAAC,IAAI,EAAE,CAAA;QACxC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;IAChC,CAAC;CACF;AAND,8CAMC"}
|
||||
Vendored
-61
@@ -1,61 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const Operador_1 = require("../entity/Operador");
|
||||
const class_validator_1 = require("class-validator");
|
||||
const typeorm_1 = require("typeorm");
|
||||
class OperadorController {
|
||||
static async create(req, res) {
|
||||
const { usuario, secreto, admin } = req.body;
|
||||
const operador = new Operador_1.Operador();
|
||||
operador.usuario = usuario;
|
||||
operador.secreto = secreto;
|
||||
operador.admin = admin;
|
||||
const errors = await class_validator_1.validate(operador);
|
||||
if (errors.length > 0) {
|
||||
res.status(400).send(errors);
|
||||
}
|
||||
operador.hashPassword();
|
||||
const repository = typeorm_1.getRepository(Operador_1.Operador);
|
||||
try {
|
||||
await repository.save(operador);
|
||||
}
|
||||
catch (e) {
|
||||
res.status(409).send('username already in use');
|
||||
}
|
||||
res.status(201).send('User created');
|
||||
}
|
||||
static async getAll(req, res) {
|
||||
const repository = typeorm_1.getRepository(Operador_1.Operador);
|
||||
const result = await repository.find({
|
||||
select: ['id', 'usuario', 'admin']
|
||||
});
|
||||
res.status(200).json(result);
|
||||
}
|
||||
static async getOne(req, res) {
|
||||
const id = +req.params.id;
|
||||
const repository = typeorm_1.getRepository(Operador_1.Operador);
|
||||
try {
|
||||
const operador = await repository.findOneOrFail(id, {
|
||||
select: ['id', 'usuario', 'admin']
|
||||
});
|
||||
res.status(200).json(operador);
|
||||
}
|
||||
catch (e) {
|
||||
res.status(404).send('User not found');
|
||||
}
|
||||
}
|
||||
static async remove(req, res) {
|
||||
const id = +req.params.id;
|
||||
const repository = typeorm_1.getRepository(Operador_1.Operador);
|
||||
try {
|
||||
const operador = await repository.findOneOrFail(id);
|
||||
repository.remove(operador);
|
||||
res.status(204).send();
|
||||
}
|
||||
catch (error) {
|
||||
res.status(404).send('User not found');
|
||||
}
|
||||
}
|
||||
}
|
||||
exports.OperadorController = OperadorController;
|
||||
//# sourceMappingURL=Operador.js.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"Operador.js","sourceRoot":"","sources":["../../src/controller/Operador.ts"],"names":[],"mappings":"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"}
|
||||
Vendored
-163
@@ -1,163 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const typeorm_1 = require("typeorm");
|
||||
const Equipo_1 = require("../entity/Equipo");
|
||||
const Prestamo_1 = require("../entity/Prestamo");
|
||||
const Usuario_1 = require("../entity/Usuario");
|
||||
const Operador_1 = require("../entity/Operador");
|
||||
const moment = require("moment");
|
||||
const Mesa_1 = require("../entity/Mesa");
|
||||
class PrestamoController {
|
||||
static async crear(request, res) {
|
||||
const usuarioRepository = await typeorm_1.getRepository(Usuario_1.Usuario);
|
||||
const equipoRepository = await typeorm_1.getRepository(Equipo_1.Equipo);
|
||||
const prestamoRepository = await typeorm_1.getRepository(Prestamo_1.Prestamo);
|
||||
const { usuarioId, tipoId } = request.body;
|
||||
const usuario = await usuarioRepository.findOne(usuarioId, {
|
||||
select: ['id', 'baja', 'multa']
|
||||
});
|
||||
if (!usuario) {
|
||||
res.status(400).json({ err: 'Usuario no encontrado' });
|
||||
return;
|
||||
}
|
||||
if (usuario.baja) {
|
||||
res.status(400).json({ err: 'El usuario esta dado de baja' });
|
||||
return;
|
||||
}
|
||||
const prestamoActivo = await prestamoRepository
|
||||
.createQueryBuilder('prestamo')
|
||||
.where('prestamo.usuarioId = :idUsuario', { idUsuario: usuario.id })
|
||||
.andWhere('prestamo.activo = true')
|
||||
.orWhere('prestamo.reservado = true')
|
||||
.getOne();
|
||||
if (prestamoActivo) {
|
||||
res.status(400).json({ err: 'El usuario tiene un prestamo activo' });
|
||||
return;
|
||||
}
|
||||
const equipo = await equipoRepository
|
||||
.createQueryBuilder('equipo')
|
||||
.leftJoinAndSelect('equipo.carrito', 'carrito')
|
||||
.leftJoinAndSelect('carrito.tipo', 'tipo')
|
||||
.where('equipo.activo = :activo', { activo: false })
|
||||
.andWhere('carrito.kiosko = :kiosko', { kiosko: 1 })
|
||||
.andWhere('tipo.id = :tipoId', { tipoId })
|
||||
.orderBy('equipo.updatedAt', 'ASC')
|
||||
.getOne();
|
||||
const prestamo = new Prestamo_1.Prestamo();
|
||||
equipo.activo = true;
|
||||
prestamo.equipo = equipo;
|
||||
prestamo.usuario = usuario;
|
||||
const m = moment()
|
||||
.add({ hours: 2, minutes: 35 })
|
||||
.toLocaleString();
|
||||
prestamo.horaMaxEntrega = m;
|
||||
await equipoRepository.save(equipo);
|
||||
await prestamoRepository.save(prestamo);
|
||||
prestamo.qr = `https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=${prestamo.id}`;
|
||||
console.log(prestamo);
|
||||
res.status(200).json({
|
||||
prestamo
|
||||
});
|
||||
}
|
||||
static async confirmar(req, res) {
|
||||
const prestamoRepository = typeorm_1.getRepository(Prestamo_1.Prestamo);
|
||||
const operadorRepository = typeorm_1.getRepository(Operador_1.Operador);
|
||||
const { prestamoId, operadorId } = req.body;
|
||||
const prestamo = await prestamoRepository.findOne(prestamoId, {
|
||||
relations: ['equipo']
|
||||
});
|
||||
if (!prestamo) {
|
||||
res.status(400).json({
|
||||
err: 'El prestamo no existe'
|
||||
});
|
||||
return;
|
||||
}
|
||||
const operador = await operadorRepository.findOne(operadorId);
|
||||
if (!operador) {
|
||||
res.status(400).json({
|
||||
err: 'El operador no existe'
|
||||
});
|
||||
return;
|
||||
}
|
||||
prestamo.operadorEntrega = operador;
|
||||
prestamo.reservado = false;
|
||||
prestamo.activo = true;
|
||||
try {
|
||||
await prestamoRepository.save(prestamo);
|
||||
res.status(200).json(prestamo);
|
||||
}
|
||||
catch (err) {
|
||||
res.status(400).json({ err: err.message });
|
||||
}
|
||||
}
|
||||
static async regreso(req, res) {
|
||||
const equipoRepository = typeorm_1.getRepository(Equipo_1.Equipo);
|
||||
const prestamoRepository = typeorm_1.getRepository(Prestamo_1.Prestamo);
|
||||
const operadorRepository = typeorm_1.getRepository(Operador_1.Operador);
|
||||
const mesaRepository = typeorm_1.getRepository(Mesa_1.Mesa);
|
||||
const { prestamoId, operadorId } = req.body;
|
||||
const prestamo = await prestamoRepository.findOne(prestamoId, {
|
||||
relations: ['equipo', 'usuario', 'mesa']
|
||||
});
|
||||
if (!prestamo) {
|
||||
res.status(400).json({ err: 'Prestamo no encontrado' });
|
||||
}
|
||||
const operador = await operadorRepository.findOne(operadorId);
|
||||
if (!operador) {
|
||||
res.status(400).json({ err: 'Operador no encontrado' });
|
||||
}
|
||||
if (!prestamo.usuario.interno) {
|
||||
prestamo.mesa.activo = false;
|
||||
}
|
||||
prestamo.activo = false;
|
||||
prestamo.equipo.activo = false;
|
||||
prestamo.operadorRegreso = operador;
|
||||
try {
|
||||
if (!prestamo.usuario.interno) {
|
||||
await mesaRepository.save(prestamo.mesa);
|
||||
}
|
||||
await equipoRepository.save(prestamo.equipo);
|
||||
await prestamoRepository.save(prestamo);
|
||||
res.status(200).send('Prestamo regresado Exitosamente');
|
||||
}
|
||||
catch (err) {
|
||||
res.status(400).json({ err: err.message });
|
||||
}
|
||||
}
|
||||
static async estatus(req, res) {
|
||||
const repository = typeorm_1.getRepository(Prestamo_1.Prestamo);
|
||||
const { usuarioId } = req.query;
|
||||
console.log(usuarioId);
|
||||
const prestamo = await repository
|
||||
.createQueryBuilder('prestamo')
|
||||
.leftJoinAndSelect('prestamo.usuario', 'usuario')
|
||||
.leftJoinAndSelect('prestamo.mesa', 'mesa')
|
||||
.where('usuario.id = :usuarioId', { usuarioId })
|
||||
.andWhere('prestamo.activo = :activo', { activo: true })
|
||||
.getOne();
|
||||
if (!prestamo) {
|
||||
res.status(200).json({ err: 'El usuario no tiene prestamos activos' });
|
||||
return;
|
||||
}
|
||||
console.log(prestamo);
|
||||
res.status(200).json(prestamo);
|
||||
}
|
||||
static async cancelar(req, res) {
|
||||
const repository = typeorm_1.getRepository(Prestamo_1.Prestamo);
|
||||
const { prestamoId } = req.body;
|
||||
const prestamo = await repository.findOne(prestamoId);
|
||||
if (!prestamo) {
|
||||
res.status(400).json({ err: 'El prestamo no existe' });
|
||||
}
|
||||
prestamo.reservado = false;
|
||||
try {
|
||||
await repository.save(prestamo);
|
||||
res.status(200).send('Cancelado correctamente');
|
||||
}
|
||||
catch (err) {
|
||||
res.status(400).json({ err: err.message });
|
||||
}
|
||||
}
|
||||
}
|
||||
exports.PrestamoController = PrestamoController;
|
||||
//# sourceMappingURL=Prestamo.js.map
|
||||
Vendored
-1
File diff suppressed because one or more lines are too long
Vendored
-165
@@ -1,165 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const typeorm_1 = require("typeorm");
|
||||
const Prestamo_1 = require("../entity/Prestamo");
|
||||
const moment = require("moment");
|
||||
const Horario_1 = require("../entity/Horario");
|
||||
const Usuario_1 = require("../entity/Usuario");
|
||||
const Equipo_1 = require("../entity/Equipo");
|
||||
const Operador_1 = require("../entity/Operador");
|
||||
const Mesa_1 = require("../entity/Mesa");
|
||||
class ResevacionController {
|
||||
static async espaciosDisponibles(req, res) {
|
||||
const repository = typeorm_1.getRepository(Horario_1.Horario);
|
||||
const fecha = moment().format('L');
|
||||
console.log(fecha);
|
||||
const espacios = await repository
|
||||
.createQueryBuilder('horario')
|
||||
.leftJoinAndSelect('horario.prestamos', 'prestamo')
|
||||
.where('prestamo.createdAt >= :fecha', { fecha })
|
||||
.groupBy('horario.hora')
|
||||
.getMany();
|
||||
return res.status(200).json(espacios);
|
||||
}
|
||||
static async reservar(req, res) {
|
||||
const prestamoRepository = typeorm_1.getRepository(Prestamo_1.Prestamo);
|
||||
const horarioRepository = typeorm_1.getRepository(Horario_1.Horario);
|
||||
const usuarioRepository = typeorm_1.getRepository(Usuario_1.Usuario);
|
||||
const equipoRepository = typeorm_1.getRepository(Equipo_1.Equipo);
|
||||
const { usuarioId, tipoId, horarioId } = req.body;
|
||||
const usuario = await usuarioRepository.findOne(usuarioId, {
|
||||
select: ['id', 'baja', 'multa']
|
||||
});
|
||||
if (!usuario) {
|
||||
res.status(400).json({ err: 'Usuario no encontrado' });
|
||||
return;
|
||||
}
|
||||
if (usuario.baja) {
|
||||
res.status(400).json({ err: 'El usuario esta dado de baja' });
|
||||
return;
|
||||
}
|
||||
const horario = await horarioRepository.findOne(horarioId);
|
||||
if (!horario) {
|
||||
res.status(400).json({ err: 'El horario no existe' });
|
||||
return;
|
||||
}
|
||||
const prestamoActivo = await prestamoRepository
|
||||
.createQueryBuilder('prestamo')
|
||||
.where('prestamo.usuarioId = :idUsuario', { idUsuario: usuario.id })
|
||||
.andWhere('prestamo.activo = true')
|
||||
.orWhere('prestamo.reservado = true')
|
||||
.getOne();
|
||||
if (prestamoActivo) {
|
||||
res.status(400).json({ err: 'El usuario tiene un prestamo activo' });
|
||||
return;
|
||||
}
|
||||
const equipo = await equipoRepository
|
||||
.createQueryBuilder('equipo')
|
||||
.leftJoinAndSelect('equipo.carrito', 'carrito')
|
||||
.leftJoinAndSelect('carrito.tipo', 'tipo')
|
||||
.where('equipo.activo = :activo', { activo: false })
|
||||
.andWhere('carrito.kiosko = :kiosko', { kiosko: 3 })
|
||||
.andWhere('tipo.id = :tipoId', { tipoId })
|
||||
.orderBy('equipo.updatedAt', 'ASC')
|
||||
.getOne();
|
||||
if (!equipo) {
|
||||
res.status(400).json({ err: 'Ya no hay equipos' });
|
||||
return;
|
||||
}
|
||||
const prestamo = new Prestamo_1.Prestamo();
|
||||
const horamax = horario.hora.split('-')[1].split(':')[0];
|
||||
const m = moment()
|
||||
.hour(+horamax)
|
||||
.minute(0)
|
||||
.toLocaleString();
|
||||
equipo.activo = true;
|
||||
prestamo.equipo = equipo;
|
||||
prestamo.usuario = usuario;
|
||||
prestamo.horaMaxEntrega = m;
|
||||
prestamo.horario = horario;
|
||||
await equipoRepository.save(equipo);
|
||||
await prestamoRepository.save(prestamo);
|
||||
prestamo.qr = `https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=${prestamo.id}`;
|
||||
console.log(prestamo);
|
||||
res.status(200).json({
|
||||
prestamo
|
||||
});
|
||||
}
|
||||
static async confirmar(req, res) {
|
||||
const prestamoRepository = typeorm_1.getRepository(Prestamo_1.Prestamo);
|
||||
const operadorRepository = typeorm_1.getRepository(Operador_1.Operador);
|
||||
const mesaRepository = typeorm_1.getRepository(Mesa_1.Mesa);
|
||||
const mesa = await mesaRepository
|
||||
.createQueryBuilder('mesa')
|
||||
.where('mesa.activo = :activo', { activo: false })
|
||||
.orderBy('mesa.updatedAt', 'ASC')
|
||||
.getOne();
|
||||
const { prestamoId, operadorId } = req.body;
|
||||
if (!mesa) {
|
||||
res.status(400).json({
|
||||
err: 'Ya no hay mesas disponbles'
|
||||
});
|
||||
return;
|
||||
}
|
||||
const prestamo = await prestamoRepository.findOne(prestamoId, {
|
||||
relations: ['equipo']
|
||||
});
|
||||
if (!prestamo) {
|
||||
res.status(400).json({
|
||||
err: 'El prestamo no existe'
|
||||
});
|
||||
return;
|
||||
}
|
||||
const operador = await operadorRepository.findOne(operadorId);
|
||||
if (!operador) {
|
||||
res.status(400).json({
|
||||
err: 'El operador no existe'
|
||||
});
|
||||
return;
|
||||
}
|
||||
mesa.activo = true;
|
||||
prestamo.operadorEntrega = operador;
|
||||
prestamo.reservado = false;
|
||||
prestamo.activo = true;
|
||||
prestamo.mesa = mesa;
|
||||
try {
|
||||
await mesaRepository.save(mesa);
|
||||
await prestamoRepository.save(prestamo);
|
||||
res.status(200).json(prestamo);
|
||||
}
|
||||
catch (err) {
|
||||
res.status(400).json({ err: err.message });
|
||||
}
|
||||
}
|
||||
static async regreso(req, res) {
|
||||
const equipoRepository = typeorm_1.getRepository(Equipo_1.Equipo);
|
||||
const prestamoRepository = typeorm_1.getRepository(Prestamo_1.Prestamo);
|
||||
const operadorRepository = typeorm_1.getRepository(Operador_1.Operador);
|
||||
const mesaRepository = typeorm_1.getRepository(Mesa_1.Mesa);
|
||||
const prestamo = await prestamoRepository.findOne(req.body.prestamoId, {
|
||||
relations: ['equipo', 'mesa']
|
||||
});
|
||||
if (!prestamo) {
|
||||
res.status(400).json({ err: 'Prestamo no encontrado' });
|
||||
}
|
||||
const operador = await operadorRepository.findOne(req.body.operadorId);
|
||||
if (!operador) {
|
||||
res.status(400).json({ err: 'Operador no encontrado' });
|
||||
}
|
||||
prestamo.activo = false;
|
||||
prestamo.equipo.activo = false;
|
||||
prestamo.operadorRegreso = operador;
|
||||
prestamo.mesa.activo = false;
|
||||
try {
|
||||
await equipoRepository.save(prestamo.equipo);
|
||||
await mesaRepository.save(prestamo.mesa);
|
||||
await prestamoRepository.save(prestamo);
|
||||
res.status(200).json(prestamo);
|
||||
}
|
||||
catch (err) {
|
||||
res.status(400).json({ err: err.message });
|
||||
}
|
||||
}
|
||||
}
|
||||
exports.ResevacionController = ResevacionController;
|
||||
//# sourceMappingURL=Reservacion.js.map
|
||||
Vendored
-1
File diff suppressed because one or more lines are too long
Vendored
-13
@@ -1,13 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const typeorm_1 = require("typeorm");
|
||||
const Tipo_1 = require("../entity/Tipo");
|
||||
class TipoController {
|
||||
static async getAll(req, res) {
|
||||
const repository = await typeorm_1.getRepository(Tipo_1.Tipo);
|
||||
const tipos = await repository.find();
|
||||
res.status(200).json(tipos);
|
||||
}
|
||||
}
|
||||
exports.TipoController = TipoController;
|
||||
//# sourceMappingURL=Tipo.js.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"Tipo.js","sourceRoot":"","sources":["../../src/controller/Tipo.ts"],"names":[],"mappings":";;AAEA,qCAAuC;AACvC,2CAAuC;AAEvC,MAAa,cAAc;IACzB,MAAM,CAAC,KAAK,CAAC,MAAM,CAAE,GAAY,EAAE,GAAa;QAC9C,MAAM,UAAU,GAAG,MAAM,uBAAa,CAAC,WAAI,CAAC,CAAA;QAC5C,MAAM,KAAK,GAAG,MAAM,UAAU,CAAC,IAAI,EAAE,CAAA;QACrC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IAC7B,CAAC;CACF;AAND,wCAMC"}
|
||||
Vendored
-126
@@ -1,126 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const Usuario_1 = require("../entity/Usuario");
|
||||
const class_validator_1 = require("class-validator");
|
||||
const typeorm_1 = require("typeorm");
|
||||
const Auth_1 = require("./Auth");
|
||||
class UsuarioController {
|
||||
static async create(req, res) {
|
||||
console.log(req.file);
|
||||
const { id, nombre, apellidoPaterno, apellidoMaterno, correoAlternativo, numeroTelefonico, institucion, secreto, interno } = JSON.parse(req.body.usuario);
|
||||
const identificacion = req.file;
|
||||
if (!interno && !identificacion) {
|
||||
res.status(400).send({
|
||||
status: false,
|
||||
data: 'Un usuario externo tiene que mandar fotoo de su identificacion'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
const usuario = new Usuario_1.Usuario();
|
||||
usuario.id = id;
|
||||
usuario.nombre = nombre;
|
||||
usuario.apellidoPaterno = apellidoPaterno;
|
||||
usuario.apellidoMaterno = apellidoMaterno;
|
||||
usuario.correoAlternativo = correoAlternativo;
|
||||
usuario.numeroTelefonico = numeroTelefonico;
|
||||
usuario.identificacion = interno ? 'null' : JSON.stringify(identificacion);
|
||||
usuario.institucion = institucion;
|
||||
usuario.secreto = secreto;
|
||||
usuario.interno = interno;
|
||||
usuario.hashPassword();
|
||||
const errors = await class_validator_1.validate(usuario);
|
||||
if (errors.length > 0) {
|
||||
res.status(400).send(errors);
|
||||
}
|
||||
const repository = typeorm_1.getRepository(Usuario_1.Usuario);
|
||||
try {
|
||||
await repository.save(usuario);
|
||||
}
|
||||
catch (e) {
|
||||
res.status(409).send(e.message);
|
||||
return;
|
||||
}
|
||||
res.status(201).send('User create');
|
||||
}
|
||||
static async getAll(req, res) {
|
||||
const respository = typeorm_1.getRepository(Usuario_1.Usuario);
|
||||
const result = await respository.find({
|
||||
select: ['id', 'nombre', 'apellidoMaterno', 'apellidoPaterno']
|
||||
});
|
||||
res.status(200).json(result);
|
||||
}
|
||||
static async getOne(req, res) {
|
||||
const respository = typeorm_1.getRepository(Usuario_1.Usuario);
|
||||
const id = +req.params.id;
|
||||
try {
|
||||
const result = await respository.findOneOrFail(id, {
|
||||
select: ['id', 'nombre', 'apellidoMaterno', 'apellidoPaterno']
|
||||
});
|
||||
res.status(200).json(result);
|
||||
}
|
||||
catch (e) {
|
||||
res.status(404).send('Usuario no encontrado');
|
||||
}
|
||||
}
|
||||
static async login(req, res) {
|
||||
const repository = typeorm_1.getRepository(Usuario_1.Usuario);
|
||||
const { id, secreto } = req.body;
|
||||
try {
|
||||
const usuario = await repository.findOne({
|
||||
where: {
|
||||
id
|
||||
}
|
||||
});
|
||||
if (!usuario) {
|
||||
throw new Error('*Usuario o contraseña invalidos');
|
||||
}
|
||||
if (!usuario.checkIfUnencryptedPasswordIsValid(secreto)) {
|
||||
throw new Error('Usuario o *contraseña invalidos');
|
||||
}
|
||||
const token = await Auth_1.AuthController.signUsuario(usuario.interno ? 'usuarioInterno' : 'usuarioExterno', usuario.id);
|
||||
console.log(token);
|
||||
res.status(200).json({
|
||||
nombre: usuario.nombre,
|
||||
apellidoPaterno: usuario.apellidoPaterno,
|
||||
apellidoMaterno: usuario.apellidoMaterno,
|
||||
interno: usuario.interno,
|
||||
token
|
||||
});
|
||||
}
|
||||
catch (err) {
|
||||
res.status(400).send(err.message);
|
||||
}
|
||||
}
|
||||
static async verificar(req, res) {
|
||||
const usuarios = ['415112132', '41511216'];
|
||||
const externos = ['315112132', '31511216'];
|
||||
const usuarioId = req.params.id;
|
||||
const usuarioInterno = {
|
||||
nombre: 'Arturo',
|
||||
apellidoPaterno: 'Guerrero',
|
||||
apellidoMaterno: 'Lopez',
|
||||
institucion: 'Fes acatlan',
|
||||
carrera: 'Matematicas aplicadas',
|
||||
interno: true
|
||||
};
|
||||
const usuarioExterno = {
|
||||
nombre: 'Paulina',
|
||||
apellidoPaterno: 'Guerrero',
|
||||
apellidoMaterno: 'Lopez',
|
||||
institucion: 'FES Iztacala',
|
||||
carrera: 'Biologia',
|
||||
interno: false
|
||||
};
|
||||
if (usuarios.includes(usuarioId)) {
|
||||
res.status(200).json(usuarioInterno);
|
||||
return;
|
||||
}
|
||||
if (externos.includes(usuarioId)) {
|
||||
res.status(200).json(usuarioExterno);
|
||||
return;
|
||||
}
|
||||
res.status(400).json({ err: 'no se encontro un usuario' });
|
||||
}
|
||||
}
|
||||
exports.UsuarioController = UsuarioController;
|
||||
//# sourceMappingURL=Usuario.js.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"Usuario.js","sourceRoot":"","sources":["../../src/controller/Usuario.ts"],"names":[],"mappings":"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"}
|
||||
Vendored
-25
@@ -1,25 +0,0 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const typeorm_1 = require("typeorm");
|
||||
const Catalogo_1 = require("./Catalogo");
|
||||
const Reservacion_1 = require("./Reservacion");
|
||||
let Actividad = class Actividad extends Catalogo_1.Catalogo {
|
||||
};
|
||||
__decorate([
|
||||
typeorm_1.OneToMany((type) => Reservacion_1.Reservacion, (reservacion) => reservacion.actividad),
|
||||
__metadata("design:type", Array)
|
||||
], Actividad.prototype, "reservaciones", void 0);
|
||||
Actividad = __decorate([
|
||||
typeorm_1.Entity()
|
||||
], Actividad);
|
||||
exports.Actividad = Actividad;
|
||||
//# sourceMappingURL=Actividad.js.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"Actividad.js","sourceRoot":"","sources":["../../src/entity/Actividad.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,qCAA2C;AAC3C,yCAAqC;AACrC,+CAA2C;AAG3C,IAAa,SAAS,GAAtB,MAAa,SAAU,SAAQ,mBAAQ;CAMtC,CAAA;AADC;IAJC,mBAAS,CACR,CAAC,IAAI,EAAE,EAAE,CAAC,yBAAW,EACrB,CAAC,WAAW,EAAE,EAAE,CAAC,WAAW,CAAC,SAAS,CACvC;;gDAC2B;AALjB,SAAS;IADrB,gBAAM,EAAE;GACI,SAAS,CAMrB;AANY,8BAAS"}
|
||||
Vendored
-25
@@ -1,25 +0,0 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const typeorm_1 = require("typeorm");
|
||||
const Catalogo_1 = require("./Catalogo");
|
||||
const Reservacion_1 = require("./Reservacion");
|
||||
let Adscripcion = class Adscripcion extends Catalogo_1.Catalogo {
|
||||
};
|
||||
__decorate([
|
||||
typeorm_1.ManyToOne((type) => Reservacion_1.Reservacion, (reservacion) => reservacion.adscripcion),
|
||||
__metadata("design:type", Array)
|
||||
], Adscripcion.prototype, "reservaciones", void 0);
|
||||
Adscripcion = __decorate([
|
||||
typeorm_1.Entity()
|
||||
], Adscripcion);
|
||||
exports.Adscripcion = Adscripcion;
|
||||
//# sourceMappingURL=Adscripcion.js.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"Adscripcion.js","sourceRoot":"","sources":["../../src/entity/Adscripcion.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,qCAA2C;AAC3C,yCAAqC;AACrC,+CAA2C;AAG3C,IAAa,WAAW,GAAxB,MAAa,WAAY,SAAQ,mBAAQ;CAMxC,CAAA;AADC;IAJC,mBAAS,CACR,CAAC,IAAI,EAAE,EAAE,CAAC,yBAAW,EACrB,CAAC,WAAW,EAAE,EAAE,CAAC,WAAW,CAAC,WAAW,CACzC;;kDAC4B;AALlB,WAAW;IADvB,gBAAM,EAAE;GACI,WAAW,CAMvB;AANY,kCAAW"}
|
||||
Vendored
-45
@@ -1,45 +0,0 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const typeorm_1 = require("typeorm");
|
||||
const TipoProblema_1 = require("./TipoProblema");
|
||||
let Ayuda = class Ayuda {
|
||||
};
|
||||
__decorate([
|
||||
typeorm_1.PrimaryGeneratedColumn(),
|
||||
__metadata("design:type", Number)
|
||||
], Ayuda.prototype, "id", void 0);
|
||||
__decorate([
|
||||
typeorm_1.Column(),
|
||||
__metadata("design:type", String)
|
||||
], Ayuda.prototype, "nombre", void 0);
|
||||
__decorate([
|
||||
typeorm_1.Column(),
|
||||
__metadata("design:type", String)
|
||||
], Ayuda.prototype, "correo", void 0);
|
||||
__decorate([
|
||||
typeorm_1.Column(),
|
||||
__metadata("design:type", String)
|
||||
], Ayuda.prototype, "descripcion", void 0);
|
||||
__decorate([
|
||||
typeorm_1.Column(),
|
||||
__metadata("design:type", String)
|
||||
], Ayuda.prototype, "solucion", void 0);
|
||||
__decorate([
|
||||
typeorm_1.OneToOne((type) => TipoProblema_1.TipoProblema),
|
||||
typeorm_1.JoinColumn(),
|
||||
__metadata("design:type", TipoProblema_1.TipoProblema)
|
||||
], Ayuda.prototype, "tipoProblema", void 0);
|
||||
Ayuda = __decorate([
|
||||
typeorm_1.Entity()
|
||||
], Ayuda);
|
||||
exports.Ayuda = Ayuda;
|
||||
//# sourceMappingURL=Ayuda.js.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"Ayuda.js","sourceRoot":"","sources":["../../src/entity/Ayuda.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,qCAMgB;AAChB,iDAA6C;AAY7C,IAAa,KAAK,GAAlB,MAAa,KAAK;CAmBjB,CAAA;AAjBC;IADC,gCAAsB,EAAE;;iCACf;AAGV;IADC,gBAAM,EAAE;;qCACK;AAGd;IADC,gBAAM,EAAE;;qCACK;AAGd;IADC,gBAAM,EAAE;;0CACU;AAGnB;IADC,gBAAM,EAAE;;uCACO;AAIhB;IAFC,kBAAQ,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,2BAAY,CAAC;IAChC,oBAAU,EAAE;8BACC,2BAAY;2CAAA;AAlBf,KAAK;IADjB,gBAAM,EAAE;GACI,KAAK,CAmBjB;AAnBY,sBAAK"}
|
||||
Vendored
-56
@@ -1,56 +0,0 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const typeorm_1 = require("typeorm");
|
||||
const Tipo_1 = require("./Tipo");
|
||||
const Reservacion_1 = require("./Reservacion");
|
||||
const Equipo_1 = require("./Equipo");
|
||||
let Carrito = class Carrito {
|
||||
};
|
||||
__decorate([
|
||||
typeorm_1.PrimaryGeneratedColumn(),
|
||||
__metadata("design:type", Number)
|
||||
], Carrito.prototype, "id", void 0);
|
||||
__decorate([
|
||||
typeorm_1.Column(),
|
||||
__metadata("design:type", Number)
|
||||
], Carrito.prototype, "alias", void 0);
|
||||
__decorate([
|
||||
typeorm_1.Column(),
|
||||
__metadata("design:type", Number)
|
||||
], Carrito.prototype, "kiosko", void 0);
|
||||
__decorate([
|
||||
typeorm_1.OneToMany((type) => Reservacion_1.Reservacion, (reservacion) => reservacion.carrito),
|
||||
__metadata("design:type", Array)
|
||||
], Carrito.prototype, "reservaciones", void 0);
|
||||
__decorate([
|
||||
typeorm_1.OneToMany((type) => Equipo_1.Equipo, (equipo) => equipo.carrito),
|
||||
__metadata("design:type", Array)
|
||||
], Carrito.prototype, "equipos", void 0);
|
||||
__decorate([
|
||||
typeorm_1.ManyToOne((type) => Tipo_1.Tipo, (tipo) => tipo.carritos),
|
||||
__metadata("design:type", Tipo_1.Tipo)
|
||||
], Carrito.prototype, "tipo", void 0);
|
||||
__decorate([
|
||||
typeorm_1.Column(),
|
||||
typeorm_1.CreateDateColumn(),
|
||||
__metadata("design:type", Date)
|
||||
], Carrito.prototype, "createdAt", void 0);
|
||||
__decorate([
|
||||
typeorm_1.Column(),
|
||||
typeorm_1.UpdateDateColumn(),
|
||||
__metadata("design:type", Date)
|
||||
], Carrito.prototype, "updatedAt", void 0);
|
||||
Carrito = __decorate([
|
||||
typeorm_1.Entity()
|
||||
], Carrito);
|
||||
exports.Carrito = Carrito;
|
||||
//# sourceMappingURL=Carrito.js.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"Carrito.js","sourceRoot":"","sources":["../../src/entity/Carrito.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,qCAQgB;AAChB,iCAA6B;AAC7B,+CAA2C;AAC3C,qCAAiC;AAGjC,IAAa,OAAO,GAApB,MAAa,OAAO;CAmCnB,CAAA;AAjCC;IADC,gCAAsB,EAAE;;mCACf;AAGV;IADC,gBAAM,EAAE;;sCACI;AAGb;IADC,gBAAM,EAAE;;uCACK;AAMd;IAJC,mBAAS,CACR,CAAC,IAAI,EAAE,EAAE,CAAC,yBAAW,EACrB,CAAC,WAAW,EAAE,EAAE,CAAC,WAAW,CAAC,OAAO,CACrC;;8CAC2B;AAM5B;IAJC,mBAAS,CACR,CAAC,IAAI,EAAE,EAAE,CAAC,eAAM,EAChB,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,CAC3B;;wCACgB;AAMjB;IAJC,mBAAS,CACR,CAAC,IAAI,EAAE,EAAE,CAAC,WAAI,EACd,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CACxB;8BACK,WAAI;qCAAA;AAIV;IAFC,gBAAM,EAAE;IACR,0BAAgB,EAAE;8BACR,IAAI;0CAAA;AAIf;IAFC,gBAAM,EAAE;IACR,0BAAgB,EAAE;8BACR,IAAI;0CAAA;AAlCJ,OAAO;IADnB,gBAAM,EAAE;GACI,OAAO,CAmCnB;AAnCY,0BAAO"}
|
||||
Vendored
-24
@@ -1,24 +0,0 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const typeorm_1 = require("typeorm");
|
||||
class Catalogo {
|
||||
}
|
||||
__decorate([
|
||||
typeorm_1.PrimaryGeneratedColumn(),
|
||||
__metadata("design:type", Number)
|
||||
], Catalogo.prototype, "id", void 0);
|
||||
__decorate([
|
||||
typeorm_1.Column(),
|
||||
__metadata("design:type", String)
|
||||
], Catalogo.prototype, "nombre", void 0);
|
||||
exports.Catalogo = Catalogo;
|
||||
//# sourceMappingURL=Catalogo.js.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"Catalogo.js","sourceRoot":"","sources":["../../src/entity/Catalogo.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,qCAAgE;AAEhE,MAAsB,QAAQ;CAM7B;AAJC;IADC,gCAAsB,EAAE;;oCACf;AAGV;IADC,gBAAM,EAAE;;wCACK;AALhB,4BAMC"}
|
||||
Vendored
-39
@@ -1,39 +0,0 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const typeorm_1 = require("typeorm");
|
||||
let Configuracion = class Configuracion {
|
||||
};
|
||||
__decorate([
|
||||
typeorm_1.PrimaryGeneratedColumn(),
|
||||
__metadata("design:type", Number)
|
||||
], Configuracion.prototype, "id", void 0);
|
||||
__decorate([
|
||||
typeorm_1.Column(),
|
||||
__metadata("design:type", String)
|
||||
], Configuracion.prototype, "nombre", void 0);
|
||||
__decorate([
|
||||
typeorm_1.Column(),
|
||||
__metadata("design:type", String)
|
||||
], Configuracion.prototype, "value", void 0);
|
||||
__decorate([
|
||||
typeorm_1.UpdateDateColumn(),
|
||||
__metadata("design:type", Date)
|
||||
], Configuracion.prototype, "updatedAt", void 0);
|
||||
__decorate([
|
||||
typeorm_1.CreateDateColumn(),
|
||||
__metadata("design:type", Date)
|
||||
], Configuracion.prototype, "createdAt", void 0);
|
||||
Configuracion = __decorate([
|
||||
typeorm_1.Entity()
|
||||
], Configuracion);
|
||||
exports.Configuracion = Configuracion;
|
||||
//# sourceMappingURL=Configuracion.js.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"Configuracion.js","sourceRoot":"","sources":["../../src/entity/Configuracion.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,qCAMgB;AAGhB,IAAa,aAAa,GAA1B,MAAa,aAAa;CAezB,CAAA;AAbC;IADC,gCAAsB,EAAE;;yCACf;AAGV;IADC,gBAAM,EAAE;;6CACK;AAGd;IADC,gBAAM,EAAE;;4CACI;AAGb;IADC,0BAAgB,EAAE;8BACR,IAAI;gDAAA;AAGf;IADC,0BAAgB,EAAE;8BACR,IAAI;gDAAA;AAdJ,aAAa;IADzB,gBAAM,EAAE;GACI,aAAa,CAezB;AAfY,sCAAa"}
|
||||
Vendored
-69
@@ -1,69 +0,0 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const typeorm_1 = require("typeorm");
|
||||
const Carrito_1 = require("./Carrito");
|
||||
const Prestamo_1 = require("./Prestamo");
|
||||
const Log_1 = require("./Log");
|
||||
const class_validator_1 = require("class-validator");
|
||||
let Equipo = class Equipo {
|
||||
};
|
||||
__decorate([
|
||||
typeorm_1.PrimaryGeneratedColumn(),
|
||||
__metadata("design:type", Number)
|
||||
], Equipo.prototype, "id", void 0);
|
||||
__decorate([
|
||||
typeorm_1.Column(),
|
||||
class_validator_1.IsString(),
|
||||
__metadata("design:type", String)
|
||||
], Equipo.prototype, "noSerie", void 0);
|
||||
__decorate([
|
||||
typeorm_1.Column(),
|
||||
class_validator_1.IsString(),
|
||||
__metadata("design:type", String)
|
||||
], Equipo.prototype, "noInventario", void 0);
|
||||
__decorate([
|
||||
typeorm_1.Column(),
|
||||
class_validator_1.IsNumber(),
|
||||
__metadata("design:type", Number)
|
||||
], Equipo.prototype, "alias", void 0);
|
||||
__decorate([
|
||||
typeorm_1.Column({ type: 'boolean', default: false }),
|
||||
class_validator_1.IsBoolean(),
|
||||
__metadata("design:type", Boolean)
|
||||
], Equipo.prototype, "activo", void 0);
|
||||
__decorate([
|
||||
typeorm_1.Column(),
|
||||
typeorm_1.CreateDateColumn(),
|
||||
__metadata("design:type", Date)
|
||||
], Equipo.prototype, "createdAt", void 0);
|
||||
__decorate([
|
||||
typeorm_1.Column(),
|
||||
typeorm_1.UpdateDateColumn(),
|
||||
__metadata("design:type", Date)
|
||||
], Equipo.prototype, "updatedAt", void 0);
|
||||
__decorate([
|
||||
typeorm_1.ManyToOne((type) => Carrito_1.Carrito, (carrito) => carrito.equipos),
|
||||
__metadata("design:type", Carrito_1.Carrito)
|
||||
], Equipo.prototype, "carrito", void 0);
|
||||
__decorate([
|
||||
typeorm_1.OneToMany((type) => Prestamo_1.Prestamo, (prestamo) => prestamo.equipo),
|
||||
__metadata("design:type", Array)
|
||||
], Equipo.prototype, "prestamos", void 0);
|
||||
__decorate([
|
||||
typeorm_1.ManyToOne((type) => Log_1.Log, (log) => log.equipo),
|
||||
__metadata("design:type", Array)
|
||||
], Equipo.prototype, "logs", void 0);
|
||||
Equipo = __decorate([
|
||||
typeorm_1.Entity()
|
||||
], Equipo);
|
||||
exports.Equipo = Equipo;
|
||||
//# sourceMappingURL=Equipo.js.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"Equipo.js","sourceRoot":"","sources":["../../src/entity/Equipo.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,qCAQgB;AAChB,uCAAmC;AACnC,yCAAqC;AACrC,+BAA2B;AAC3B,qDAA+D;AAG/D,IAAa,MAAM,GAAnB,MAAa,MAAM;CA6ClB,CAAA;AA3CC;IADC,gCAAsB,EAAE;;kCACf;AAIV;IAFC,gBAAM,EAAE;IACR,0BAAQ,EAAE;;uCACI;AAIf;IAFC,gBAAM,EAAE;IACR,0BAAQ,EAAE;;4CACS;AAIpB;IAFC,gBAAM,EAAE;IACR,0BAAQ,EAAE;;qCACE;AAIb;IAFC,gBAAM,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC3C,2BAAS,EAAE;;sCACG;AAIf;IAFC,gBAAM,EAAE;IACR,0BAAgB,EAAE;8BACR,IAAI;yCAAA;AAIf;IAFC,gBAAM,EAAE;IACR,0BAAgB,EAAE;8BACR,IAAI;yCAAA;AAMf;IAJC,mBAAS,CACR,CAAC,IAAI,EAAE,EAAE,CAAC,iBAAO,EACjB,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAC7B;8BACQ,iBAAO;uCAAA;AAMhB;IAJC,mBAAS,CACR,CAAC,IAAI,EAAE,EAAE,CAAC,mBAAQ,EAClB,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,MAAM,CAC9B;;yCACoB;AAMrB;IAJC,mBAAS,CACR,CAAC,IAAI,EAAE,EAAE,CAAC,SAAG,EACb,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CACpB;;oCACU;AA5CA,MAAM;IADlB,gBAAM,EAAE;GACI,MAAM,CA6ClB;AA7CY,wBAAM"}
|
||||
Vendored
-32
@@ -1,32 +0,0 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const typeorm_1 = require("typeorm");
|
||||
const Prestamo_1 = require("./Prestamo");
|
||||
let Horario = class Horario {
|
||||
};
|
||||
__decorate([
|
||||
typeorm_1.PrimaryGeneratedColumn(),
|
||||
__metadata("design:type", String)
|
||||
], Horario.prototype, "id", void 0);
|
||||
__decorate([
|
||||
typeorm_1.Column(),
|
||||
__metadata("design:type", String)
|
||||
], Horario.prototype, "hora", void 0);
|
||||
__decorate([
|
||||
typeorm_1.OneToMany((type) => Prestamo_1.Prestamo, (prestamo) => prestamo.horario),
|
||||
__metadata("design:type", Array)
|
||||
], Horario.prototype, "prestamos", void 0);
|
||||
Horario = __decorate([
|
||||
typeorm_1.Entity()
|
||||
], Horario);
|
||||
exports.Horario = Horario;
|
||||
//# sourceMappingURL=Horario.js.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"Horario.js","sourceRoot":"","sources":["../../src/entity/Horario.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,qCAA2E;AAC3E,yCAAqC;AAGrC,IAAa,OAAO,GAApB,MAAa,OAAO;CAYnB,CAAA;AAVC;IADC,gCAAsB,EAAE;;mCACf;AAGV;IADC,gBAAM,EAAE;;qCACG;AAMZ;IAJC,mBAAS,CACR,CAAC,IAAI,EAAE,EAAE,CAAC,mBAAQ,EAClB,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,OAAO,CAC/B;;0CACoB;AAXV,OAAO;IADnB,gBAAM,EAAE;GACI,OAAO,CAYnB;AAZY,0BAAO"}
|
||||
Vendored
-54
@@ -1,54 +0,0 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const typeorm_1 = require("typeorm");
|
||||
const Usuario_1 = require("./Usuario");
|
||||
const Operador_1 = require("./Operador");
|
||||
const Equipo_1 = require("./Equipo");
|
||||
let Log = class Log {
|
||||
};
|
||||
__decorate([
|
||||
typeorm_1.PrimaryGeneratedColumn(),
|
||||
__metadata("design:type", Number)
|
||||
], Log.prototype, "id", void 0);
|
||||
__decorate([
|
||||
typeorm_1.Column(),
|
||||
__metadata("design:type", String)
|
||||
], Log.prototype, "accion", void 0);
|
||||
__decorate([
|
||||
typeorm_1.Column({ default: false }),
|
||||
__metadata("design:type", String)
|
||||
], Log.prototype, "multa", void 0);
|
||||
__decorate([
|
||||
typeorm_1.UpdateDateColumn(),
|
||||
__metadata("design:type", Date)
|
||||
], Log.prototype, "updateAt", void 0);
|
||||
__decorate([
|
||||
typeorm_1.CreateDateColumn(),
|
||||
__metadata("design:type", Date)
|
||||
], Log.prototype, "createAt", void 0);
|
||||
__decorate([
|
||||
typeorm_1.ManyToOne((type) => Usuario_1.Usuario, (usuario) => usuario.logs),
|
||||
__metadata("design:type", Usuario_1.Usuario)
|
||||
], Log.prototype, "usuario", void 0);
|
||||
__decorate([
|
||||
typeorm_1.ManyToOne((type) => Operador_1.Operador, (operador) => operador.logs),
|
||||
__metadata("design:type", Operador_1.Operador)
|
||||
], Log.prototype, "operador", void 0);
|
||||
__decorate([
|
||||
typeorm_1.ManyToOne((type) => Equipo_1.Equipo, (equipo) => equipo.logs),
|
||||
__metadata("design:type", Equipo_1.Equipo)
|
||||
], Log.prototype, "equipo", void 0);
|
||||
Log = __decorate([
|
||||
typeorm_1.Entity()
|
||||
], Log);
|
||||
exports.Log = Log;
|
||||
//# sourceMappingURL=Log.js.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"Log.js","sourceRoot":"","sources":["../../src/entity/Log.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,qCAOgB;AAChB,uCAAmC;AACnC,yCAAqC;AACrC,qCAAiC;AAGjC,IAAa,GAAG,GAAhB,MAAa,GAAG;CAiCf,CAAA;AA/BC;IADC,gCAAsB,EAAE;;+BACf;AAGV;IADC,gBAAM,EAAE;;mCACK;AAGd;IADC,gBAAM,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;kCACd;AAGb;IADC,0BAAgB,EAAE;8BACT,IAAI;qCAAA;AAGd;IADC,0BAAgB,EAAE;8BACT,IAAI;qCAAA;AAMd;IAJC,mBAAS,CACR,CAAC,IAAI,EAAE,EAAE,CAAC,iBAAO,EACjB,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAC1B;8BACQ,iBAAO;oCAAA;AAMhB;IAJC,mBAAS,CACR,CAAC,IAAI,EAAE,EAAE,CAAC,mBAAQ,EAClB,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAC5B;8BACS,mBAAQ;qCAAA;AAMlB;IAJC,mBAAS,CACR,CAAC,IAAI,EAAE,EAAE,CAAC,eAAM,EAChB,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CACxB;8BACO,eAAM;mCAAA;AAhCH,GAAG;IADf,gBAAM,EAAE;GACI,GAAG,CAiCf;AAjCY,kBAAG"}
|
||||
Vendored
-25
@@ -1,25 +0,0 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const typeorm_1 = require("typeorm");
|
||||
const Catalogo_1 = require("./Catalogo");
|
||||
const Reservacion_1 = require("./Reservacion");
|
||||
let Lugar = class Lugar extends Catalogo_1.Catalogo {
|
||||
};
|
||||
__decorate([
|
||||
typeorm_1.OneToMany((type) => Reservacion_1.Reservacion, (reservacion) => reservacion.lugar),
|
||||
__metadata("design:type", Array)
|
||||
], Lugar.prototype, "reservaciones", void 0);
|
||||
Lugar = __decorate([
|
||||
typeorm_1.Entity()
|
||||
], Lugar);
|
||||
exports.Lugar = Lugar;
|
||||
//# sourceMappingURL=Lugar.js.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"Lugar.js","sourceRoot":"","sources":["../../src/entity/Lugar.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,qCAA2C;AAC3C,yCAAqC;AACrC,+CAA2C;AAG3C,IAAa,KAAK,GAAlB,MAAa,KAAM,SAAQ,mBAAQ;CAMlC,CAAA;AADC;IAJC,mBAAS,CACR,CAAC,IAAI,EAAE,EAAE,CAAC,yBAAW,EACrB,CAAC,WAAW,EAAE,EAAE,CAAC,WAAW,CAAC,KAAK,CACnC;;4CAC4B;AALlB,KAAK;IADjB,gBAAM,EAAE;GACI,KAAK,CAMjB;AANY,sBAAK"}
|
||||
Vendored
-37
@@ -1,37 +0,0 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const typeorm_1 = require("typeorm");
|
||||
const Catalogo_1 = require("./Catalogo");
|
||||
const Prestamo_1 = require("./Prestamo");
|
||||
let Mesa = class Mesa extends Catalogo_1.Catalogo {
|
||||
};
|
||||
__decorate([
|
||||
typeorm_1.Column({ default: false }),
|
||||
__metadata("design:type", Boolean)
|
||||
], Mesa.prototype, "activo", void 0);
|
||||
__decorate([
|
||||
typeorm_1.UpdateDateColumn(),
|
||||
__metadata("design:type", Date)
|
||||
], Mesa.prototype, "updatedAt", void 0);
|
||||
__decorate([
|
||||
typeorm_1.CreateDateColumn(),
|
||||
__metadata("design:type", Date)
|
||||
], Mesa.prototype, "createdAt", void 0);
|
||||
__decorate([
|
||||
typeorm_1.OneToMany((type) => Prestamo_1.Prestamo, (prestamo) => prestamo.mesa),
|
||||
__metadata("design:type", Array)
|
||||
], Mesa.prototype, "prestamos", void 0);
|
||||
Mesa = __decorate([
|
||||
typeorm_1.Entity()
|
||||
], Mesa);
|
||||
exports.Mesa = Mesa;
|
||||
//# sourceMappingURL=Mesa.js.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"Mesa.js","sourceRoot":"","sources":["../../src/entity/Mesa.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,qCAMgB;AAChB,yCAAqC;AACrC,yCAAqC;AAGrC,IAAa,IAAI,GAAjB,MAAa,IAAK,SAAQ,mBAAQ;CAejC,CAAA;AAbC;IADC,gBAAM,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;oCACZ;AAGf;IADC,0BAAgB,EAAE;8BACR,IAAI;uCAAA;AAGf;IADC,0BAAgB,EAAE;8BACR,IAAI;uCAAA;AAMf;IAJC,mBAAS,CACR,CAAC,IAAI,EAAE,EAAE,CAAC,mBAAQ,EAClB,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAC5B;;uCACoB;AAdV,IAAI;IADhB,gBAAM,EAAE;GACI,IAAI,CAehB;AAfY,oBAAI"}
|
||||
Vendored
-71
@@ -1,71 +0,0 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const typeorm_1 = require("typeorm");
|
||||
const bcrypt = require("bcrypt");
|
||||
const Log_1 = require("./Log");
|
||||
const class_validator_1 = require("class-validator");
|
||||
const Prestamo_1 = require("./Prestamo");
|
||||
let Operador = class Operador {
|
||||
hashPassword() {
|
||||
this.secreto = bcrypt.hashSync(this.secreto, 10);
|
||||
}
|
||||
checkIfUnencryptedPasswordIsValid(unencryptedPassword) {
|
||||
return bcrypt.compareSync(unencryptedPassword, this.secreto);
|
||||
}
|
||||
};
|
||||
__decorate([
|
||||
typeorm_1.PrimaryGeneratedColumn(),
|
||||
__metadata("design:type", Number)
|
||||
], Operador.prototype, "id", void 0);
|
||||
__decorate([
|
||||
typeorm_1.Column(),
|
||||
class_validator_1.IsString(),
|
||||
__metadata("design:type", String)
|
||||
], Operador.prototype, "usuario", void 0);
|
||||
__decorate([
|
||||
typeorm_1.Column(),
|
||||
class_validator_1.IsString(),
|
||||
__metadata("design:type", String)
|
||||
], Operador.prototype, "secreto", void 0);
|
||||
__decorate([
|
||||
typeorm_1.Column(),
|
||||
class_validator_1.IsBoolean(),
|
||||
__metadata("design:type", Boolean)
|
||||
], Operador.prototype, "admin", void 0);
|
||||
__decorate([
|
||||
typeorm_1.Column(),
|
||||
typeorm_1.UpdateDateColumn(),
|
||||
__metadata("design:type", Date)
|
||||
], Operador.prototype, "updatedAt", void 0);
|
||||
__decorate([
|
||||
typeorm_1.Column(),
|
||||
typeorm_1.CreateDateColumn(),
|
||||
__metadata("design:type", Date)
|
||||
], Operador.prototype, "createdAt", void 0);
|
||||
__decorate([
|
||||
typeorm_1.OneToMany((type) => Log_1.Log, (log) => log.operador),
|
||||
__metadata("design:type", Array)
|
||||
], Operador.prototype, "logs", void 0);
|
||||
__decorate([
|
||||
typeorm_1.OneToMany((type) => Prestamo_1.Prestamo, (prestamo) => prestamo.operadorEntrega),
|
||||
__metadata("design:type", Array)
|
||||
], Operador.prototype, "entregas", void 0);
|
||||
__decorate([
|
||||
typeorm_1.OneToMany((type) => Prestamo_1.Prestamo, (prestamo) => prestamo.operadorRegreso),
|
||||
__metadata("design:type", Array)
|
||||
], Operador.prototype, "regresos", void 0);
|
||||
Operador = __decorate([
|
||||
typeorm_1.Entity(),
|
||||
typeorm_1.Unique(['usuario'])
|
||||
], Operador);
|
||||
exports.Operador = Operador;
|
||||
//# sourceMappingURL=Operador.js.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"Operador.js","sourceRoot":"","sources":["../../src/entity/Operador.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,qCAQgB;AAChB,iCAAgC;AAChC,+BAA2B;AAC3B,qDAAqD;AACrD,yCAAqC;AAIrC,IAAa,QAAQ,GAArB,MAAa,QAAQ;IA0CnB,YAAY;QACV,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,CAAC,CAAA;IAClD,CAAC;IAED,iCAAiC,CAAE,mBAA2B;QAC5D,OAAO,MAAM,CAAC,WAAW,CAAC,mBAAmB,EAAE,IAAI,CAAC,OAAO,CAAC,CAAA;IAC9D,CAAC;CACF,CAAA;AA/CC;IADC,gCAAsB,EAAE;;oCACf;AAIV;IAFC,gBAAM,EAAE;IACR,0BAAQ,EAAE;;yCACI;AAIf;IAFC,gBAAM,EAAE;IACR,0BAAQ,EAAE;;yCACI;AAIf;IAFC,gBAAM,EAAE;IACR,2BAAS,EAAE;;uCACE;AAId;IAFC,gBAAM,EAAE;IACR,0BAAgB,EAAE;8BACR,IAAI;2CAAA;AAIf;IAFC,gBAAM,EAAE;IACR,0BAAgB,EAAE;8BACR,IAAI;2CAAA;AAMf;IAJC,mBAAS,CACR,CAAC,IAAI,EAAE,EAAE,CAAC,SAAG,EACb,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,CACtB;;sCACU;AAMX;IAJC,mBAAS,CACR,CAAC,IAAI,EAAE,EAAE,CAAC,mBAAQ,EAClB,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,eAAe,CACvC;;0CACmB;AAMpB;IAJC,mBAAS,CACR,CAAC,IAAI,EAAE,EAAE,CAAC,mBAAQ,EAClB,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,eAAe,CACvC;;0CACmB;AAxCT,QAAQ;IAFpB,gBAAM,EAAE;IACR,gBAAM,CAAC,CAAC,SAAS,CAAC,CAAC;GACP,QAAQ,CAiDpB;AAjDY,4BAAQ"}
|
||||
Vendored
-25
@@ -1,25 +0,0 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const typeorm_1 = require("typeorm");
|
||||
const Catalogo_1 = require("./Catalogo");
|
||||
const Reporte_1 = require("./Reporte");
|
||||
let Parte = class Parte extends Catalogo_1.Catalogo {
|
||||
};
|
||||
__decorate([
|
||||
typeorm_1.OneToMany((type) => Reporte_1.Reporte, (reporte) => reporte.parte),
|
||||
__metadata("design:type", Array)
|
||||
], Parte.prototype, "reportes", void 0);
|
||||
Parte = __decorate([
|
||||
typeorm_1.Entity()
|
||||
], Parte);
|
||||
exports.Parte = Parte;
|
||||
//# sourceMappingURL=Parte.js.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"Parte.js","sourceRoot":"","sources":["../../src/entity/Parte.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,qCAA2C;AAC3C,yCAAqC;AACrC,uCAAmC;AAGnC,IAAa,KAAK,GAAlB,MAAa,KAAM,SAAQ,mBAAQ;CAMlC,CAAA;AADC;IAJC,mBAAS,CACR,CAAC,IAAI,EAAE,EAAE,CAAC,iBAAO,EACjB,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAC3B;;uCACkB;AALR,KAAK;IADjB,gBAAM,EAAE;GACI,KAAK,CAMjB;AANY,sBAAK"}
|
||||
Vendored
-70
@@ -1,70 +0,0 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const typeorm_1 = require("typeorm");
|
||||
const Usuario_1 = require("./Usuario");
|
||||
const Reporte_1 = require("./Reporte");
|
||||
const Equipo_1 = require("./Equipo");
|
||||
const Mesa_1 = require("./Mesa");
|
||||
const Operador_1 = require("./Operador");
|
||||
const Horario_1 = require("./Horario");
|
||||
let Prestamo = class Prestamo {
|
||||
};
|
||||
__decorate([
|
||||
typeorm_1.PrimaryGeneratedColumn(),
|
||||
__metadata("design:type", Number)
|
||||
], Prestamo.prototype, "id", void 0);
|
||||
__decorate([
|
||||
typeorm_1.Column({ default: false }),
|
||||
__metadata("design:type", Boolean)
|
||||
], Prestamo.prototype, "activo", void 0);
|
||||
__decorate([
|
||||
typeorm_1.Column({ default: true }),
|
||||
__metadata("design:type", Boolean)
|
||||
], Prestamo.prototype, "reservado", void 0);
|
||||
__decorate([
|
||||
typeorm_1.UpdateDateColumn(),
|
||||
__metadata("design:type", Date)
|
||||
], Prestamo.prototype, "updatedAt", void 0);
|
||||
__decorate([
|
||||
typeorm_1.CreateDateColumn(),
|
||||
__metadata("design:type", Date)
|
||||
], Prestamo.prototype, "createdAt", void 0);
|
||||
__decorate([
|
||||
typeorm_1.ManyToOne((type) => Usuario_1.Usuario, (usuario) => usuario.prestamos),
|
||||
__metadata("design:type", Usuario_1.Usuario)
|
||||
], Prestamo.prototype, "usuario", void 0);
|
||||
__decorate([
|
||||
typeorm_1.ManyToOne((type) => Mesa_1.Mesa, (mesa) => mesa.prestamos),
|
||||
__metadata("design:type", Mesa_1.Mesa)
|
||||
], Prestamo.prototype, "mesa", void 0);
|
||||
__decorate([
|
||||
typeorm_1.ManyToOne((type) => Reporte_1.Reporte, (reporte) => reporte.prestamos),
|
||||
__metadata("design:type", Reporte_1.Reporte)
|
||||
], Prestamo.prototype, "reporte", void 0);
|
||||
__decorate([
|
||||
typeorm_1.ManyToOne((type) => Equipo_1.Equipo, (equipo) => equipo.prestamos),
|
||||
__metadata("design:type", Equipo_1.Equipo)
|
||||
], Prestamo.prototype, "equipo", void 0);
|
||||
__decorate([
|
||||
typeorm_1.ManyToOne((type) => Operador_1.Operador, (operador) => operador.entregas),
|
||||
__metadata("design:type", Operador_1.Operador)
|
||||
], Prestamo.prototype, "operadorEntrega", void 0);
|
||||
__decorate([
|
||||
typeorm_1.ManyToOne((type) => Operador_1.Operador, (operador) => operador.regresos),
|
||||
typeorm_1.ManyToOne((type) => Horario_1.Horario, (horario) => horario.prestamos),
|
||||
__metadata("design:type", Horario_1.Horario)
|
||||
], Prestamo.prototype, "horario", void 0);
|
||||
Prestamo = __decorate([
|
||||
typeorm_1.Entity()
|
||||
], Prestamo);
|
||||
exports.Prestamo = Prestamo;
|
||||
//# sourceMappingURL=Prestamo.js.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"Prestamo.js","sourceRoot":"","sources":["../../src/entity/Prestamo.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,qCAOgB;AAChB,uCAAmC;AACnC,uCAAmC;AACnC,qCAAiC;AACjC,iCAA6B;AAC7B,yCAAqC;AACrC,uCAAmC;AAGnC,IAAa,QAAQ,GAArB,MAAa,QAAQ;CA6DpB,CAAA;AA3DC;IADC,gCAAsB,EAAE;;oCACf;AAGV;IADC,gBAAM,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;wCACZ;AAGf;IADC,gBAAM,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;2CACR;AAGlB;IADC,0BAAgB,EAAE;8BACR,IAAI;2CAAA;AAGf;IADC,0BAAgB,EAAE;8BACR,IAAI;2CAAA;AAUf;IAJC,mBAAS,CACR,CAAC,IAAI,EAAE,EAAE,CAAC,iBAAO,EACjB,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,SAAS,CAC/B;8BACQ,iBAAO;yCAAA;AAMhB;IAJC,mBAAS,CACR,CAAC,IAAI,EAAE,EAAE,CAAC,WAAI,EACd,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CACzB;8BACK,WAAI;sCAAA;AAMV;IAJC,mBAAS,CACR,CAAC,IAAI,EAAE,EAAE,CAAC,iBAAO,EACjB,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,SAAS,CAC/B;8BACQ,iBAAO;yCAAA;AAMhB;IAJC,mBAAS,CACR,CAAC,IAAI,EAAE,EAAE,CAAC,eAAM,EAChB,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,CAC7B;8BACO,eAAM;wCAAA;AAMd;IAJC,mBAAS,CACR,CAAC,IAAI,EAAE,EAAE,CAAC,mBAAQ,EAClB,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAChC;8BACgB,mBAAQ;iDAAA;AAUzB;IARC,mBAAS,CACR,CAAC,IAAI,EAAE,EAAE,CAAC,mBAAQ,EAClB,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAChC;IACA,mBAAS,CACR,CAAC,IAAI,EAAE,EAAE,CAAC,iBAAO,EACjB,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,SAAS,CAC/B;8BACQ,iBAAO;yCAAA;AA1DL,QAAQ;IADpB,gBAAM,EAAE;GACI,QAAQ,CA6DpB;AA7DY,4BAAQ"}
|
||||
Vendored
-46
@@ -1,46 +0,0 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const typeorm_1 = require("typeorm");
|
||||
const Parte_1 = require("./Parte");
|
||||
const Reservacion_1 = require("./Reservacion");
|
||||
const Prestamo_1 = require("./Prestamo");
|
||||
let Reporte = class Reporte {
|
||||
};
|
||||
__decorate([
|
||||
typeorm_1.PrimaryGeneratedColumn(),
|
||||
__metadata("design:type", Number)
|
||||
], Reporte.prototype, "id", void 0);
|
||||
__decorate([
|
||||
typeorm_1.Column(),
|
||||
__metadata("design:type", Number)
|
||||
], Reporte.prototype, "equipos", void 0);
|
||||
__decorate([
|
||||
typeorm_1.Column(),
|
||||
__metadata("design:type", String)
|
||||
], Reporte.prototype, "descripcion", void 0);
|
||||
__decorate([
|
||||
typeorm_1.ManyToOne((type) => Parte_1.Parte, (parte) => parte.reportes),
|
||||
__metadata("design:type", Parte_1.Parte)
|
||||
], Reporte.prototype, "parte", void 0);
|
||||
__decorate([
|
||||
typeorm_1.OneToMany((type) => Reservacion_1.Reservacion, (reservacion) => reservacion.reporte),
|
||||
__metadata("design:type", Array)
|
||||
], Reporte.prototype, "reservaciones", void 0);
|
||||
__decorate([
|
||||
typeorm_1.OneToMany((type) => Prestamo_1.Prestamo, (prestamo) => prestamo.reporte),
|
||||
__metadata("design:type", Array)
|
||||
], Reporte.prototype, "prestamos", void 0);
|
||||
Reporte = __decorate([
|
||||
typeorm_1.Entity()
|
||||
], Reporte);
|
||||
exports.Reporte = Reporte;
|
||||
//# sourceMappingURL=Reporte.js.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"Reporte.js","sourceRoot":"","sources":["../../src/entity/Reporte.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,qCAMgB;AAChB,mCAA+B;AAC/B,+CAA2C;AAC3C,yCAAqC;AAGrC,IAAa,OAAO,GAApB,MAAa,OAAO;CA2BnB,CAAA;AAzBC;IADC,gCAAsB,EAAE;;mCACf;AAGV;IADC,gBAAM,EAAE;;wCACM;AAGf;IADC,gBAAM,EAAE;;4CACU;AAMnB;IAJC,mBAAS,CACR,CAAC,IAAI,EAAE,EAAE,CAAC,aAAK,EACf,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAC1B;8BACM,aAAK;sCAAA;AAMZ;IAJC,mBAAS,CACR,CAAC,IAAI,EAAE,EAAE,CAAC,yBAAW,EACrB,CAAC,WAAW,EAAE,EAAE,CAAC,WAAW,CAAC,OAAO,CACrC;;8CAC2B;AAM5B;IAJC,mBAAS,CACR,CAAC,IAAI,EAAE,EAAE,CAAC,mBAAQ,EAClB,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,OAAO,CAC/B;;0CACoB;AA1BV,OAAO;IADnB,gBAAM,EAAE;GACI,OAAO,CA2BnB;AA3BY,0BAAO"}
|
||||
Vendored
-77
@@ -1,77 +0,0 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const typeorm_1 = require("typeorm");
|
||||
const Actividad_1 = require("./Actividad");
|
||||
const Adscripcion_1 = require("./Adscripcion");
|
||||
const Lugar_1 = require("./Lugar");
|
||||
const Carrito_1 = require("./Carrito");
|
||||
const Reporte_1 = require("./Reporte");
|
||||
const Usuario_1 = require("./Usuario");
|
||||
let Reservacion = class Reservacion {
|
||||
};
|
||||
__decorate([
|
||||
typeorm_1.PrimaryGeneratedColumn(),
|
||||
__metadata("design:type", Number)
|
||||
], Reservacion.prototype, "id", void 0);
|
||||
__decorate([
|
||||
typeorm_1.Column({ type: 'date' }),
|
||||
__metadata("design:type", String)
|
||||
], Reservacion.prototype, "fechaInicio", void 0);
|
||||
__decorate([
|
||||
typeorm_1.Column({ type: 'date' }),
|
||||
__metadata("design:type", String)
|
||||
], Reservacion.prototype, "fechaFin", void 0);
|
||||
__decorate([
|
||||
typeorm_1.Column(),
|
||||
__metadata("design:type", String)
|
||||
], Reservacion.prototype, "descripcion", void 0);
|
||||
__decorate([
|
||||
typeorm_1.Column({ type: 'boolean' }),
|
||||
__metadata("design:type", Boolean)
|
||||
], Reservacion.prototype, "uso", void 0);
|
||||
__decorate([
|
||||
typeorm_1.Column({ type: 'boolean' }),
|
||||
__metadata("design:type", Boolean)
|
||||
], Reservacion.prototype, "cancelado", void 0);
|
||||
__decorate([
|
||||
typeorm_1.Column({ type: 'boolean' }),
|
||||
__metadata("design:type", Boolean)
|
||||
], Reservacion.prototype, "aceptado", void 0);
|
||||
__decorate([
|
||||
typeorm_1.ManyToOne((type) => Actividad_1.Actividad, (actividad) => actividad.reservaciones),
|
||||
__metadata("design:type", Actividad_1.Actividad)
|
||||
], Reservacion.prototype, "actividad", void 0);
|
||||
__decorate([
|
||||
typeorm_1.ManyToOne((type) => Adscripcion_1.Adscripcion, (adscripcion) => adscripcion.reservaciones),
|
||||
__metadata("design:type", Adscripcion_1.Adscripcion)
|
||||
], Reservacion.prototype, "adscripcion", void 0);
|
||||
__decorate([
|
||||
typeorm_1.ManyToOne((type) => Lugar_1.Lugar, (lugar) => lugar.reservaciones),
|
||||
__metadata("design:type", Lugar_1.Lugar)
|
||||
], Reservacion.prototype, "lugar", void 0);
|
||||
__decorate([
|
||||
typeorm_1.ManyToOne((type) => Carrito_1.Carrito, (carrito) => carrito.reservaciones),
|
||||
__metadata("design:type", Carrito_1.Carrito)
|
||||
], Reservacion.prototype, "carrito", void 0);
|
||||
__decorate([
|
||||
typeorm_1.ManyToOne((type) => Reporte_1.Reporte, (reporte) => reporte.reservaciones),
|
||||
__metadata("design:type", Reporte_1.Reporte)
|
||||
], Reservacion.prototype, "reporte", void 0);
|
||||
__decorate([
|
||||
typeorm_1.ManyToOne((type) => Usuario_1.Usuario, (reporte) => reporte.reservaciones),
|
||||
__metadata("design:type", Usuario_1.Usuario)
|
||||
], Reservacion.prototype, "usuario", void 0);
|
||||
Reservacion = __decorate([
|
||||
typeorm_1.Entity()
|
||||
], Reservacion);
|
||||
exports.Reservacion = Reservacion;
|
||||
//# sourceMappingURL=Reservacion.js.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"Reservacion.js","sourceRoot":"","sources":["../../src/entity/Reservacion.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,qCAA2E;AAC3E,2CAAuC;AACvC,+CAA2C;AAC3C,mCAA+B;AAC/B,uCAAmC;AACnC,uCAAmC;AACnC,uCAAmC;AAGnC,IAAa,WAAW,GAAxB,MAAa,WAAW;CAyDvB,CAAA;AAvDC;IADC,gCAAsB,EAAE;;uCACf;AAGV;IADC,gBAAM,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;gDACN;AAGnB;IADC,gBAAM,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;6CACT;AAGhB;IADC,gBAAM,EAAE;;gDACU;AAGnB;IADC,gBAAM,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;wCAChB;AAGZ;IADC,gBAAM,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;8CACV;AAGlB;IADC,gBAAM,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;6CACX;AAMjB;IAJC,mBAAS,CACR,CAAC,IAAI,EAAE,EAAE,CAAC,qBAAS,EACnB,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,aAAa,CACvC;8BACU,qBAAS;8CAAA;AAMpB;IAJC,mBAAS,CACR,CAAC,IAAI,EAAE,EAAE,CAAC,yBAAW,EACrB,CAAC,WAAW,EAAE,EAAE,CAAC,WAAW,CAAC,aAAa,CAC3C;8BACY,yBAAW;gDAAA;AAMxB;IAJC,mBAAS,CACR,CAAC,IAAI,EAAE,EAAE,CAAC,aAAK,EACf,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,aAAa,CAC/B;8BACM,aAAK;0CAAA;AAMZ;IAJC,mBAAS,CACR,CAAC,IAAI,EAAE,EAAE,CAAC,iBAAO,EACjB,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,aAAa,CACnC;8BACQ,iBAAO;4CAAA;AAMhB;IAJC,mBAAS,CACR,CAAC,IAAI,EAAE,EAAE,CAAC,iBAAO,EACjB,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,aAAa,CACnC;8BACQ,iBAAO;4CAAA;AAMhB;IAJC,mBAAS,CACR,CAAC,IAAI,EAAE,EAAE,CAAC,iBAAO,EACjB,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,aAAa,CACnC;8BACQ,iBAAO;4CAAA;AAxDL,WAAW;IADvB,gBAAM,EAAE;GACI,WAAW,CAyDvB;AAzDY,kCAAW"}
|
||||
Vendored
-35
@@ -1,35 +0,0 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const typeorm_1 = require("typeorm");
|
||||
const Catalogo_1 = require("./Catalogo");
|
||||
const Carrito_1 = require("./Carrito");
|
||||
const class_validator_1 = require("class-validator");
|
||||
let Tipo = class Tipo extends Catalogo_1.Catalogo {
|
||||
};
|
||||
__decorate([
|
||||
typeorm_1.PrimaryGeneratedColumn(),
|
||||
__metadata("design:type", Number)
|
||||
], Tipo.prototype, "id", void 0);
|
||||
__decorate([
|
||||
typeorm_1.Column(),
|
||||
class_validator_1.IsString(),
|
||||
__metadata("design:type", String)
|
||||
], Tipo.prototype, "nombre", void 0);
|
||||
__decorate([
|
||||
typeorm_1.OneToMany((type) => Carrito_1.Carrito, (carrito) => carrito.tipo),
|
||||
__metadata("design:type", Array)
|
||||
], Tipo.prototype, "carritos", void 0);
|
||||
Tipo = __decorate([
|
||||
typeorm_1.Entity()
|
||||
], Tipo);
|
||||
exports.Tipo = Tipo;
|
||||
//# sourceMappingURL=Tipo.js.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"Tipo.js","sourceRoot":"","sources":["../../src/entity/Tipo.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,qCAA2E;AAC3E,yCAAqC;AACrC,uCAAmC;AACnC,qDAA0C;AAG1C,IAAa,IAAI,GAAjB,MAAa,IAAK,SAAQ,mBAAQ;CAajC,CAAA;AAXC;IADC,gCAAsB,EAAE;;gCACf;AAIV;IAFC,gBAAM,EAAE;IACR,0BAAQ,EAAE;;oCACG;AAMd;IAJC,mBAAS,CACR,CAAC,IAAI,EAAE,EAAE,CAAC,iBAAO,EACjB,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAC1B;;sCACkB;AAZR,IAAI;IADhB,gBAAM,EAAE;GACI,IAAI,CAahB;AAbY,oBAAI"}
|
||||
Vendored
-27
@@ -1,27 +0,0 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const typeorm_1 = require("typeorm");
|
||||
let TipoProblema = class TipoProblema {
|
||||
};
|
||||
__decorate([
|
||||
typeorm_1.PrimaryGeneratedColumn(),
|
||||
__metadata("design:type", Number)
|
||||
], TipoProblema.prototype, "id", void 0);
|
||||
__decorate([
|
||||
typeorm_1.Column(),
|
||||
__metadata("design:type", String)
|
||||
], TipoProblema.prototype, "nombre", void 0);
|
||||
TipoProblema = __decorate([
|
||||
typeorm_1.Entity()
|
||||
], TipoProblema);
|
||||
exports.TipoProblema = TipoProblema;
|
||||
//# sourceMappingURL=TipoProblema.js.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"TipoProblema.js","sourceRoot":"","sources":["../../src/entity/TipoProblema.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,qCAAgE;AAGhE,IAAa,YAAY,GAAzB,MAAa,YAAY;CAMxB,CAAA;AAJC;IADC,gCAAsB,EAAE;;wCACd;AAGX;IADC,gBAAM,EAAE;;4CACM;AALJ,YAAY;IADxB,gBAAM,EAAE;GACI,YAAY,CAMxB;AANY,oCAAY"}
|
||||
Vendored
-120
@@ -1,120 +0,0 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const bcrypt = require("bcrypt");
|
||||
const typeorm_1 = require("typeorm");
|
||||
const class_validator_1 = require("class-validator");
|
||||
const Reservacion_1 = require("./Reservacion");
|
||||
const Prestamo_1 = require("./Prestamo");
|
||||
const Log_1 = require("./Log");
|
||||
let Usuario = class Usuario {
|
||||
hashPassword() {
|
||||
this.secreto = bcrypt.hashSync(this.secreto, 10);
|
||||
}
|
||||
checkIfUnencryptedPasswordIsValid(unencryptedPassword) {
|
||||
return bcrypt.compareSync(unencryptedPassword, this.secreto);
|
||||
}
|
||||
};
|
||||
__decorate([
|
||||
typeorm_1.PrimaryGeneratedColumn(),
|
||||
__metadata("design:type", String)
|
||||
], Usuario.prototype, "id", void 0);
|
||||
__decorate([
|
||||
typeorm_1.Column(),
|
||||
class_validator_1.IsString(),
|
||||
__metadata("design:type", String)
|
||||
], Usuario.prototype, "nombre", void 0);
|
||||
__decorate([
|
||||
typeorm_1.Column(),
|
||||
class_validator_1.IsString(),
|
||||
__metadata("design:type", String)
|
||||
], Usuario.prototype, "apellidoPaterno", void 0);
|
||||
__decorate([
|
||||
typeorm_1.Column(),
|
||||
class_validator_1.IsString(),
|
||||
__metadata("design:type", String)
|
||||
], Usuario.prototype, "apellidoMaterno", void 0);
|
||||
__decorate([
|
||||
typeorm_1.Column(),
|
||||
class_validator_1.IsEmail(),
|
||||
__metadata("design:type", String)
|
||||
], Usuario.prototype, "correoAlternativo", void 0);
|
||||
__decorate([
|
||||
typeorm_1.Column(),
|
||||
class_validator_1.Length(10),
|
||||
__metadata("design:type", String)
|
||||
], Usuario.prototype, "numeroTelefonico", void 0);
|
||||
__decorate([
|
||||
typeorm_1.Column({ type: 'text' }),
|
||||
class_validator_1.IsString(),
|
||||
__metadata("design:type", String)
|
||||
], Usuario.prototype, "identificacion", void 0);
|
||||
__decorate([
|
||||
typeorm_1.Column(),
|
||||
class_validator_1.IsString(),
|
||||
__metadata("design:type", String)
|
||||
], Usuario.prototype, "institucion", void 0);
|
||||
__decorate([
|
||||
typeorm_1.Column(),
|
||||
class_validator_1.IsString(),
|
||||
__metadata("design:type", String)
|
||||
], Usuario.prototype, "secreto", void 0);
|
||||
__decorate([
|
||||
typeorm_1.Column({ type: 'date', default: '1996-11-07' }),
|
||||
class_validator_1.IsDate(),
|
||||
class_validator_1.IsOptional(),
|
||||
__metadata("design:type", String)
|
||||
], Usuario.prototype, "multa", void 0);
|
||||
__decorate([
|
||||
typeorm_1.Column({ type: 'date', default: '1996-11-07' }),
|
||||
class_validator_1.IsDate(),
|
||||
class_validator_1.IsOptional(),
|
||||
__metadata("design:type", String)
|
||||
], Usuario.prototype, "multaRed", void 0);
|
||||
__decorate([
|
||||
typeorm_1.Column({ default: false }),
|
||||
class_validator_1.IsBoolean(),
|
||||
class_validator_1.IsOptional(),
|
||||
__metadata("design:type", Boolean)
|
||||
], Usuario.prototype, "baja", void 0);
|
||||
__decorate([
|
||||
typeorm_1.Column({ default: false }),
|
||||
class_validator_1.IsBoolean(),
|
||||
__metadata("design:type", Boolean)
|
||||
], Usuario.prototype, "interno", void 0);
|
||||
__decorate([
|
||||
typeorm_1.Column(),
|
||||
typeorm_1.CreateDateColumn(),
|
||||
__metadata("design:type", Date)
|
||||
], Usuario.prototype, "createdAt", void 0);
|
||||
__decorate([
|
||||
typeorm_1.Column(),
|
||||
typeorm_1.UpdateDateColumn(),
|
||||
__metadata("design:type", Date)
|
||||
], Usuario.prototype, "updatedAt", void 0);
|
||||
__decorate([
|
||||
typeorm_1.OneToMany((type) => Reservacion_1.Reservacion, (reservacion) => reservacion.usuario),
|
||||
__metadata("design:type", Array)
|
||||
], Usuario.prototype, "reservaciones", void 0);
|
||||
__decorate([
|
||||
typeorm_1.OneToMany((type) => Prestamo_1.Prestamo, (prestamo) => prestamo.usuario),
|
||||
__metadata("design:type", Array)
|
||||
], Usuario.prototype, "prestamos", void 0);
|
||||
__decorate([
|
||||
typeorm_1.OneToMany((type) => Log_1.Log, (log) => log.usuario),
|
||||
__metadata("design:type", Array)
|
||||
], Usuario.prototype, "logs", void 0);
|
||||
Usuario = __decorate([
|
||||
typeorm_1.Entity(),
|
||||
typeorm_1.Unique(['id', 'correoAlternativo'])
|
||||
], Usuario);
|
||||
exports.Usuario = Usuario;
|
||||
//# sourceMappingURL=Usuario.js.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"Usuario.js","sourceRoot":"","sources":["../../src/entity/Usuario.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,iCAAgC;AAEhC,qCAQgB;AAChB,qDAOwB;AACxB,+CAA2C;AAC3C,yCAAqC;AACrC,+BAA2B;AAI3B,IAAa,OAAO,GAApB,MAAa,OAAO;IAmFlB,YAAY;QACV,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,CAAC,CAAA;IAClD,CAAC;IAED,iCAAiC,CAAE,mBAA2B;QAC5D,OAAO,MAAM,CAAC,WAAW,CAAC,mBAAmB,EAAE,IAAI,CAAC,OAAO,CAAC,CAAA;IAC9D,CAAC;CACF,CAAA;AAxFC;IADC,gCAAsB,EAAE;;mCACf;AAIV;IAFC,gBAAM,EAAE;IACR,0BAAQ,EAAE;;uCACG;AAId;IAFC,gBAAM,EAAE;IACR,0BAAQ,EAAE;;gDACY;AAIvB;IAFC,gBAAM,EAAE;IACR,0BAAQ,EAAE;;gDACY;AAIvB;IAFC,gBAAM,EAAE;IACR,yBAAO,EAAE;;kDACe;AAIzB;IAFC,gBAAM,EAAE;IACR,wBAAM,CAAC,EAAE,CAAC;;iDACa;AAIxB;IAFC,gBAAM,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IACxB,0BAAQ,EAAE;;+CACW;AAItB;IAFC,gBAAM,EAAE;IACR,0BAAQ,EAAE;;4CACQ;AAInB;IAFC,gBAAM,EAAE;IACR,0BAAQ,EAAE;;wCACI;AAKf;IAHC,gBAAM,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC;IAC/C,wBAAM,EAAE;IACR,4BAAU,EAAE;;sCACA;AAKb;IAHC,gBAAM,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC;IAC/C,wBAAM,EAAE;IACR,4BAAU,EAAE;;yCACG;AAKhB;IAHC,gBAAM,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC1B,2BAAS,EAAE;IACX,4BAAU,EAAE;;qCACA;AAIb;IAFC,gBAAM,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC1B,2BAAS,EAAE;;wCACI;AAIhB;IAFC,gBAAM,EAAE;IACR,0BAAgB,EAAE;8BACR,IAAI;0CAAA;AAIf;IAFC,gBAAM,EAAE;IACR,0BAAgB,EAAE;8BACR,IAAI;0CAAA;AAQf;IAJC,mBAAS,CACR,CAAC,IAAI,EAAE,EAAE,CAAC,yBAAW,EACrB,CAAC,WAAW,EAAE,EAAE,CAAC,WAAW,CAAC,OAAO,CACrC;;8CAC2B;AAM5B;IAJC,mBAAS,CACR,CAAC,IAAI,EAAE,EAAE,CAAC,mBAAQ,EAClB,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,OAAO,CAC/B;;0CACoB;AAMrB;IAJC,mBAAS,CACR,CAAC,IAAI,EAAE,EAAE,CAAC,SAAG,EACb,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,CACrB;;qCACU;AAjFA,OAAO;IAFnB,gBAAM,EAAE;IACR,gBAAM,CAAC,CAAC,IAAI,EAAE,mBAAmB,CAAC,CAAC;GACvB,OAAO,CA0FnB;AA1FY,0BAAO"}
|
||||
Vendored
-20
@@ -1,20 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const express = require("express");
|
||||
const bodyParser = require("body-parser");
|
||||
const index_1 = require("./routes/index");
|
||||
const typeorm_1 = require("typeorm");
|
||||
const cors = require("cors");
|
||||
const PORT = 3000;
|
||||
typeorm_1.createConnection()
|
||||
.then(async (connection) => {
|
||||
const app = express();
|
||||
app.use(cors());
|
||||
app.use(bodyParser.urlencoded({ extended: false }));
|
||||
app.use(bodyParser.json());
|
||||
app.get('/', (req, res) => res.send('Hello World!'));
|
||||
app.use('/', index_1.default);
|
||||
app.listen(PORT, () => console.log(`Example app listening at http://localhost:${PORT}`));
|
||||
})
|
||||
.catch((error) => console.log('TypeORM connection error: ', error));
|
||||
//# sourceMappingURL=index.js.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,mCAAkC;AAClC,0CAAyC;AACzC,0CAAmC;AACnC,qCAA0C;AAC1C,6BAA4B;AAE5B,MAAM,IAAI,GAAG,IAAI,CAAA;AACjB,0BAAgB,EAAE;KACf,IAAI,CAAC,KAAK,EAAE,UAAU,EAAE,EAAE;IACzB,MAAM,GAAG,GAAG,OAAO,EAAE,CAAA;IAErB,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAA;IACf,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC,CAAA;IACnD,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,CAAA;IAE1B,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAA;IAEpD,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,eAAM,CAAC,CAAA;IAEpB,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,EAAE,CACpB,OAAO,CAAC,GAAG,CAAC,6CAA6C,IAAI,EAAE,CAAC,CACjE,CAAA;AACH,CAAC,CAAC;KACD,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,4BAA4B,EAAE,KAAK,CAAC,CAAC,CAAA"}
|
||||
Vendored
-17
@@ -1,17 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const jwt = require("jsonwebtoken");
|
||||
const verificaToken = (req, res, next) => {
|
||||
const token = req.get('authorization');
|
||||
jwt.verify(token.split(' ')[1], 'Holabeb', (err, decoded) => {
|
||||
if (err) {
|
||||
return res.status(401).json({
|
||||
status: false,
|
||||
err: 'jsonwebtoken error'
|
||||
});
|
||||
}
|
||||
next();
|
||||
});
|
||||
};
|
||||
exports.default = verificaToken;
|
||||
//# sourceMappingURL=auth.js.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/middleware/auth.ts"],"names":[],"mappings":";;AAAA,oCAAmC;AAGnC,MAAM,aAAa,GAAG,CAAC,GAAY,EAAE,GAAa,EAAE,IAAkB,EAAE,EAAE;IACxE,MAAM,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,eAAe,CAAC,CAAA;IACtC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE;QAC1D,IAAI,GAAG,EAAE;YACP,OAAO,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;gBAC1B,MAAM,EAAE,KAAK;gBACb,GAAG,EAAE,oBAAoB;aAC1B,CAAC,CAAA;SACH;QACD,IAAI,EAAE,CAAA;IACR,CAAC,CAAC,CAAA;AACJ,CAAC,CAAA;AAED,kBAAe,aAAa,CAAA"}
|
||||
Vendored
-13
@@ -1,13 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const express_1 = require("express");
|
||||
const Carrito_1 = require("../controller/Carrito");
|
||||
const multer = require("multer");
|
||||
var upload = multer({ dest: 'uploads/' });
|
||||
const router = express_1.Router();
|
||||
router.post('/', upload.single('masiva'), (req, res) => {
|
||||
const carrito = new Carrito_1.CarritoController();
|
||||
carrito.carga(req, res);
|
||||
});
|
||||
exports.default = router;
|
||||
//# sourceMappingURL=carrito.js.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"carrito.js","sourceRoot":"","sources":["../../src/routes/carrito.ts"],"names":[],"mappings":";;AAAA,qCAAgC;AAChC,qDAA2D;AAC3D,iCAAgC;AAEhC,IAAI,MAAM,GAAG,MAAM,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAA;AACzC,MAAM,MAAM,GAAG,gBAAM,EAAE,CAAA;AAEvB,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;IACrD,MAAM,OAAO,GAAG,IAAI,2BAAiB,EAAE,CAAA;IACvC,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;AACzB,CAAC,CAAC,CAAA;AAEF,kBAAe,MAAM,CAAA"}
|
||||
Vendored
-8
@@ -1,8 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const express_1 = require("express");
|
||||
const Horario_1 = require("../controller/Horario");
|
||||
const router = express_1.Router();
|
||||
router.get('/', Horario_1.HorarioController.getAll);
|
||||
exports.default = router;
|
||||
//# sourceMappingURL=horario.js.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"horario.js","sourceRoot":"","sources":["../../src/routes/horario.ts"],"names":[],"mappings":";;AAAA,qCAAgC;AAChC,qDAA2D;AAC3D,MAAM,MAAM,GAAG,gBAAM,EAAE,CAAA;AAEvB,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,2BAAiB,CAAC,MAAM,CAAC,CAAA;AAEzC,kBAAe,MAAM,CAAA"}
|
||||
Vendored
-20
@@ -1,20 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const express_1 = require("express");
|
||||
const usuario_1 = require("./usuario");
|
||||
const operador_1 = require("./operador");
|
||||
const carrito_1 = require("./carrito");
|
||||
const prestamo_1 = require("./prestamo");
|
||||
const tipo_1 = require("./tipo");
|
||||
const reservacion_1 = require("./reservacion");
|
||||
const horario_1 = require("./horario");
|
||||
const routes = express_1.Router();
|
||||
routes.use('/operador', operador_1.default);
|
||||
routes.use('/usuario', usuario_1.default);
|
||||
routes.use('/carrito', carrito_1.default);
|
||||
routes.use('/prestamo', prestamo_1.default);
|
||||
routes.use('/tipo', tipo_1.default);
|
||||
routes.use('/reservacion', reservacion_1.default);
|
||||
routes.use('/horario', horario_1.default);
|
||||
exports.default = routes;
|
||||
//# sourceMappingURL=index.js.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/routes/index.ts"],"names":[],"mappings":";;AAAA,qCAAgC;AAEhC,uCAA+B;AAC/B,yCAAiC;AACjC,uCAA+B;AAC/B,yCAAiC;AACjC,iCAAyB;AACzB,+CAAuC;AACvC,uCAA+B;AAE/B,MAAM,MAAM,GAAG,gBAAM,EAAE,CAAA;AAEvB,MAAM,CAAC,GAAG,CAAC,WAAW,EAAE,kBAAQ,CAAC,CAAA;AACjC,MAAM,CAAC,GAAG,CAAC,UAAU,EAAE,iBAAO,CAAC,CAAA;AAC/B,MAAM,CAAC,GAAG,CAAC,UAAU,EAAE,iBAAO,CAAC,CAAA;AAC/B,MAAM,CAAC,GAAG,CAAC,WAAW,EAAE,kBAAQ,CAAC,CAAA;AACjC,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,cAAI,CAAC,CAAA;AACzB,MAAM,CAAC,GAAG,CAAC,cAAc,EAAE,qBAAW,CAAC,CAAA;AACvC,MAAM,CAAC,GAAG,CAAC,UAAU,EAAE,iBAAO,CAAC,CAAA;AAE/B,kBAAe,MAAM,CAAA"}
|
||||
Vendored
-11
@@ -1,11 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const express_1 = require("express");
|
||||
const Operador_1 = require("../controller/Operador");
|
||||
const router = express_1.Router();
|
||||
router.post('/', Operador_1.OperadorController.create);
|
||||
router.get('/', Operador_1.OperadorController.getAll);
|
||||
router.get('/:id([0-9]+)', Operador_1.OperadorController.getOne);
|
||||
router.delete('/:id([0-9]+)', Operador_1.OperadorController.remove);
|
||||
exports.default = router;
|
||||
//# sourceMappingURL=operador.js.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"operador.js","sourceRoot":"","sources":["../../src/routes/operador.ts"],"names":[],"mappings":";;AAAA,qCAAgC;AAEhC,uDAA6D;AAE7D,MAAM,MAAM,GAAG,gBAAM,EAAE,CAAA;AAEvB,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,6BAAkB,CAAC,MAAM,CAAC,CAAA;AAE3C,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,6BAAkB,CAAC,MAAM,CAAC,CAAA;AAE1C,MAAM,CAAC,GAAG,CAAC,cAAc,EAAE,6BAAkB,CAAC,MAAM,CAAC,CAAA;AAErD,MAAM,CAAC,MAAM,CAAC,cAAc,EAAE,6BAAkB,CAAC,MAAM,CAAC,CAAA;AAExD,kBAAe,MAAM,CAAA"}
|
||||
Vendored
-12
@@ -1,12 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const express_1 = require("express");
|
||||
const Prestamo_1 = require("../controller/Prestamo");
|
||||
const router = express_1.Router();
|
||||
router.post('/', Prestamo_1.PrestamoController.crear);
|
||||
router.put('/regreso', Prestamo_1.PrestamoController.regreso);
|
||||
router.put('/confirmar', Prestamo_1.PrestamoController.confirmar);
|
||||
router.get('/estatus', Prestamo_1.PrestamoController.estatus);
|
||||
router.put('/cancelar', Prestamo_1.PrestamoController.cancelar);
|
||||
exports.default = router;
|
||||
//# sourceMappingURL=prestamo.js.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"prestamo.js","sourceRoot":"","sources":["../../src/routes/prestamo.ts"],"names":[],"mappings":";;AAAA,qCAAgC;AAChC,uDAA6D;AAC7D,MAAM,MAAM,GAAG,gBAAM,EAAE,CAAA;AAEvB,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,6BAAkB,CAAC,KAAK,CAAC,CAAA;AAC1C,MAAM,CAAC,GAAG,CAAC,UAAU,EAAE,6BAAkB,CAAC,OAAO,CAAC,CAAA;AAClD,MAAM,CAAC,GAAG,CAAC,YAAY,EAAE,6BAAkB,CAAC,SAAS,CAAC,CAAA;AACtD,MAAM,CAAC,GAAG,CAAC,UAAU,EAAE,6BAAkB,CAAC,OAAO,CAAC,CAAA;AAClD,MAAM,CAAC,GAAG,CAAC,WAAW,EAAE,6BAAkB,CAAC,QAAQ,CAAC,CAAA;AAEpD,kBAAe,MAAM,CAAA"}
|
||||
Vendored
-10
@@ -1,10 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const express_1 = require("express");
|
||||
const Reservacion_1 = require("../controller/Reservacion");
|
||||
const router = express_1.Router();
|
||||
router.post('/', Reservacion_1.ResevacionController.reservar);
|
||||
router.get('/espacios', Reservacion_1.ResevacionController.espaciosDisponibles);
|
||||
router.put('/confirmar', Reservacion_1.ResevacionController.confirmar);
|
||||
exports.default = router;
|
||||
//# sourceMappingURL=reservacion.js.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"reservacion.js","sourceRoot":"","sources":["../../src/routes/reservacion.ts"],"names":[],"mappings":";;AAAA,qCAAgC;AAChC,6DAAkE;AAElE,MAAM,MAAM,GAAG,gBAAM,EAAE,CAAA;AAEvB,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,kCAAoB,CAAC,QAAQ,CAAC,CAAA;AAC/C,MAAM,CAAC,GAAG,CAAC,WAAW,EAAE,kCAAoB,CAAC,mBAAmB,CAAC,CAAA;AACjE,MAAM,CAAC,GAAG,CAAC,YAAY,EAAE,kCAAoB,CAAC,SAAS,CAAC,CAAA;AAExD,kBAAe,MAAM,CAAA"}
|
||||
Vendored
-8
@@ -1,8 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const express_1 = require("express");
|
||||
const Tipo_1 = require("../controller/Tipo");
|
||||
const router = express_1.Router();
|
||||
router.get('/', Tipo_1.TipoController.getAll);
|
||||
exports.default = router;
|
||||
//# sourceMappingURL=tipo.js.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"tipo.js","sourceRoot":"","sources":["../../src/routes/tipo.ts"],"names":[],"mappings":";;AAAA,qCAAgC;AAChC,+CAAqD;AAErD,MAAM,MAAM,GAAG,gBAAM,EAAE,CAAA;AAEvB,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,qBAAc,CAAC,MAAM,CAAC,CAAA;AAEtC,kBAAe,MAAM,CAAA"}
|
||||
Vendored
-15
@@ -1,15 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const express_1 = require("express");
|
||||
const Usuario_1 = require("../controller/Usuario");
|
||||
const multer = require("multer");
|
||||
const auth_1 = require("../middleware/auth");
|
||||
var upload = multer({ dest: 'uploads/identifiaciones' });
|
||||
const router = express_1.Router();
|
||||
router.post('/', upload.single('identificacion'), Usuario_1.UsuarioController.create);
|
||||
router.post('/login', Usuario_1.UsuarioController.login);
|
||||
router.get('/', [auth_1.default], Usuario_1.UsuarioController.getAll);
|
||||
router.get('/:id([0-9]+)', Usuario_1.UsuarioController.getOne);
|
||||
router.get('/verifica/:id([0-9]+)', Usuario_1.UsuarioController.verificar);
|
||||
exports.default = router;
|
||||
//# sourceMappingURL=usuario.js.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"usuario.js","sourceRoot":"","sources":["../../src/routes/usuario.ts"],"names":[],"mappings":";;AAAA,qCAAgC;AAChC,qDAA2D;AAC3D,iCAAgC;AAChC,+CAAgD;AAEhD,IAAI,MAAM,GAAG,MAAM,CAAC,EAAE,IAAI,EAAE,yBAAyB,EAAE,CAAC,CAAA;AACxD,MAAM,MAAM,GAAG,gBAAM,EAAE,CAAA;AAEvB,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC,EAAE,2BAAiB,CAAC,MAAM,CAAC,CAAA;AAE3E,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,2BAAiB,CAAC,KAAK,CAAC,CAAA;AAE9C,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,cAAa,CAAC,EAAE,2BAAiB,CAAC,MAAM,CAAC,CAAA;AAE1D,MAAM,CAAC,GAAG,CAAC,cAAc,EAAE,2BAAiB,CAAC,MAAM,CAAC,CAAA;AAEpD,MAAM,CAAC,GAAG,CAAC,uBAAuB,EAAE,2BAAiB,CAAC,SAAS,CAAC,CAAA;AAEhE,kBAAe,MAAM,CAAA"}
|
||||
+21
-33
@@ -189,11 +189,11 @@ export class UsuarioController {
|
||||
},
|
||||
{
|
||||
cuenta: 1,
|
||||
nombre: "Fernando",
|
||||
nombre: "Andres",
|
||||
apellidoPaterno: "Martinez",
|
||||
apellidoMaterno: "Ramirez",
|
||||
institucion: "Facultad de Ciencias",
|
||||
carrera: "Matematicas",
|
||||
institucion: "Facultad de Química",
|
||||
carrera: "Ing. Química",
|
||||
tipoUsuario: {
|
||||
id: 1,
|
||||
nombre: "alumno_interno",
|
||||
@@ -201,11 +201,11 @@ export class UsuarioController {
|
||||
},
|
||||
{
|
||||
cuenta: 12,
|
||||
nombre: "Fernando",
|
||||
apellidoPaterno: "Martinez",
|
||||
nombre: "Andrea",
|
||||
apellidoPaterno: "Del Valle",
|
||||
apellidoMaterno: "Ramirez",
|
||||
institucion: "Facultad de Ciencias",
|
||||
carrera: "Matematicas",
|
||||
institucion: "Facultad de Psicología",
|
||||
carrera: "Psicología",
|
||||
tipoUsuario: {
|
||||
id: 2,
|
||||
nombre: "alumno_externo",
|
||||
@@ -213,11 +213,11 @@ export class UsuarioController {
|
||||
},
|
||||
{
|
||||
cuenta: 123,
|
||||
nombre: "Fernando",
|
||||
apellidoPaterno: "Martinez",
|
||||
apellidoMaterno: "Ramirez",
|
||||
institucion: "Facultad de Ciencias",
|
||||
carrera: "Matematicas",
|
||||
nombre: "Leticia",
|
||||
apellidoPaterno: "Cruz",
|
||||
apellidoMaterno: "Garcia",
|
||||
institucion: "Facultad de Derecho",
|
||||
carrera: "Derecho",
|
||||
tipoUsuario: {
|
||||
id: 3,
|
||||
nombre: "profesor_interno",
|
||||
@@ -235,18 +235,6 @@ export class UsuarioController {
|
||||
nombre: "profesor_interno",
|
||||
},
|
||||
},
|
||||
{
|
||||
cuenta: 313109593,
|
||||
nombre: "Saul",
|
||||
apellidoPaterno: "Hernandez",
|
||||
apellidoMaterno: "Juarez",
|
||||
institucion: "FES Acatlan",
|
||||
carrera: "Actuario",
|
||||
tipoUsuario: {
|
||||
id: 1,
|
||||
nombre: "alumno_interno",
|
||||
},
|
||||
},
|
||||
{
|
||||
cuenta: 316313528,
|
||||
nombre: "Lemuel Helon",
|
||||
@@ -255,20 +243,20 @@ export class UsuarioController {
|
||||
institucion: "FES Acatlan",
|
||||
carrera: "MAC",
|
||||
tipoUsuario: {
|
||||
id: 2,
|
||||
nombre: "alumno_externo",
|
||||
id: 3,
|
||||
nombre: "profesor_interno",
|
||||
},
|
||||
},
|
||||
{
|
||||
cuenta: 420090670,
|
||||
nombre: "Jocelyn",
|
||||
apellidoPaterno: "Vaca",
|
||||
apellidoMaterno: "Zepeda",
|
||||
cuenta: 808684,
|
||||
nombre: "Fernando Israel",
|
||||
apellidoPaterno: "González",
|
||||
apellidoMaterno: "Trejo",
|
||||
institucion: "FES Acatlan",
|
||||
carrera: "Ciencias Politicas",
|
||||
carrera: "MAC",
|
||||
tipoUsuario: {
|
||||
id: 2,
|
||||
nombre: "alumno_externo",
|
||||
id: 3,
|
||||
nombre: "profesor_interno",
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user