Skip to content

Commit 5b846f0

Browse files
committed
simplified structure of packages
1 parent ebff3ce commit 5b846f0

File tree

7 files changed

+11
-18
lines changed

7 files changed

+11
-18
lines changed

Diff for: src/main/kotlin/com/example/kotlin/chat/controller/HtmlController.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package com.example.kotlin.chat.controller
22

33
import com.example.kotlin.chat.service.MessageService
4-
import com.example.kotlin.chat.service.vm.MessageVM
4+
import com.example.kotlin.chat.service.MessageVM
55
import org.springframework.stereotype.Controller
66
import org.springframework.ui.Model
77
import org.springframework.ui.set

Diff for: src/main/kotlin/com/example/kotlin/chat/controller/MessageResource.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package com.example.kotlin.chat.controller
22

33
import com.example.kotlin.chat.service.MessageService
4-
import com.example.kotlin.chat.service.vm.MessageVM
4+
import com.example.kotlin.chat.service.MessageVM
55
import org.springframework.http.ResponseEntity
66
import org.springframework.web.bind.annotation.*
77

Diff for: src/main/kotlin/com/example/kotlin/chat/service/impl/FakeMessageService.kt renamed to src/main/kotlin/com/example/kotlin/chat/service/FakeMessageService.kt

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
package com.example.kotlin.chat.service.impl
1+
package com.example.kotlin.chat.service
22

3-
import com.example.kotlin.chat.service.MessageService
4-
import com.example.kotlin.chat.service.vm.MessageVM
5-
import com.example.kotlin.chat.service.vm.UserVM
63
import com.github.javafaker.Faker
74
import org.springframework.stereotype.Service
85
import java.net.URL

Diff for: src/main/kotlin/com/example/kotlin/chat/service/MessageService.kt

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
package com.example.kotlin.chat.service
22

3-
import com.example.kotlin.chat.service.vm.MessageVM
4-
53
interface MessageService {
64

75
fun latest(): List<MessageVM>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package com.example.kotlin.chat.service
2+
3+
import java.net.URL
4+
import java.time.Instant
5+
6+
data class MessageVM(val content: String, val user: UserVM, val sent: Instant, val id: String? = null)
7+
8+
data class UserVM(val name: String, val avatarImageLink: URL)

Diff for: src/main/kotlin/com/example/kotlin/chat/service/vm/MessageVM.kt

-5
This file was deleted.

Diff for: src/main/kotlin/com/example/kotlin/chat/service/vm/UserVM.kt

-5
This file was deleted.

0 commit comments

Comments
 (0)