From 9ef00cc0924b5bbcd1090d14aae3cf8f67b11009 Mon Sep 17 00:00:00 2001 From: Marcel Schwarz Date: Fri, 17 Apr 2020 18:02:57 +0200 Subject: [PATCH] Create User entity --- .../main/java/de/hft/geotime/user/User.java | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/backend/src/main/java/de/hft/geotime/user/User.java b/backend/src/main/java/de/hft/geotime/user/User.java index 85c6fd7..f697365 100644 --- a/backend/src/main/java/de/hft/geotime/user/User.java +++ b/backend/src/main/java/de/hft/geotime/user/User.java @@ -1,4 +1,30 @@ package de.hft.geotime.user; +import lombok.Data; + +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; + +@Data +@Entity public class User { + + @Id + @GeneratedValue(strategy = GenerationType.AUTO) + private long id; + private String username; + private String firstname; + private String lastname; + //TODO: roleid(FK) + //TODO: timetrackaccounts[List] + + protected User() { + } + + public User(String firstname, String lastname) { + this.firstname = firstname; + this.lastname = lastname; + } }