import { HasOneInterface, BaseRequestModelInterface } from '../interfaces'; import { Id, Methods } from '../../types'; import { combineUrl } from '../../helpers'; type BelongsToOptions
= { parent: BaseRequestModelInterface
;
targetPath: string;
};
export class HasOneModel ;
targetPath: string;
constructor(options: BelongsToOptions ) {
this.parent = options.parent;
this.targetPath = options.targetPath;
this.get = this.get.bind(this);
this.post = this.post.bind(this);
}
async get(parentId: Id): Promise