package io.crowdcode.flaschenlager.stock.model;

import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Version;
import javax.validation.constraints.NotNull;

@Entity
@Getter
@Setter
@Accessors(chain = true)
public class Stock {

    @Id
    @GeneratedValue
    private Long id;

    @Version
    private Long version;

    @NotNull
    @Column(unique = true)
    private String name;
}

@@ -42,16 +42,49 @@
 model;%0A%0A
+import lombok.EqualsAndHashCode;%0A
 import l
@@ -115,24 +115,48 @@
 bok.Setter;%0A
+import lombok.ToString;%0A
 import lombo
@@ -447,16 +447,69 @@
 = true)%0A
+@EqualsAndHashCode(of = %7B%22id%22, %22version%22%7D)%0A@ToString%0A
 public c

add equals, hashcode, and toString to EntryQuantity