Skip to content
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

Feat: JPA Entitiy 추가 작업 #14

Merged
merged 20 commits into from
Dec 13, 2023
Merged
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
c045a38
feat: UserTable 변경으로 인한 Entity 수정
jinsu4755 Dec 9, 2023
09e1a34
feat: Couple Table 수정으로 인한 Entity 수정
jinsu4755 Dec 9, 2023
b2a2e35
feat: user couple 정보 추가
jinsu4755 Dec 9, 2023
f2d532f
feat: entity 수정으로 인한 변경 사항 적용
jinsu4755 Dec 10, 2023
3754db7
feat: ID가 초기화 되지 않은 경우 exception 추가
jinsu4755 Dec 10, 2023
a931a3c
test: Add Jwt Authentication Test
jinsu4755 Dec 13, 2023
db09edc
test: Test DB를 h2 로 사용하도록 변경
jinsu4755 Dec 13, 2023
2ee75c7
feat: Game Entity Table 수정 및 생성
jinsu4755 Dec 13, 2023
3a4939a
style: 불필요한 라인 정리
jinsu4755 Dec 13, 2023
a19e6f8
feat: short game entity 수정으로 인한 변경 사항 적용
jinsu4755 Dec 13, 2023
77b7433
feat: short game entity 수정으로 인한 변경 사항 적용
jinsu4755 Dec 13, 2023
0a0447a
feat: Mission Category Table 수정으로 인한 코드 추가
jinsu4755 Dec 13, 2023
c16f009
feat: Mission Content Table 수정사항 반영
jinsu4755 Dec 13, 2023
4912eeb
feat: Game Round Table 수정 내용 반영
jinsu4755 Dec 13, 2023
181061a
feat: 사용자 알림 정보 테이블 수정 내용 적용
jinsu4755 Dec 13, 2023
e18f943
feat: user mission Table 수정 내용 적용
jinsu4755 Dec 13, 2023
d1fe5d7
feat: wish coupon Table 수정 내용 적용
jinsu4755 Dec 13, 2023
eaa13ee
style: fix ktlint
jinsu4755 Dec 13, 2023
4bfc10e
fix: 사용하지 않는 Dsl 코드 삭제
jinsu4755 Dec 13, 2023
fac4f64
fix: user Table 이름 변경
jinsu4755 Dec 13, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: 사용자 알림 정보 테이블 수정 내용 적용
jinsu4755 committed Dec 13, 2023
commit 181061a6da14e33eb93ed776d31dde1a90415619
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package universe.sparkle.infrastructure.persistence.entity

import jakarta.persistence.Column
import jakarta.persistence.EmbeddedId
import jakarta.persistence.Entity
import jakarta.persistence.Table

@Entity
@Table(name = "notification_information")
class NotificationInformationEntity(
id: NotificationInformationEntityId,
enableAllNotification: Boolean = true,
) {
@EmbeddedId
var id: NotificationInformationEntityId = id
protected set

@Column(name = "enable_all_notification")
var enableAllNotification: Boolean = enableAllNotification
protected set
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
package universe.sparkle.infrastructure.persistence.entity

import jakarta.persistence.Column
import jakarta.persistence.Embeddable
import jakarta.validation.constraints.NotNull
import jakarta.validation.constraints.Size
import org.hibernate.Hibernate
import java.io.Serializable
import java.util.*

@Embeddable
class NotificationInformationEntityId(
userId: Long,
fcmToken: String,
) : Serializable {
@NotNull
@Column(name = "user_id", nullable = false)
var userId: Long = userId
protected set

@Size(max = 255)
@NotNull
@Column(name = "fcm_token", nullable = false)
var fcmToken: String = fcmToken
protected set

override fun hashCode(): Int = Objects.hash(userId, fcmToken)
override fun equals(other: Any?): Boolean {
if (this === other) return true
if (other == null || Hibernate.getClass(this) != Hibernate.getClass(other)) return false

other as NotificationInformationEntityId

return userId == other.userId &&
fcmToken == other.fcmToken
}

companion object {
private const val serialVersionUID = -7994741440230625710L
}
}