From febf442faaf7c8ef79077d8ffd79ecfb33541f77 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Fri, 1 Nov 2019 11:27:58 +0600 Subject: [PATCH] add kdoc for Post.kt --- .../insanusmokrassar/postssystem/core/post/Post.kt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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,