diff --git a/app/src/main/java/com/github/swent/echo/data/model/AssociationHeader.kt b/app/src/main/java/com/github/swent/echo/data/model/AssociationHeader.kt index 7c6d5513c..e42abafec 100644 --- a/app/src/main/java/com/github/swent/echo/data/model/AssociationHeader.kt +++ b/app/src/main/java/com/github/swent/echo/data/model/AssociationHeader.kt @@ -3,6 +3,13 @@ package com.github.swent.echo.data.model import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable +/** + * A simplified version of the Association data class, used to embed into other data classes + * avoiding to embed the complete heavy Association data class. + * + * @property associationId the unique id of the association + * @property name the name of the association + */ @Serializable data class AssociationHeader( @SerialName("association_id") val associationId: String, diff --git a/app/src/main/java/com/github/swent/echo/data/model/DataModel.kt b/app/src/main/java/com/github/swent/echo/data/model/DataModel.kt index dce402f98..50357c628 100644 --- a/app/src/main/java/com/github/swent/echo/data/model/DataModel.kt +++ b/app/src/main/java/com/github/swent/echo/data/model/DataModel.kt @@ -1,5 +1,9 @@ package com.github.swent.echo.data.model +/** + * Supertype for other data classes having a unique id. Provides a unified way to get the unique id + * of the object. + */ sealed class DataModel { fun getId(): String = when (this) { diff --git a/app/src/main/java/com/github/swent/echo/data/model/EventCreator.kt b/app/src/main/java/com/github/swent/echo/data/model/EventCreator.kt index 776b5fc7f..81e198035 100644 --- a/app/src/main/java/com/github/swent/echo/data/model/EventCreator.kt +++ b/app/src/main/java/com/github/swent/echo/data/model/EventCreator.kt @@ -4,7 +4,8 @@ import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable /** - * A creator of an event. + * A creator of an event. A simplified version of the Event data class, used to embed into other + * data classes avoiding to embed the complete heavy Event data class. * * @property userId The ID of the user who created the event. * @property name The name of the creator. This same name as in the [UserProfile] corresponding to