diff --git a/src/main/java/com/hithomelabs/CFTunnels/Entity/User.java b/src/main/java/com/hithomelabs/CFTunnels/Entity/User.java index 5783357..eb1336b 100644 --- a/src/main/java/com/hithomelabs/CFTunnels/Entity/User.java +++ b/src/main/java/com/hithomelabs/CFTunnels/Entity/User.java @@ -1,4 +1,5 @@ package com.hithomelabs.CFTunnels.Entity; + import jakarta.persistence.*; import jakarta.validation.constraints.Size; import lombok.AllArgsConstructor; @@ -8,6 +9,26 @@ import lombok.Setter; import java.util.UUID; +/** + * JPA Entity representing a user in the system. + * + *
This entity stores user information synced from the OIDC provider + * during authentication. Users are assigned roles that determine their + * access levels to the API endpoints.
+ * + *Database Table: {@code users}
+ * + *Roles:
+ *This corresponds to the user's ID in the OIDC provider.
+ */ @Id @GeneratedValue @Column(columnDefinition = "uuid", insertable = false, updatable = false, nullable = false) private UUID id; + /** + * User's display name. + * + *This is typically the full name from the OIDC provider.
+ */ @Column(length = 50, nullable = false) @Size(max = 50) private String name; + /** + * User's email address. + * + *Used as the unique identifier for authentication + * and for associating users with their roles.
+ */ @Column(length = 50, nullable = false) @Size(max = 50) private String email; -} +} \ No newline at end of file