-
Notifications
You must be signed in to change notification settings - Fork 297
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of github.com:ls1intum/Artemis into feature/ir…
…is/event-service
- Loading branch information
Showing
31 changed files
with
371 additions
and
104 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
44 changes: 44 additions & 0 deletions
44
src/main/java/de/tum/cit/aet/artemis/iris/domain/settings/IrisCourseChatSubSettings.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,44 @@ | ||
package de.tum.cit.aet.artemis.iris.domain.settings; | ||
|
||
import jakarta.annotation.Nullable; | ||
import jakarta.persistence.Column; | ||
import jakarta.persistence.DiscriminatorValue; | ||
import jakarta.persistence.Entity; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
|
||
/** | ||
* An {@link IrisSubSettings} implementation for course chat settings. | ||
* Chat settings notably provide settings for the rate limit. | ||
*/ | ||
@Entity | ||
@DiscriminatorValue("COURSE_CHAT") | ||
@JsonInclude(JsonInclude.Include.NON_EMPTY) | ||
public class IrisCourseChatSubSettings extends IrisSubSettings { | ||
|
||
@Nullable | ||
@Column(name = "rate_limit") | ||
private Integer rateLimit; | ||
|
||
@Nullable | ||
@Column(name = "rate_limit_timeframe_hours") | ||
private Integer rateLimitTimeframeHours; | ||
|
||
@Nullable | ||
public Integer getRateLimit() { | ||
return rateLimit; | ||
} | ||
|
||
public void setRateLimit(@Nullable Integer rateLimit) { | ||
this.rateLimit = rateLimit; | ||
} | ||
|
||
@Nullable | ||
public Integer getRateLimitTimeframeHours() { | ||
return rateLimitTimeframeHours; | ||
} | ||
|
||
public void setRateLimitTimeframeHours(@Nullable Integer rateLimitTimeframeHours) { | ||
this.rateLimitTimeframeHours = rateLimitTimeframeHours; | ||
} | ||
} |
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
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
4 changes: 2 additions & 2 deletions
4
src/main/java/de/tum/cit/aet/artemis/iris/domain/settings/IrisSubSettingsType.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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
package de.tum.cit.aet.artemis.iris.domain.settings; | ||
|
||
public enum IrisSubSettingsType { | ||
CHAT, // TODO: Split into PROGRAMMING_EXERCISE_CHAT and COURSE_CHAT | ||
TEXT_EXERCISE_CHAT, COMPETENCY_GENERATION, LECTURE_INGESTION | ||
CHAT, // TODO: Rename to PROGRAMMING_EXERCISE_CHAT | ||
TEXT_EXERCISE_CHAT, COURSE_CHAT, COMPETENCY_GENERATION, LECTURE_INGESTION | ||
} |
13 changes: 13 additions & 0 deletions
13
src/main/java/de/tum/cit/aet/artemis/iris/dto/IrisCombinedCourseChatSubSettingsDTO.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,13 @@ | ||
package de.tum.cit.aet.artemis.iris.dto; | ||
|
||
import java.util.SortedSet; | ||
|
||
import jakarta.annotation.Nullable; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
|
||
@JsonInclude(JsonInclude.Include.NON_EMPTY) | ||
public record IrisCombinedCourseChatSubSettingsDTO(boolean enabled, Integer rateLimit, Integer rateLimitTimeframeHours, @Nullable SortedSet<String> allowedVariants, | ||
@Nullable String selectedVariant) { | ||
|
||
} |
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
Oops, something went wrong.