src/main/java/de/uapcore/lightpit/entities/Project.java

changeset 37
fecda0f466e6
child 38
cf85ef18f231
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/main/java/de/uapcore/lightpit/entities/Project.java	Sun May 10 10:58:31 2020 +0200
@@ -0,0 +1,73 @@
+package de.uapcore.lightpit.entities;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+public class Project {
+
+    private final int id;
+    private String name;
+    private String description;
+    private String repoUrl;
+    private User owner;
+
+    private final List<Version> versions = new ArrayList<>();
+
+    public Project(int id) {
+        this.id = id;
+    }
+
+    public int getId() {
+        return id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public String getRepoUrl() {
+        return repoUrl;
+    }
+
+    public void setRepoUrl(String repoUrl) {
+        this.repoUrl = repoUrl;
+    }
+
+    public User getOwner() {
+        return owner;
+    }
+
+    public void setOwner(User owner) {
+        this.owner = owner;
+    }
+
+    public List<Version> getVersions() {
+        return versions;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+        Project project = (Project) o;
+        return id == project.id;
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(id);
+    }
+}

mercurial