fix(model): 🏷️ Fix relationships model e tipi per istanze
This commit is contained in:
parent
db1c31f9a2
commit
5c98d91178
|
@ -5,7 +5,7 @@ import {
|
||||||
import {snakeCase} from 'lodash';
|
import {snakeCase} from 'lodash';
|
||||||
|
|
||||||
export interface InstantiableModel<T extends Model> {
|
export interface InstantiableModel<T extends Model> {
|
||||||
new (): Model | T;
|
new (): (Model | T) & {[prop: string]: any};
|
||||||
}
|
}
|
||||||
|
|
||||||
export type IModel<T extends Model = Model> = InstanceType<InstantiableModel<T>>;
|
export type IModel<T extends Model = Model> = InstanceType<InstantiableModel<T>>;
|
||||||
|
@ -14,8 +14,8 @@ export type IModel<T extends Model = Model> = InstanceType<InstantiableModel<T>>
|
||||||
* The base model for all models.
|
* The base model for all models.
|
||||||
*/
|
*/
|
||||||
export abstract class Model extends BaseModel {
|
export abstract class Model extends BaseModel {
|
||||||
jsonApiType: string = '';
|
public static relationships: string[] = [];
|
||||||
[prop: string]: any;
|
protected jsonApiType: string = '';
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
|
|
Loading…
Reference in New Issue