From c6b466530fc82ed3df8876ea9121128c8efe7a3e Mon Sep 17 00:00:00 2001 From: Dave the Dev Date: Tue, 14 Apr 2026 11:51:48 +0000 Subject: [PATCH] Hithomelabs/CFTunnels#114: Add JavaDoc to User entity --- .../hithomelabs/CFTunnels/Entity/User.java | 40 ++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) 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:

+ * + * + * @see Request + * @see Mapping + */ @Entity @Getter @Setter @@ -15,16 +36,33 @@ import java.util.UUID; @AllArgsConstructor @Table(name = "users") public class User { + + /** + * Unique identifier for the user (UUID). + * + *

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