refactor: Add licence field to Dataset constructor

This commit is contained in:
Erik Foris 2024-07-05 12:19:47 +02:00
parent fe4f0a8d6b
commit 6ae3a73a7e
2 changed files with 3 additions and 2 deletions

View File

@ -50,7 +50,7 @@ public class Dataset {
@ManyToOne
private Category categorie;
public Dataset(String title, String abst, String description, String author, URL url, Category categories, Type type) {
public Dataset(String title, String abst, String description, String author, URL url, Category categories, Type type, String licence) {
this.raiting = 0;
this.votes = 0;
@ -63,6 +63,7 @@ public class Dataset {
setCategorie(categories);
setType(type);
setUrl(url);
setLicence(licence);
}
public Dataset() {

View File

@ -25,7 +25,7 @@ public class LoadDummyDatabase {
Category category = new Category("Category" + i);
log.info("Preloading" + categoryRepository.save(category));
Dataset dataset = new Dataset("Title" + i, "Abst" + i, "Description" + i, "Author" + i,null, category, Type.API);
Dataset dataset = new Dataset("Title" + i, "Abst" + i, "Description" + i, "Author" + i,null, category, Type.API, "MIT");
for (int j = 0; j < new Random().nextInt(50); j++) {
dataset.upvote();
}