package io.fourfinanceit.featuros.deployment;

import org.springframework.hateoas.Identifiable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import java.time.Instant;

@Entity
class Deployment implements Identifiable<Long> {

    @Id
    @GeneratedValue
    private Long id;

    private String name;

    private String product;

    @Column(name = "group_")
    private String group;

    private String version;

    private Instant date;

    /**
     * @deprecated persistence only
     */
    @Deprecated
    private Deployment() {
    }

    public Deployment(String name, String product, String group, String version, Instant date) {
        this.name = name;
        this.product = product;
        this.group = group;
        this.version = version;
        this.date = date;
    }

    @Override
    public Long getId() {
        return id;
    }

    public String getName() {
        return name;
    }

    public String getProduct() {
        return product;
    }

    public String getGroup() {
        return group;
    }

    public String getVersion() {
        return version;
    }

    public Instant getDate() {
        return date;
    }
}

@@ -40,16 +40,70 @@
 yment;%0A%0A
+import com.fasterxml.jackson.annotation.JsonRootName;%0A
 import o
@@ -307,16 +307,44 @@
 stant;%0A%0A
+@JsonRootName(%22deployment%22)%0A
 @Entity%0A

Add 'deployment' name for json root