From 6d9cf147e4d17111e0ef3eb3a22ba2cb113710b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Gonz=C3=A1lez=20Liarte?= Date: Tue, 27 Feb 2024 15:43:48 +0100 Subject: [PATCH 1/2] Add Permission entity model --- .../eps/softarch/demo/domain/Permission.java | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/main/java/cat/udl/eps/softarch/demo/domain/Permission.java diff --git a/src/main/java/cat/udl/eps/softarch/demo/domain/Permission.java b/src/main/java/cat/udl/eps/softarch/demo/domain/Permission.java new file mode 100644 index 0000000..0e9e3e3 --- /dev/null +++ b/src/main/java/cat/udl/eps/softarch/demo/domain/Permission.java @@ -0,0 +1,21 @@ +package cat.udl.eps.softarch.demo.domain; + +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Entity +@Data +@EqualsAndHashCode(callSuper = false) +public class Permission { + + @Id + private Long id; + + @NotNull + @NotBlank + private String Permission; +} From 3b4441db155f656f7d7528d6514d10fe0cda5f96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Gonz=C3=A1lez=20Liarte?= Date: Tue, 27 Feb 2024 15:46:52 +0100 Subject: [PATCH 2/2] Fix attribute name --- src/main/java/cat/udl/eps/softarch/demo/domain/Permission.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/cat/udl/eps/softarch/demo/domain/Permission.java b/src/main/java/cat/udl/eps/softarch/demo/domain/Permission.java index 0e9e3e3..53e4c36 100644 --- a/src/main/java/cat/udl/eps/softarch/demo/domain/Permission.java +++ b/src/main/java/cat/udl/eps/softarch/demo/domain/Permission.java @@ -17,5 +17,5 @@ public class Permission { @NotNull @NotBlank - private String Permission; + private String name; }