-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[COT-72] Feature: 프로필 링크 관련 테이블 추가 (#209)
* feat: add university, introduction column in member entity * feat: create profile link entity * refactor: rename hall of fame service -> myPageService -> HallOfFameService * feat: create memberProfile service, repository file * feat: delete limit of introduction, university column length * refactor: rollback name of hall of fame service * feat: add TEXT option in introduction * refactor: change parameter of hall of fame API -> accessHeader -> AuthenticationPrincipal * refactor: delete unused Builder from ProfileLink
- Loading branch information
Showing
6 changed files
with
90 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
src/main/java/org/cotato/csquiz/domain/auth/entity/ProfileLink.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package org.cotato.csquiz.domain.auth.entity; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.EnumType; | ||
import jakarta.persistence.Enumerated; | ||
import jakarta.persistence.FetchType; | ||
import jakarta.persistence.GeneratedValue; | ||
import jakarta.persistence.GenerationType; | ||
import jakarta.persistence.Id; | ||
import jakarta.persistence.JoinColumn; | ||
import jakarta.persistence.ManyToOne; | ||
import lombok.AccessLevel; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import org.cotato.csquiz.common.entity.BaseTimeEntity; | ||
import org.cotato.csquiz.domain.auth.enums.LinkType; | ||
|
||
@Entity | ||
@Getter | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
public class ProfileLink extends BaseTimeEntity { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name = "link_id") | ||
private Long id; | ||
|
||
@Column(name = "type", nullable = false) | ||
@Enumerated(EnumType.STRING) | ||
private LinkType role; | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "member_id", nullable = false) | ||
private Member member; | ||
} |
16 changes: 16 additions & 0 deletions
16
src/main/java/org/cotato/csquiz/domain/auth/enums/LinkType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package org.cotato.csquiz.domain.auth.enums; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
|
||
@Getter | ||
@AllArgsConstructor | ||
public enum LinkType { | ||
GITHUB("깃허브"), | ||
BEHANCE("비핸스"), | ||
BLOG("블로그"), | ||
OTHER("기타"), | ||
; | ||
|
||
private final String description; | ||
} |
7 changes: 7 additions & 0 deletions
7
src/main/java/org/cotato/csquiz/domain/auth/repository/ProfileLinkRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package org.cotato.csquiz.domain.auth.repository; | ||
|
||
import org.cotato.csquiz.domain.auth.entity.ProfileLink; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
public interface ProfileLinkRepository extends JpaRepository<ProfileLink, Long> { | ||
} |
13 changes: 13 additions & 0 deletions
13
src/main/java/org/cotato/csquiz/domain/auth/service/MemberProfileService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package org.cotato.csquiz.domain.auth.service; | ||
|
||
import lombok.RequiredArgsConstructor; | ||
import lombok.extern.slf4j.Slf4j; | ||
import org.springframework.stereotype.Service; | ||
import org.springframework.transaction.annotation.Transactional; | ||
|
||
@Slf4j | ||
@Service | ||
@Transactional(readOnly = true) | ||
@RequiredArgsConstructor | ||
public class MemberProfileService { | ||
} |