Skip to content

Commit

Permalink
Mod license, url. Map license. Game, map, map version, mod, modversio…
Browse files Browse the repository at this point in the history
…n game review summary average score
  • Loading branch information
bukajsytlos authored and Brutus5000 committed Jun 12, 2023
1 parent f5a7832 commit 4a3facc
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package com.faforever.commons.api.dto;

import com.faforever.commons.api.elide.ElideEntity;
import com.github.jasminb.jsonapi.annotations.Id;
import com.github.jasminb.jsonapi.annotations.Type;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

@Data
@ToString(onlyExplicitlyIncluded = true)
@EqualsAndHashCode(onlyExplicitlyIncluded = true)
@Type("license")
public class License implements ElideEntity {

@Id
@ToString.Include
@EqualsAndHashCode.Include
private String id;
private String name;
private String shortName;
private String url;
private String licenseText;
private boolean active;
private boolean revocable;
private boolean redistributable;
private boolean modifiable;
}

Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,7 @@ public class Map extends AbstractEntity<Map> {

@Relationship("reviewsSummary")
private MapReviewsSummary mapReviewsSummary;

@Relationship("license")
private License license;
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public class Mod extends AbstractEntity<Mod> {
private String displayName;
@ToString.Include
private String author;
private String repositoryUrl;

@Relationship("uploader")
@ToString.Include
Expand All @@ -31,4 +32,7 @@ public class Mod extends AbstractEntity<Mod> {

@Relationship("reviewsSummary")
private ModReviewsSummary modReviewsSummary;

@Relationship("license")
private License license;
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.jetbrains.annotations.Nullable;

@Data
@ToString(onlyExplicitlyIncluded = true)
Expand All @@ -19,5 +20,6 @@ public class ReviewsSummary implements ElideEntity {
private float score;
private int reviews;
private float lowerBound;

@Nullable
private Float averageScore;
}

0 comments on commit 4a3facc

Please sign in to comment.