DROP TABLE IF EXISTS recibos;
CREATE TABLE recibos(
	id BIGINT AUTO_INCREMENT PRIMARY KEY NOT NULL,
	folio BIGINT UNIQUE NOT NULL,
	predio INT NOT NULL,
	usuario INT NOT NULL,
	uso INT NOT NULL,
	forma INT NOT NULL,
	metodo INT NOT NULL,
	convenio INT NOT NULL,
	referencia BLOB NULL,
	timbre BIGINT NULL,
	nota TEXT NULL,
	estado INT DEFAULT(11),
	registro DATETIME DEFAULT(NOW())
);


DROP TABLE IF EXISTS mantto;
CREATE TABLE mantto(
	recibo BIGINT NOT NULL,
	periodo DATE NOT NULL,
	cuota INT NOT NULL,
	descuento INT NOT NULL,
    indice float not null,
	recargo INT NOT NULL,
	pago DECIMAL(8,2) NOT NULL,
	estado VARCHAR(10) DEFAULT(''),
    registro datetime default(now())
);

DROP TABLE IF EXISTS servicio;
CREATE TABLE servicio(
	recibo BIGINT NOT NULL,
	concepto INT NOT NULL,
	cantidad INT NOT NULL
);
