-
Notifications
You must be signed in to change notification settings - Fork 0
#11 - 애그리거트 설계에 맞춰 도메인 추가 #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
ea19f69
93dd8c0
2256708
3a68af0
ae624bf
2ac9fc8
a704a25
221ef0b
6115871
dc65fe6
b42a904
c834dbe
231d715
fdd5035
7de3d19
b41bad7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.wespot.message.port.`in` | ||
|
||
import org.springframework.stereotype.Service | ||
|
||
@Service | ||
interface MessageUseCase { | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package com.wespot.message.port.out | ||
|
||
interface MessageStatePort { | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.wespot.message.service | ||
|
||
import com.wespot.message.port.`in`.MessageUseCase | ||
import com.wespot.message.port.out.MessageStatePort | ||
|
||
class MessageService( | ||
private val messageStatePort: MessageStatePort | ||
) : MessageUseCase { | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.wespot.notification.port.`in` | ||
|
||
import org.springframework.stereotype.Service | ||
|
||
@Service | ||
interface NotificationUseCase { | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package com.wespot.notification.port.out | ||
|
||
interface NotificationStatePort { | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.wespot.notification.service | ||
|
||
import com.wespot.notification.port.`in`.NotificationUseCase | ||
import com.wespot.notification.port.out.NotificationStatePort | ||
|
||
class NotificationService( | ||
private val notificationStatic: NotificationStatePort | ||
) : NotificationUseCase { | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.wespot.report.port.`in` | ||
|
||
import org.springframework.stereotype.Service | ||
|
||
@Service | ||
interface ReportUseCase { | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package com.wespot.report.port.out | ||
|
||
interface ReportStatePort { | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.wespot.report.service | ||
|
||
import com.wespot.report.port.`in`.ReportUseCase | ||
|
||
class ReportService( | ||
private val reportUseCase: ReportUseCase | ||
) : ReportUseCase { | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.wespot.user.port.`in` | ||
|
||
import org.springframework.stereotype.Service | ||
|
||
@Service | ||
interface UserUseCase { | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.wespot.user.port.out | ||
|
||
import org.springframework.stereotype.Repository | ||
|
||
@Repository | ||
interface UserStatePort { | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.wespot.user.service | ||
|
||
import com.wespot.user.port.`in`.UserUseCase | ||
import com.wespot.user.port.out.UserStatePort | ||
|
||
class UserService( | ||
private val userStatePort: UserStatePort | ||
) : UserUseCase { | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.wespot.vote.port.`in` | ||
|
||
import org.springframework.stereotype.Service | ||
|
||
@Service | ||
interface VoteUseCase { | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package com.wespot.vote.port.out | ||
|
||
interface VoteStatePort { | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.wespot.vote.service | ||
|
||
import com.wespot.vote.port.`in`.VoteUseCase | ||
|
||
class VoteService( | ||
private val voteUseCase: VoteUseCase | ||
) : VoteUseCase { | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.wespot.message | ||
|
||
import com.wespot.user.User | ||
import java.time.LocalDateTime | ||
|
||
data class Message( | ||
val id: Long, | ||
val content: String, | ||
val sender: User, | ||
val receiver: User, | ||
val isReceiverRead: Boolean, | ||
val readAt: LocalDateTime, | ||
val isSent: Boolean, | ||
val sentAt: LocalDateTime, | ||
val createdAt: LocalDateTime, | ||
val updatedAt: LocalDateTime, | ||
val receivedAt: LocalDateTime, | ||
) { | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.wespot.notification | ||
|
||
import com.wespot.user.User | ||
import java.time.LocalDateTime | ||
|
||
data class Notification( | ||
val id: Long, | ||
val user: User, | ||
val type: NotificationType, | ||
val targetId: Long, | ||
val content: String, | ||
val isRead: Boolean, | ||
val readAt: LocalDateTime, | ||
val isEnabled: Boolean, | ||
val createdAt: LocalDateTime, | ||
) { | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package com.wespot.notification | ||
|
||
enum class NotificationType { | ||
MESSAGE, VOTE | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.wespot.report | ||
|
||
import com.wespot.user.User | ||
|
||
data class Report( | ||
val id: Long, | ||
val type: ReportType, | ||
val reporter: User, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. targetId 도 추가해주세요! message나 vote의 id 값도 있어야 신고 받았을 떄 추적하기 더 쉬울 것 같아요! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 아 그 타겟 id 였군요~! 추가하도록 하겠습니당 |
||
val reported: User, | ||
val isApprove: Boolean | ||
) { | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package com.wespot.report | ||
|
||
enum class ReportType { | ||
MESSAGE, VOTE | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package com.wespot.school | ||
|
||
enum class EstType { // TODO : 이 부분은 같이 이야기하면서 구체화 해나가 보시죠! | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. EstType이 국립인지 공립, 사립 구분이여서 이 내용 도메인에서 제거하는거 어떠신가요? |
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package com.wespot.school | ||
|
||
data class School( | ||
val id: Long, | ||
val name: String, | ||
val category: SchoolCategory, | ||
val schoolType: SchoolType, | ||
val estType: EstType, | ||
val region: String, | ||
val address: String, | ||
) { | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package com.wespot.school | ||
|
||
enum class SchoolCategory { | ||
MIDDLE, | ||
HIGH, | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package com.wespot.school | ||
|
||
enum class SchoolType { // TODO : 이 부분은 같이 이야기하면서 구체화 해나가 보시죠! | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 이 부분 없어도 될 것 같아요! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. EstType, SchoolType 둘 다 wespotERD 따라서 진행하기는 했는데, 그래서 저도 감이 안왔거든요. 그래서 말씀하신대로 지우는게 좋을 것 같아요 |
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package com.wespot.user | ||
|
||
import java.time.LocalDateTime | ||
|
||
data class FCM( | ||
val id: Long, | ||
val fcmToken: String, | ||
val createdAt: LocalDateTime, | ||
) { | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.wespot.user | ||
|
||
data class Profile( | ||
val backgroundColor: String, | ||
val iconUrl: String, | ||
) { | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package com.wespot.user | ||
|
||
data class Setting( | ||
val isEnableNotification: Boolean, | ||
) { | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.wespot.user | ||
|
||
data class Social( | ||
val socialType: SocialType, | ||
val socialId: Long, | ||
) { | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package com.wespot.user | ||
|
||
enum class SocialType { | ||
APPLE, KAKAO | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.wespot.user | ||
|
||
import com.wespot.school.School | ||
import java.time.LocalDateTime | ||
|
||
data class User( | ||
val id: Long, | ||
val school: School, | ||
val grade: Int, | ||
val group: Int, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. group 이 반을 의미를 하는거죠? class는 어떠신가요?! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. class 하려다가... class는 키워드라서.. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 헛 그러네요! group 으로 가시죠! |
||
val setting: Setting, | ||
val profile: Profile, | ||
val fcm: FCM, | ||
val social: Social, | ||
val createdAt: LocalDateTime, | ||
val updatedAt: LocalDateTime, | ||
val withdrawAt: LocalDateTime, | ||
) { | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.wespot.vote | ||
|
||
import com.wespot.user.User | ||
import com.wespot.voteoption.VoteOption | ||
import java.time.LocalDateTime | ||
|
||
data class Ballot( | ||
val id: Long, | ||
val voteOption: VoteOption, | ||
val sender: User, | ||
val receiver: User, | ||
val createdAt: LocalDateTime, | ||
val isReceiverRead: Boolean, | ||
) { | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.wespot.vote | ||
|
||
import java.time.LocalDateTime | ||
|
||
data class Vote( | ||
val id: Long, | ||
val schoolName: String, | ||
val grade: Int, | ||
val group: Int, | ||
val date: LocalDateTime, | ||
val ballots: List<Ballot> | ||
) { | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.wespot.voteoption | ||
|
||
import java.time.LocalDateTime | ||
|
||
data class VoteOption( | ||
val id: Long, | ||
val content: String, | ||
val createdAt: LocalDateTime, | ||
val updatedAt: LocalDateTime, | ||
) { | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package com.wespot.common | ||
|
||
import jakarta.persistence.Column | ||
import jakarta.persistence.Embeddable | ||
import jakarta.persistence.EntityListeners | ||
import org.springframework.data.annotation.CreatedDate | ||
import org.springframework.data.annotation.LastModifiedDate | ||
import org.springframework.data.jpa.domain.support.AuditingEntityListener | ||
import java.time.LocalDateTime | ||
|
||
@EntityListeners(AuditingEntityListener::class) | ||
@Embeddable | ||
class BaseEntity { | ||
|
||
@CreatedDate | ||
@Column(updatable = false, nullable = false) | ||
val createdAt: LocalDateTime? = null | ||
|
||
@LastModifiedDate | ||
@Column(nullable = false) | ||
val updatedAt: LocalDateTime? = null | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isEnabled 는 어떤 것일까요?!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이거는 새로 추가된 알림 비활성화에요! 사용자가 클릭 못하게 하는 것!