added example files

This commit is contained in:
2018-02-18 00:18:16 +01:00
parent 3654c08bc2
commit e5ae0c75cf
17 changed files with 342 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

12
dist/domain/models/Track.js vendored Normal file
View File

@@ -0,0 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Track = /** @class */ (function () {
function Track(id, title, artist, duration) {
this.Id = id;
this.Title = title;
this.Artist = artist;
this.Duration = duration;
}
return Track;
}());
exports.Track = Track;

2
dist/domain/ports/IMusicRepository.js vendored Normal file
View File

@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

View File

@@ -0,0 +1,24 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var MusicCatalogService = /** @class */ (function () {
function MusicCatalogService(repository) {
this.repository = repository;
}
MusicCatalogService.prototype.get = function () {
return this.repository.get();
};
MusicCatalogService.prototype.getById = function (id) {
return this.repository.getById(id);
};
MusicCatalogService.prototype.add = function (track) {
return this.repository.add(track);
};
MusicCatalogService.prototype.edit = function (id, track) {
return this.repository.edit(id, track);
};
MusicCatalogService.prototype.delete = function (id) {
return this.repository.delete(id);
};
return MusicCatalogService;
}());
exports.MusicCatalogService = MusicCatalogService;