add label icons back-end (model and database)
This commit is contained in:
@@ -12,6 +12,7 @@ public class Label {
|
||||
@NotNull private User creator;
|
||||
@Nullable private Label parent;
|
||||
@NotNull private String color;
|
||||
@NotNull private String icon;
|
||||
|
||||
public void setParent(@Nullable Label parent) {
|
||||
this.parent = parent;
|
||||
@@ -57,6 +58,15 @@ public class Label {
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public String getIcon() {
|
||||
return icon;
|
||||
}
|
||||
|
||||
public void setIcon(@NotNull String icon) {
|
||||
this.icon = icon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
@@ -76,4 +86,5 @@ public class Label {
|
||||
result = 31 * result + (parent != null ? parent.hashCode() : 0);
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -65,10 +65,18 @@ public class RestLabel {
|
||||
label.setColor(color);
|
||||
}
|
||||
|
||||
public void setIcon(@NotNull final String icon) {
|
||||
label.setIcon(icon);
|
||||
}
|
||||
|
||||
@Nullable public String getColor() {
|
||||
return label.getColor();
|
||||
}
|
||||
|
||||
@Nullable public String getIcon() {
|
||||
return label.getIcon();
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Label getDelegated() {
|
||||
return label;
|
||||
|
@@ -11,6 +11,7 @@
|
||||
</id>
|
||||
<property name="title"/>
|
||||
<property name="color"/>
|
||||
<property name="icon"/>
|
||||
<many-to-one name="parent" column="parent_label_id" not-null="false"/>
|
||||
<many-to-one name="creator" column="creator_id" unique="true" not-null="false" lazy="proxy"/>
|
||||
</class>
|
||||
|
Reference in New Issue
Block a user