-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a56a230
commit dea3a5c
Showing
16 changed files
with
493 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
src/main/java/io/github/onecx/chat/domain/daos/ParticipantDAO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package io.github.onecx.chat.domain.daos; | ||
|
||
import jakarta.enterprise.context.ApplicationScoped; | ||
import jakarta.transaction.Transactional; | ||
|
||
import org.tkit.quarkus.jpa.daos.AbstractDAO; | ||
|
||
import io.github.onecx.chat.domain.models.Participant; | ||
|
||
@ApplicationScoped | ||
@Transactional(Transactional.TxType.NOT_SUPPORTED) | ||
public class ParticipantDAO extends AbstractDAO<Participant> { | ||
|
||
public enum ErrorKeys { | ||
|
||
ERROR_CREATE_PARTICIPANT, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
src/main/java/io/github/onecx/chat/domain/models/Participant.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package io.github.onecx.chat.domain.models; | ||
|
||
import static jakarta.persistence.FetchType.LAZY; | ||
|
||
import jakarta.persistence.*; | ||
|
||
import org.hibernate.annotations.TenantId; | ||
import org.tkit.quarkus.jpa.models.TraceableEntity; | ||
|
||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
@Getter | ||
@Setter | ||
@Entity | ||
@Table(name = "PARTICIPANT") | ||
public class Participant extends TraceableEntity { | ||
|
||
@TenantId | ||
@Column(name = "TENANT_ID") | ||
private String tenantId; | ||
|
||
@Column(name = "USER_ID") | ||
private String userId; | ||
|
||
@Column(name = "EMAIL") | ||
private String email; | ||
|
||
@Column(name = "TYPE") | ||
@Enumerated(EnumType.STRING) | ||
private ParticipantType type; | ||
|
||
@Column(name = "USER_NAME") | ||
private String userName; | ||
|
||
@ManyToOne(fetch = LAZY) | ||
@JoinColumn(name = "CHAT_ID") | ||
private Chat chat; | ||
|
||
public enum ParticipantType { | ||
HUMAN, | ||
ASSISTANT, | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.