시큐리티 설정
유저 API - 로그인, 회원가입, 계정정보 추가
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
package kr.co.vividnext.sodalive.member.stipulation
|
||||
|
||||
import kr.co.vividnext.sodalive.common.BaseEntity
|
||||
import javax.persistence.Column
|
||||
import javax.persistence.Entity
|
||||
|
||||
@Entity
|
||||
data class Stipulation(
|
||||
@Column(nullable = false)
|
||||
val title: String,
|
||||
@Column(columnDefinition = "TEXT", nullable = false)
|
||||
var description: String,
|
||||
var isActive: Boolean = true
|
||||
) : BaseEntity()
|
@@ -0,0 +1,30 @@
|
||||
package kr.co.vividnext.sodalive.member.stipulation
|
||||
|
||||
import kr.co.vividnext.sodalive.common.BaseEntity
|
||||
import kr.co.vividnext.sodalive.member.Member
|
||||
import javax.persistence.Entity
|
||||
import javax.persistence.FetchType
|
||||
import javax.persistence.JoinColumn
|
||||
import javax.persistence.ManyToOne
|
||||
|
||||
@Entity
|
||||
data class StipulationAgree(
|
||||
val isAgree: Boolean
|
||||
) : BaseEntity() {
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@JoinColumn(name = "member_id", nullable = false)
|
||||
var member: Member? = null
|
||||
set(value) {
|
||||
member?.stipulationAgrees?.add(this)
|
||||
field = value
|
||||
}
|
||||
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@JoinColumn(name = "stipulation_id", nullable = false)
|
||||
var stipulation: Stipulation? = null
|
||||
}
|
||||
|
||||
object StipulationIds {
|
||||
const val TERMS_OF_SERVICE_ID = 1L
|
||||
const val PRIVACY_POLICY_ID = 2L
|
||||
}
|
@@ -0,0 +1,10 @@
|
||||
package kr.co.vividnext.sodalive.member.stipulation
|
||||
|
||||
import org.springframework.data.jpa.repository.JpaRepository
|
||||
import org.springframework.stereotype.Repository
|
||||
|
||||
@Repository
|
||||
interface StipulationRepository : JpaRepository<Stipulation, Long>
|
||||
|
||||
@Repository
|
||||
interface StipulationAgreeRepository : JpaRepository<StipulationAgree, Long>
|
Reference in New Issue
Block a user