1
0
Fork 0
mirror of https://codeberg.org/beerbrawl/beerbrawl.git synced 2024-09-23 05:40:51 +02:00

feat(#8): backend/entity: make username unique per user

Signed-off-by: Christoph Heiss <e11907069@student.tuwien.ac.at>
This commit is contained in:
Christoph Heiss 2024-05-10 18:49:55 +02:00
parent 3ddd0ade6e
commit 23a0c89f3e
Signed by: c8h4
GPG key ID: 73D5E7FDEE3DE49A

View file

@ -1,6 +1,6 @@
package at.ac.tuwien.sepr.groupphase.backend.entity;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
@ -14,6 +14,7 @@ public class ApplicationUser {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Column(unique = true)
private String username;
private String password;
private Boolean admin;