package io.crowdcode.flaschenlager.user.model;

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

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

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

    @Id
    private Long id;

    @Version
    private Long version;

    @NotNull
    private String name;

    @NotNull
    @Column(unique = true)
    private String email;

    @NotNull
    private String password;

}

@@ -190,16 +190,57 @@
 Entity;%0A
+import javax.persistence.GeneratedValue;%0A
 import j
@@ -418,16 +418,36 @@
     @Id%0A
+    @GeneratedValue%0A
     priv

add generated primary key