profileShare

rasmusjy / tasteprint

Read-only snapshot

No repository description.

main default branch 169 files Expires Sep 13, 2026, 9:06 AM
ChallengeParticipant.java 939 bytes
1 package com.tasteprint.social;
2
3 import java.time.Instant;
4 import java.util.UUID;
5
6 import jakarta.persistence.Column;
7 import jakarta.persistence.Entity;
8 import jakarta.persistence.Id;
9 import jakarta.persistence.Table;
10
11 @Entity
12 @Table(name = "challenge_participant")
13 class ChallengeParticipant {
14
15 @Id
16 private UUID id;
17
18 @Column(name = "challenge_id", nullable = false)
19 private UUID challengeId;
20
21 @Column(name = "user_id", nullable = false)
22 private UUID userId;
23
24 @Column(name = "joined_at", nullable = false)
25 private Instant joinedAt;
26
27 protected ChallengeParticipant() {
28 }
29
30 ChallengeParticipant(UUID id, UUID challengeId, UUID userId, Instant joinedAt) {
31 this.id = id;
32 this.challengeId = challengeId;
33 this.userId = userId;
34 this.joinedAt = joinedAt;
35 }
36
37 UUID challengeId() {
38 return challengeId;
39 }
40
41 UUID userId() {
42 return userId;
43 }
44 }
45