import { HasManyModel } from '../models'; import { BaseRequestModelInterface } from '../interfaces'; export function hasMany({ urlPath, classProp, }: { urlPath: string; classProp: string; }) { return function _DecoratorName( constr: C, ) { return class extends constr { constructor(...args: any[]) { super(...args); this[classProp] = new HasManyModel({ parent: >(this), targetPath: urlPath, }); } }; }; }