We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3cca2fb commit 288e6fcCopy full SHA for 288e6fc
src/Mooc/Courses/domain/Course.ts
@@ -0,0 +1,23 @@
1
+export default class Course {
2
+ private _id: string;
3
+ private _name: string;
4
+ private _duration: string;
5
+
6
+ constructor(id: string, name: string, duration: string) {
7
+ this._id = id;
8
+ this._name = name;
9
+ this._duration = duration;
10
+ }
11
12
+ get id(): string {
13
+ return this._id;
14
15
16
+ get name(): string {
17
+ return this._name;
18
19
20
+ get duration(): string {
21
+ return this._duration;
22
23
+}
src/Mooc/Courses/domain/CourseRepository.ts
@@ -0,0 +1,7 @@
+import Course from './Course';
+export default interface CourseRepository {
+ save(course: Course): Promise<void> | void;
+ search(id: string): Promise<Course> | Course;
0 commit comments