import {Model as BaseModel, PluralResponse} from 'coloquent'; import {snakeCase} from 'lodash-es'; export default class Model extends BaseModel { /** * Just an alias to the get() method */ static all(): Promise>> { return this.get(); } getAttribute(attributeName: string): any { return super.getAttribute(attributeName); } getJsonApiBaseUrl(): string { return '/api'; } getJsonApiType(): string { return (super.getJsonApiType() ?? snakeCase(this.constructor.name)); } }