import * as Knex from 'knex'; import { MapDataType, PartialBy } from './data_types'; import { AbstractCrudModel, Data } from './abstract_crud'; export declare enum AuthorType { PERSON = "person", ORGANISATION = "organisation", COLLECTIVE = "collective" } declare type RawAuthorType = 'o' | 'p' | 'c'; export declare type AuthorData = Data & { name: string; year?: string; type: AuthorType; authorityList?: string; }; declare const authorColumns: { readonly id: "author_id"; readonly name: "author_name"; readonly year: "author_year"; readonly type: "authority_type"; readonly authorityList: "auth_list"; readonly created: "input_date"; readonly updated: "last_update"; }; declare type TableOverrides = { 'author_id': number; 'authority_type': RawAuthorType; }; declare type RawAuthorData = MapDataType; export declare class Author extends AbstractCrudModel { constructor(db: Knex); protected toPartialRaw(data: Partial): Promise<{ author_id: number | undefined; author_year: string | undefined; author_name: string | undefined; authority_type: "p" | "o" | "c" | undefined; auth_list: string | undefined; }>; protected toRaw(data: PartialBy): Promise, "author_id">>; protected toData(data: RawAuthorData): Promise<{ id: number; name: string; year: string | undefined; authorityList: string | undefined; type: AuthorType; created: Date | undefined; updated: Date | undefined; }>; books(authorId: number): Promise; } export {};