declare type ModelPath = string

export async function modelTableName(model: Model | ModelPath): Promise<string> {
  if (typeof model === 'string') {
    model = (await import(model)).default as Model
  }

  return model.table ?? snakeCase(plural(model?.name || ''))
}
export declare function getModelName(model: Model, modelPath: string): string;
export declare function getTableName(model: Model, modelPath: string): TableNames;
export declare function getPivotTableName(formattedModelName: string, modelRelationTable: string): string;
export declare function hasRelations(obj: any, key: string): boolean;
export declare function getRelationType(relation: string): string;
export declare function getRelationCount(relation: string): string;
export declare function getHiddenAttributes(attributes: AttributesElements | undefined): string[];
export declare function getGuardedAttributes(model: Model): string[];
export declare function getFillableAttributes(model: Model, otherModelRelations: RelationConfig[]): string[];
declare function parseRule(rule: string): FieldArrayElement | null;
export declare function mapEntity(attribute: ModelElement): string | undefined;
export declare function findCoreModel(modelName: string): string;
export declare function findUserModel(modelName: string): string;
export declare function formatDate(date: Date): string;