diff --git a/core/src/main/kotlin/com/insanusmokrassar/postssystem/core/post/Post.kt b/core/src/main/kotlin/com/insanusmokrassar/postssystem/core/post/Post.kt index 7292b6a2..ded1c2b0 100644 --- a/core/src/main/kotlin/com/insanusmokrassar/postssystem/core/post/Post.kt +++ b/core/src/main/kotlin/com/insanusmokrassar/postssystem/core/post/Post.kt @@ -9,10 +9,17 @@ typealias PostId = String typealias PostContents = List typealias RegisteredPostContents = List +/** + * Base interface for creating of new post. Usually, it is just [SimplePost] instance + */ interface Post { val content: PostContents } +/** + * Root entity of whole system. Can be retrieved from [com.insanusmokrassar.postssystem.core.api.ReadPostsAPI] by + * getting and created in [com.insanusmokrassar.postssystem.core.api.WritePostsAPI] by inserting of [Post] instance + */ interface RegisteredPost : Post { val id: PostId @@ -22,10 +29,17 @@ interface RegisteredPost : Post { val modificationDate: DateTime } +/** + * Base and currently (1st Nov 2019) single realisation of [Post]. There is [SimpleRegisteredPost] which is technically + * is [Post] too, but it is not direct [Post] realisation + */ data class SimplePost( override val content: PostContents ) : Post +/** + * Base and currently (1st Nov 2019) single realisation of [RegisteredPost] + */ data class SimpleRegisteredPost( override val id: PostId, override val content: RegisteredPostContents,