Skip to content

Commit

Permalink
added model store skeleton
Browse files Browse the repository at this point in the history
  • Loading branch information
niksoc-hi committed Feb 10, 2019
1 parent cf9e6ec commit f1f4b79
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 4 deletions.
8 changes: 8 additions & 0 deletions src/AllocationManager.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { DeveloperStore } from './DeveloperStore';


class AllocationManager {
private developerStore: DeveloperStore;
private projectStore: ProjectStore;

}
3 changes: 1 addition & 2 deletions src/Developer.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
class Developer {
id: number;
class Developer extends Model {
name: string;
knownTechnologies: string[];
}
3 changes: 3 additions & 0 deletions src/Model.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
class Model {
id: number;
}
19 changes: 19 additions & 0 deletions src/ModelStore.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
export class ModelStore<M extends Model> {
private data: M[];

getById(id: number): M {
}

filter(predicate: (obj: M) => boolean): M[] {
}

add(obj: M): void {
}

remove(id: number): void {
}

update(obj: M): void {
}

}
3 changes: 1 addition & 2 deletions src/Project.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
class Project {
id: number;
class Project extends Model {
name: string;
requiredTechnologies: string[];
}

0 comments on commit f1f4b79

Please sign in to comment.