refactor: Add licence field to Dataset constructor
This commit is contained in:
parent
fe4f0a8d6b
commit
6ae3a73a7e
@ -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() {
|
||||
|
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user