UNPKG

@xompass/sdk-cloud-api

Version:

Xompass Client for cloud-api

122 lines (116 loc) 2.73 kB
import {ModelDefinition} from './BaseModels'; import {Log} from './Log'; declare var Object: any; export interface DatasourceStorageErrorInterface { model?: string; method?: string; datasourceName?: string; container?: string; file?: string; content?: any; created?: Date; modified?: Date; deleted?: Date; id?: any; trackingLogs?: Log[]; } export class DatasourceStorageError implements DatasourceStorageErrorInterface { model: string; method: string; datasourceName: string; container: string; file: string; content: any; created: Date; modified: Date; deleted: Date; id: any; trackingLogs?: Log[]; constructor(data?: DatasourceStorageErrorInterface) { Object.assign(this, data); } /** * The name of the model represented by this $resource, * i.e. `DatasourceStorageError`. */ public static getModelName(): string { return 'DatasourceStorageError'; } /** * @method factory * @author Jonathan Casarrubias * @license MIT * This method creates an instance of DatasourceStorageError for dynamic purposes. */ public static factory(data: DatasourceStorageErrorInterface): DatasourceStorageError{ return new DatasourceStorageError(data); } /** * @method getModelDefinition * @author Julien Ledun * @license MIT * This method returns an object that represents some of the model * definitions. */ public static getModelDefinition(): ModelDefinition { return { name: 'DatasourceStorageError', plural: 'DatasourceStorageErrors', path: 'DatasourceStorageErrors', idName: 'id', properties: { model: { name: 'model', type: 'string' }, method: { name: 'method', type: 'string' }, datasourceName: { name: 'datasourceName', type: 'string' }, container: { name: 'container', type: 'string' }, file: { name: 'file', type: 'string' }, content: { name: 'content', type: 'any' }, created: { name: 'created', type: 'Date' }, modified: { name: 'modified', type: 'Date' }, deleted: { name: 'deleted', type: 'Date', default: undefined }, id: { name: 'id', type: 'any' }, }, relations: { trackingLogs: { name: 'trackingLogs', type: 'Log[]', model: 'Log', relationType: 'hasMany', keyFrom: 'id', keyTo: 'trackingModelId' }, } }; } }