-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feature/#3 #6
Feature/#3 #6
Changes from 3 commits
b2e5ceb
a52b21c
951b196
78d7438
462255b
5f49b09
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,27 @@ | ||
package com.app.linkmind.domain; | ||
|
||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.GeneratedValue; | ||
import jakarta.persistence.GenerationType; | ||
import jakarta.persistence.Id; | ||
import lombok.AccessLevel; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Entity | ||
@Getter | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
public class Category { | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
private Long categoryId; | ||
|
||
private String title; | ||
|
||
@Builder | ||
public Category(String title) { | ||
this.title = title; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package com.app.linkmind.domain; | ||
|
||
import jakarta.persistence.Entity; | ||
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.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Entity | ||
@NoArgsConstructor | ||
@Getter | ||
public class CategoryManagement { | ||
@Id @GeneratedValue(strategy = GenerationType.IDENTITY) | ||
private Long managedId; | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "managed_category") | ||
private Category category; | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "managed_toast") | ||
private Toast toast; | ||
|
||
@Builder | ||
public CategoryManagement(Category category, Toast toast){ | ||
this.category = category; | ||
this.toast = toast; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package com.app.linkmind.domain; | ||
|
||
import jakarta.persistence.Entity; | ||
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 jakarta.persistence.OneToOne; | ||
import lombok.AccessLevel; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Entity | ||
@Getter | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
public class Reminder { | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
Long id; | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
private User user; | ||
|
||
@OneToOne | ||
@JoinColumn(name = "category") | ||
private Category category; | ||
|
||
private String title; | ||
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. title์ ์ด๋ค๊ฒ์ ๊ฐ๋ฆฌํค๋ ๋ณ์์ผ๊น์ฉ? 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. ์ ๋ฆฌ๋ง์ธ๋์ ์ ๋ชฉ์ด ์๋๋ผ ์นดํ ๊ณ ๋ฆฌ์ ์ ๋ชฉ์ด์๊ตฐ์ฉ! ์์ ํ๊ฒ ์ต๋๋น ใ ใ |
||
|
||
@Builder | ||
public Reminder(User user, Category category, String title){ | ||
this.user = user; | ||
this.category = category; | ||
this.title = title; | ||
} | ||
|
||
|
||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.app.linkmind.domain; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
|
||
@Getter | ||
@AllArgsConstructor | ||
public enum SocialType { | ||
KAKAO, | ||
APPLE; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package com.app.linkmind.domain; | ||
|
||
import jakarta.persistence.Entity; | ||
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; | ||
|
||
@Getter | ||
@Entity | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
public class Toast { | ||
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. ์ค ๊ทธ๋ ๋ค์ฉ ๊ฐ์ฌํฉ๋๋น |
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
private Long Id; | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "toast_id") | ||
private User user; | ||
|
||
private String title; | ||
|
||
private String linkUrl; | ||
|
||
@Builder | ||
public Toast(User user, String title, String linkUrl){ | ||
this.user= user; | ||
this.title = title; | ||
this.linkUrl = linkUrl; | ||
} | ||
|
||
public void updateTitle(String title){ | ||
this.title = title; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
package com.app.linkmind.domain; | ||
|
||
import java.util.Objects; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.EnumType; | ||
import jakarta.persistence.Enumerated; | ||
import jakarta.persistence.GeneratedValue; | ||
import jakarta.persistence.GenerationType; | ||
import jakarta.persistence.Id; | ||
import lombok.AccessLevel; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Entity | ||
@Getter | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
public class 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. ์ด๋ฒ์ฃผ ์ด๋ํ ๋งํฌ๋ ์ด๋ฒ์ฃผ ์ ์ฅํ ๋งํฌ ๊ฐ์๋ ์ ์ฅํด์ผํ ๊ฑฐ๊ฐ์์! 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. ์ ์ฌ๊ธฐ๋ ๊ทผ๋ฐ ์์ ๋ก๊ทธ์ธ ๋ก์ง ๋๋๊ณ refactor ๋ธ๋์น๋ก ๋ฐ์ํด๋ณด๊ฑฐ๋? ๊ทธ ๋ก์ง ๊ตฌํํ ๋ ํ์ํ ๋ ์ถ๊ฐํ๋ ๋ฐฉ์์ ์๊ฐํด๋ดค๋๋ฐ ์ด๋ป๊ฒ ์๊ฐํ์๋์ฉ?! 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 | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
private Long userId; | ||
|
||
@Column(nullable = false, unique = true) | ||
private String nickname; | ||
|
||
@Column(nullable = false) | ||
private String socialId; | ||
|
||
@Column(nullable = true) | ||
private String refreshToken; | ||
|
||
@Column(nullable = false) | ||
@Enumerated(EnumType.STRING) | ||
private SocialType socialType; | ||
|
||
@Column(nullable = true) | ||
private String fcmToken; | ||
|
||
@Column(nullable = true) | ||
private Boolean fcmIsAllowed = true; | ||
|
||
@Builder | ||
public User(String nickname, String socialId, SocialType socialType) { | ||
this.nickname = nickname; | ||
this.socialId = socialId; | ||
this.socialType = socialType; | ||
} | ||
|
||
public void updateRefreshToken(String refreshToken) { | ||
this.refreshToken = refreshToken; | ||
} | ||
|
||
public void updateNickname(String nickname) { | ||
this.nickname = nickname; | ||
} | ||
|
||
public void updateFcmToken(String fcmToken) { this.fcmToken = fcmToken; } | ||
|
||
public void updateFcmIsAllowed(Boolean isAllowed){this.fcmIsAllowed = isAllowed;} | ||
|
||
public String getFcmToken() { | ||
if (Objects.nonNull(this.fcmToken)) { | ||
return this.fcmToken; | ||
} | ||
return 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.
๋ฆฌ๋ง์ธ๋ ์ํฐํฐ์ ๋ฆฌ๋ง์ธ๋ ์์ (๋ ์ง, ์๊ฐ)์ ๋ฐ๋ก ์ ์ฅํ์ง๋ ์๋์?
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.
์ฌ์ค ์ด๋ถ๋ถ์ ๋ํด์๋ ๊ตฌํ ํ ๋ ์ด๋ป๊ฒ ๋ ์ง ๋ชฐ๋ผ์ ์๋ฃํ๋ ์ข ๊ณ ๋ฏผ์ด ๋์๋ ๋ถ๋ถ์ด๋ค์ ใ ๋์ค์ yyyy๋ผ๋ ๊ฐ ์ด๋ฐ๊ฑฐ ํ์ ๋๊ณ ๋์ ์ด๋ถ๋ถ์ ๋ณ๊ฒฝํด๋ ๋์ง์์๊น..! ๋ผ๋ ์๊ฐ์ด์์ต๋๋น
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.
๋์ค์ ๋ณ๊ฒฝํด๋ ๊ด์ฐฎ์๊ฑฐ๊ฐ์์!