/* eslint-disable @typescript-eslint/ban-types */ import { ColumnType } from './cassandra.interface'; import { CqlOperatorOptions } from './orm.interface'; export type ClusterOrder = { [KEY in keyof Entity]?: 'desc' | 'asc' }; type FilterOptions = Partial<{ [KEY in keyof Entity]: CqlOperatorOptions; }>; export interface EntityOptions { name?: string; table_name?: string; key: Array>; indexes?: Array | string[]; clustering_order?: ClusterOrder; materialized_views?: Record>; options?: { timestamps?: { createdAt?: string; updatedAt?: string; }; versions?: { key: string }; }; } export interface ExtendedEntityOptions extends EntityOptions { instanceMethods: unknown; classMethods: unknown; } export interface MaterializeViewOptions { key: Array>; select: Array; clustering_order?: ClusterOrder; filter?: FilterOptions; } export interface ColumnOptions { type?: ColumnType; typeDef?: string; default?: string | (() => string) | Function | { $db_function: string }; rule?: ColumnRuleOptions; } export interface ColumnRuleOptions { required?: boolean; } export type FunctionType = Function; export type ObjectType = Object; export type TargetType = Object; export type ColumnsType = Record;