_comuns/src/consulta.ts
2024-06-01 14:35:15 -03:00

28 lines
483 B
TypeScript

export enum operadores {
"=" = "=",
"!=" = "!=",
">" = ">",
">=" = ">=",
"<" = "<",
"<=" = "<=",
like = "like",
in = "in",
}
export type tipoFiltro = {
coluna: string
valor: any
operador: keyof typeof operadores | operadores
ou?: boolean
}
export type interfaceConsulta = {
offset?: number
limit?: number
filtros?: tipoFiltro[]
ordem?: string
ordemTipo?: "asc" | "desc"
colunas?: string[]
apenasConsulta?: boolean
apenasContagem?: boolean
}