@coko/server
Version:
Reusable server for use by Coko's projects
38 lines • 973 B
TypeScript
import BaseModel, { TrxOption } from '../base.model';
type ImageMetadata = {
id?: string;
density?: number;
height: number;
space?: string;
width: number;
};
type StoredObject = {
id?: string;
extension: string;
imageMetadata?: ImageMetadata;
key: string;
mimetype: string | false;
size: number;
type: string;
};
declare class File extends BaseModel {
alt: string;
caption: string;
meta: object;
name: string;
objectId: string;
storedObjects: StoredObject[];
referenceId: string;
tags: string[];
uploadStatus: string;
constructor();
static get tableName(): string;
static get schema(): object;
ensureIds(): void;
$beforeInsert(): void;
$beforeUpdate(): void;
static getEntityFiles(objectId: string, options?: TrxOption): Promise<File[]>;
getStoredObjectBasedOnType(type: string): StoredObject;
}
export default File;
//# sourceMappingURL=file.model.d.ts.map