-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merge(AppointmentMember): 약속 멤버 엔티티 구현
[feat] 약속 멤버 엔티티 구현
- Loading branch information
Showing
3 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
src/main/java/org/noostak/appointmentmember/domain/AppointmentMember.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,30 @@ | ||
package org.noostak.appointmentmember.domain; | ||
|
||
import jakarta.persistence.*; | ||
import lombok.Getter; | ||
import lombok.RequiredArgsConstructor; | ||
import org.noostak.appointmentmember.domain.vo.AppointmentAvailability; | ||
import org.noostak.member.domain.Member; | ||
|
||
@Entity | ||
@Getter | ||
@RequiredArgsConstructor | ||
public class AppointmentMember { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
private Long appointmentMemberId; | ||
|
||
@Enumerated(EnumType.STRING) | ||
@Column(name = "availability_availability") | ||
private AppointmentAvailability appointmentAvailability; | ||
|
||
// TODO: | ||
// @ManyToOne(fetch = FetchType.LAZY) | ||
// @JoinColumn(name = "appointment_id") | ||
// private Appointment appointment; | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "member_id") | ||
private Member member; | ||
} |
14 changes: 14 additions & 0 deletions
14
src/main/java/org/noostak/appointmentmember/domain/vo/AppointmentAvailability.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 org.noostak.appointmentmember.domain.vo; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
|
||
@Getter | ||
@AllArgsConstructor | ||
public enum AppointmentAvailability { | ||
|
||
AVAILABLE("약속 가능"), | ||
UNAVAILABLE("약속 불가능"); | ||
|
||
private final String message; | ||
} |
Empty file.