mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-08 09:24:18 +01:00
19 lines
475 B
TypeScript
19 lines
475 B
TypeScript
import {Repository} from "../repository/repository";
|
|
|
|
export class PartRepository {
|
|
|
|
readonly id: string;
|
|
readonly repo: Repository;
|
|
readonly partsPath: string;
|
|
|
|
constructor(id: string, repo: Repository, partsPath: string) {
|
|
this.id = id;
|
|
this.repo = repo;
|
|
this.partsPath = partsPath;
|
|
}
|
|
|
|
readPartResource = (partId: string, resourceName: string) => {
|
|
return this.repo.get(this.partsPath + '/' + partId + '/' + partId + '.' + resourceName);
|
|
}
|
|
|
|
}
|