-
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.
- Loading branch information
Showing
27 changed files
with
473 additions
and
30 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.wypl.common; | ||
|
||
public enum Color { | ||
labelRed, | ||
labelPink, | ||
labelOrange, | ||
labelYellow, | ||
labelGreen, | ||
labelLeaf, | ||
labelBlue, | ||
labelSky, | ||
labelNavy, | ||
labelIndigo, | ||
labelPurple, | ||
labelLavender, | ||
labelCharcoal, | ||
labelBrown | ||
} |
2 changes: 1 addition & 1 deletion
2
common/src/main/java/com/wypl/common/exception/GlobalErrorCode.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
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
6 changes: 6 additions & 0 deletions
6
...-calendar-domain/src/main/java/com/wypl/jpacalendardomain/calendar/data/InviteStatus.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,6 @@ | ||
package com.wypl.jpacalendardomain.calendar.data; | ||
|
||
public enum InviteStatus { | ||
PENDING, | ||
ACCENTED | ||
} |
42 changes: 42 additions & 0 deletions
42
...pa-calendar-domain/src/main/java/com/wypl/jpacalendardomain/calendar/domain/Calendar.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,42 @@ | ||
package com.wypl.jpacalendardomain.calendar.domain; | ||
|
||
import org.hibernate.annotations.SQLRestriction; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.GeneratedValue; | ||
import jakarta.persistence.GenerationType; | ||
import jakarta.persistence.Id; | ||
import jakarta.persistence.Table; | ||
import lombok.AccessLevel; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Builder | ||
@Getter | ||
@AllArgsConstructor | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@SQLRestriction("deleted_at is null") | ||
@Entity | ||
@Table(name = "calendar") | ||
public class Calendar { | ||
// Todo : extends BaseEntity | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name = "calendar_id") | ||
private Long calendarId; | ||
|
||
@Column(name = "name", length = 20, nullable = false) | ||
private String name; | ||
|
||
@Column(name = "description", length = 50) | ||
private String description; | ||
|
||
@Column(name = "owner_id") | ||
private Long ownerId; | ||
|
||
// Todo : boolean type 설정 | ||
// private Boolean isShared; | ||
} |
52 changes: 52 additions & 0 deletions
52
...endar-domain/src/main/java/com/wypl/jpacalendardomain/calendar/domain/MemberCalendar.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,52 @@ | ||
package com.wypl.jpacalendardomain.calendar.domain; | ||
|
||
import org.hibernate.annotations.SQLRestriction; | ||
|
||
import com.wypl.common.Color; | ||
import com.wypl.jpacalendardomain.calendar.data.InviteStatus; | ||
import com.wypl.jpamemberdomain.member.Member; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.EnumType; | ||
import jakarta.persistence.Enumerated; | ||
import jakarta.persistence.FetchType; | ||
import jakarta.persistence.Id; | ||
import jakarta.persistence.IdClass; | ||
import jakarta.persistence.JoinColumn; | ||
import jakarta.persistence.ManyToOne; | ||
import jakarta.persistence.Table; | ||
import lombok.AccessLevel; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Builder | ||
@Getter | ||
@AllArgsConstructor | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@SQLRestriction("deleted_at is null") | ||
@Entity | ||
@IdClass(MemberCalendarId.class) | ||
@Table(name = "member_calendar") | ||
public class MemberCalendar { | ||
// Todo : extends BaseEntity | ||
|
||
@Id | ||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "member_id") | ||
private Member member; | ||
|
||
@Id | ||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "calendar_id") | ||
private Calendar calendar; | ||
|
||
@Column(name = "color", length = 6) | ||
private Color color; | ||
|
||
@Enumerated(EnumType.STRING) | ||
@Column(name = "status", length = 10, nullable = false) | ||
private InviteStatus status; | ||
} |
14 changes: 14 additions & 0 deletions
14
...dar-domain/src/main/java/com/wypl/jpacalendardomain/calendar/domain/MemberCalendarId.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,14 @@ | ||
package com.wypl.jpacalendardomain.calendar.domain; | ||
|
||
import java.io.Serializable; | ||
|
||
import lombok.AccessLevel; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.NoArgsConstructor; | ||
|
||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@EqualsAndHashCode | ||
public class MemberCalendarId implements Serializable { | ||
private Long member; | ||
private Long calendar; | ||
} |
8 changes: 8 additions & 0 deletions
8
...lendar-domain/src/main/java/com/wypl/jpacalendardomain/schedule/data/RepetitionCycle.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,8 @@ | ||
package com.wypl.jpacalendardomain.schedule.data; | ||
|
||
public enum RepetitionCycle { | ||
DAY, | ||
WEEK, | ||
MONTH, | ||
YEAR | ||
} |
36 changes: 36 additions & 0 deletions
36
...-calendar-domain/src/main/java/com/wypl/jpacalendardomain/schedule/domain/Repetition.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,36 @@ | ||
package com.wypl.jpacalendardomain.schedule.domain; | ||
|
||
import com.wypl.jpacalendardomain.schedule.data.RepetitionCycle; | ||
import jakarta.persistence.*; | ||
import lombok.*; | ||
import org.hibernate.annotations.SQLRestriction; | ||
|
||
@Builder | ||
@Getter | ||
@AllArgsConstructor | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@SQLRestriction("deleted_at is null") | ||
@Entity | ||
@Table(name = "repetition") | ||
public class Repetition { | ||
// Todo : extends BaseEntity | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name = "repetition_id") | ||
private Long repetitionId; | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "schedule_info_id", nullable = false) | ||
private ScheduleInfo scheduleInfo; | ||
|
||
@Enumerated(EnumType.STRING) | ||
@Column(name = "repetition_cycle") | ||
private RepetitionCycle repetitionCycle; | ||
|
||
@Column(name = "day_of_week") | ||
private Integer dayOfWeek; // bit | ||
|
||
@Column(name = "week_of_month") | ||
private Integer weekOfMonth; | ||
} |
39 changes: 39 additions & 0 deletions
39
...pa-calendar-domain/src/main/java/com/wypl/jpacalendardomain/schedule/domain/Schedule.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,39 @@ | ||
package com.wypl.jpacalendardomain.schedule.domain; | ||
|
||
import jakarta.persistence.*; | ||
import lombok.*; | ||
import org.hibernate.annotations.SQLRestriction; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
@Builder | ||
@Getter | ||
@AllArgsConstructor | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@SQLRestriction("deleted_at is null") | ||
@Entity | ||
@Table(name = "schedule") | ||
public class Schedule { | ||
// Todo : extends BaseEntity | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name = "schedule_id") | ||
private Long scheduleId; | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "schedule_info_id", nullable = false) | ||
private ScheduleInfo scheduleInfo; | ||
|
||
@Column(name = "title", length = 100) | ||
private String title; | ||
|
||
@Column(name = "description") | ||
private String description; | ||
|
||
@Column(name = "start_datetime", nullable = false) | ||
private LocalDateTime startDateTime; | ||
|
||
@Column(name = "end_datetime", nullable = false) | ||
private LocalDateTime endDateTime; | ||
} |
38 changes: 38 additions & 0 deletions
38
...alendar-domain/src/main/java/com/wypl/jpacalendardomain/schedule/domain/ScheduleInfo.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,38 @@ | ||
package com.wypl.jpacalendardomain.schedule.domain; | ||
|
||
import com.wypl.jpacalendardomain.calendar.domain.Calendar; | ||
import jakarta.persistence.*; | ||
import lombok.*; | ||
import org.hibernate.annotations.SQLRestriction; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
@Builder | ||
@Getter | ||
@AllArgsConstructor | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@SQLRestriction("deleted_at is null") | ||
@Entity | ||
@Table(name = "schedule_info") | ||
public class ScheduleInfo { | ||
// Todo : extends BaseEntity | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name = "schedule_info_id") | ||
private Long scheduleInfoId; | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "calendar_id", nullable = false) | ||
private Calendar calendar; | ||
|
||
@Column(name = "start_datetime", nullable = false) | ||
private LocalDateTime startDateTime; | ||
|
||
@Column(name = "end_datetime", nullable = false) | ||
private LocalDateTime endDateTime; | ||
|
||
@Column(name = "creator_id") | ||
private Long creatorId; | ||
|
||
} |
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
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 |
---|---|---|
|
@@ -6,4 +6,6 @@ java { | |
|
||
dependencies { | ||
implementation project(':domain:jpa-common') | ||
implementation project(':common') | ||
|
||
} |
35 changes: 31 additions & 4 deletions
35
domain/jpa-member-domain/src/main/java/com/wypl/jpamemberdomain/member/Member.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 |
---|---|---|
@@ -1,13 +1,40 @@ | ||
package com.wypl.jpamemberdomain.member; | ||
|
||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.GeneratedValue; | ||
import jakarta.persistence.GenerationType; | ||
import jakarta.persistence.Id; | ||
import com.wypl.common.Color; | ||
import jakarta.persistence.*; | ||
|
||
import java.time.LocalDate; | ||
|
||
@Entity | ||
@Table(name = "member_tbl") | ||
public class Member { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name = "id") | ||
private Long id; | ||
|
||
@Column(name = "email", length = 50, unique = true, nullable = false) | ||
private String email; | ||
|
||
@Column(name = "nickname", length = 20, nullable = false) | ||
private String nickname; | ||
|
||
@Column(name = "birthday") | ||
private LocalDate birthday; | ||
|
||
@Column(name = "profile_image", length = 100) | ||
private String profileImage; | ||
|
||
@Enumerated(EnumType.STRING) | ||
@Column(name = "color", length = 20, nullable = false) | ||
private Color color; | ||
|
||
@Enumerated(EnumType.STRING) | ||
@Column(name = "timezone", length = 10, nullable = false) | ||
private TimeZone timeZone; | ||
|
||
// @OneToMany(mappedBy = "member") | ||
// private List<MemberCalendar> memberCalendars; | ||
|
||
} |
21 changes: 0 additions & 21 deletions
21
domain/jpa-member-domain/src/main/java/com/wypl/jpamemberdomain/member/MemberSocial.java
This file was deleted.
Oops, something went wrong.
16 changes: 16 additions & 0 deletions
16
domain/jpa-member-domain/src/main/java/com/wypl/jpamemberdomain/member/OauthProvider.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 com.wypl.jpamemberdomain.member; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
|
||
@AllArgsConstructor | ||
@Getter | ||
public enum OauthProvider { | ||
GOOGLE("gmail.com"); | ||
|
||
private final String domain; | ||
|
||
public boolean equalsName(final String otherName) { | ||
return name().equalsIgnoreCase(otherName); | ||
} | ||
} |
Oops, something went wrong.