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';
|
||||
|
||||
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>>;
|
||||
|
@ -14,8 +14,8 @@ export type IModel<T extends Model = Model> = InstanceType<InstantiableModel<T>>
|
|||
* The base model for all models.
|
||||
*/
|
||||
export abstract class Model extends BaseModel {
|
||||
jsonApiType: string = '';
|
||||
[prop: string]: any;
|
||||
public static relationships: string[] = [];
|
||||
protected jsonApiType: string = '';
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
|
|
Loading…
Reference in New Issue