z_validar_colunna_base_dados

This commit is contained in:
Luiz H. R. Silva 2024-06-18 14:23:18 -03:00
parent 4d5de45443
commit f6f39d2d86
21 changed files with 221 additions and 300 deletions

View file

@ -36,14 +36,25 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
}
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.enviar_registros = exports.zp_enviar_registros = void 0;
exports.enviar_registros = exports.zp_enviar_registros = exports.zp_registrar_base_dados = void 0;
var p_respostas_1 = require("p-respostas");
var zod_1 = require("zod");
var _variaveis_1 = require("./_variaveis");
exports.zp_registrar_base_dados = zod_1.z.object({
tabela: zod_1.z.string(),
colunas: zod_1.z.array(zod_1.z.object({
coluna: zod_1.z.string(),
tipo: _variaveis_1.z_tipo_coluna_base_dados,
})),
});
//enviar registros para base de dados
exports.zp_enviar_registros = zod_1.z.object({
tabela: zod_1.z.string(),
registros: zod_1.z.array(zod_1.z.any()),
registros: zod_1.z.array(zod_1.z.object({
coluna: zod_1.z.string(),
valor: zod_1.z.any(),
tipo: _variaveis_1.z_tipo_coluna_base_dados,
})),
});
var enviar_registros = function (_a) {
var emDesenvolvimento = _a.emDesenvolvimento, _b = _a.cliente, conta = _b.conta, produto = _b.produto, _c = _a.parametros, registros = _c.registros, tabela = _c.tabela;