-
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.
Merge branch 'dev' into chore/#14/cicd-settings
- Loading branch information
Showing
17 changed files
with
483 additions
and
0 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
33 changes: 33 additions & 0 deletions
33
core/src/main/java/dev/hooon/booking/domain/entity/Booking.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,33 @@ | ||
package dev.hooon.booking.domain.entity; | ||
|
||
import dev.hooon.common.entity.TimeBaseEntity; | ||
import dev.hooon.show.domain.entity.Show; | ||
import dev.hooon.user.domain.entity.User; | ||
import jakarta.persistence.*; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
import static jakarta.persistence.ConstraintMode.NO_CONSTRAINT; | ||
import static jakarta.persistence.FetchType.LAZY; | ||
import static jakarta.persistence.GenerationType.IDENTITY; | ||
import static lombok.AccessLevel.PROTECTED; | ||
|
||
@Entity | ||
@Getter | ||
@Table(name = "booking_table") | ||
@NoArgsConstructor(access = PROTECTED) | ||
public class Booking extends TimeBaseEntity { | ||
|
||
@Id | ||
@GeneratedValue(strategy = IDENTITY) | ||
@Column(name = "booking_id") | ||
private Long id; | ||
|
||
@ManyToOne(fetch = LAZY) | ||
@JoinColumn(name = "booking_user_id", nullable = false, foreignKey = @ForeignKey(value = NO_CONSTRAINT)) | ||
private User user; | ||
|
||
@ManyToOne(fetch = LAZY) | ||
@JoinColumn(name = "booking_show_id", nullable = false, foreignKey = @ForeignKey(value = NO_CONSTRAINT)) | ||
private Show show; | ||
} |
32 changes: 32 additions & 0 deletions
32
core/src/main/java/dev/hooon/booking/domain/entity/Ticket.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,32 @@ | ||
package dev.hooon.booking.domain.entity; | ||
|
||
import dev.hooon.common.entity.TimeBaseEntity; | ||
import dev.hooon.show.domain.entity.seat.Seat; | ||
import jakarta.persistence.*; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
import static jakarta.persistence.ConstraintMode.NO_CONSTRAINT; | ||
import static jakarta.persistence.FetchType.LAZY; | ||
import static jakarta.persistence.GenerationType.IDENTITY; | ||
import static lombok.AccessLevel.*; | ||
|
||
@Entity | ||
@Getter | ||
@Table(name = "ticket_table") | ||
@NoArgsConstructor(access = PROTECTED) | ||
public class Ticket extends TimeBaseEntity { | ||
|
||
@Id | ||
@GeneratedValue(strategy = IDENTITY) | ||
@Column(name = "ticket_id") | ||
private Long id; | ||
|
||
@ManyToOne(fetch = LAZY) | ||
@JoinColumn(name = "ticket_booking_id", nullable = false, foreignKey = @ForeignKey(value = NO_CONSTRAINT)) | ||
private Booking booking; | ||
|
||
@ManyToOne(fetch = LAZY) | ||
@JoinColumn(name = "ticket_seat_id", nullable = false, foreignKey = @ForeignKey(value = NO_CONSTRAINT)) | ||
private Seat seat; | ||
} |
25 changes: 25 additions & 0 deletions
25
core/src/main/java/dev/hooon/common/entity/TimeBaseEntity.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,25 @@ | ||
package dev.hooon.common.entity; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.EntityListeners; | ||
import jakarta.persistence.MappedSuperclass; | ||
import lombok.Getter; | ||
import org.springframework.data.annotation.CreatedDate; | ||
import org.springframework.data.annotation.LastModifiedDate; | ||
import org.springframework.data.jpa.domain.support.AuditingEntityListener; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
@EntityListeners(AuditingEntityListener.class) | ||
@MappedSuperclass | ||
@Getter | ||
public class TimeBaseEntity { | ||
|
||
@CreatedDate | ||
@Column(name = "created_at") | ||
protected LocalDateTime createdAt; | ||
|
||
@LastModifiedDate | ||
@Column(name = "updated_at") | ||
private LocalDateTime updatedAt; | ||
} |
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,40 @@ | ||
package dev.hooon.show.domain.entity; | ||
|
||
import dev.hooon.common.entity.TimeBaseEntity; | ||
import dev.hooon.show.domain.entity.place.Place; | ||
import jakarta.persistence.*; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
import static jakarta.persistence.ConstraintMode.NO_CONSTRAINT; | ||
import static jakarta.persistence.FetchType.*; | ||
import static jakarta.persistence.GenerationType.IDENTITY; | ||
import static lombok.AccessLevel.PROTECTED; | ||
|
||
@Entity | ||
@Getter | ||
@Table(name = "show_table") | ||
@NoArgsConstructor(access = PROTECTED) | ||
public class Show extends TimeBaseEntity { | ||
|
||
@Id | ||
@GeneratedValue(strategy = IDENTITY) | ||
@Column(name = "show_id") | ||
private Long id; | ||
|
||
@Embedded | ||
private ShowPeriod showPeriod; | ||
|
||
@Embedded | ||
private ShowTime showTime; | ||
|
||
@Column(name = "show_age", nullable = false) | ||
private String showAge; | ||
|
||
@Column(name = "show_total_seats") | ||
private int totalSeats; | ||
|
||
@ManyToOne(fetch = LAZY) | ||
@JoinColumn(name = "show_place_id", nullable = false, foreignKey = @ForeignKey(value = NO_CONSTRAINT)) | ||
private Place place; | ||
} |
24 changes: 24 additions & 0 deletions
24
core/src/main/java/dev/hooon/show/domain/entity/ShowPeriod.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,24 @@ | ||
package dev.hooon.show.domain.entity; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Embeddable; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.time.LocalDate; | ||
|
||
import static lombok.AccessLevel.PROTECTED; | ||
|
||
@Getter | ||
@Embeddable | ||
@EqualsAndHashCode | ||
@NoArgsConstructor(access = PROTECTED) | ||
public class ShowPeriod { | ||
|
||
@Column(name = "show_start_date", nullable = false) | ||
private LocalDate startDate; | ||
|
||
@Column(name = "show_end_date", nullable = false) | ||
private LocalDate endDate; | ||
} |
22 changes: 22 additions & 0 deletions
22
core/src/main/java/dev/hooon/show/domain/entity/ShowTime.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,22 @@ | ||
package dev.hooon.show.domain.entity; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Embeddable; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
import static lombok.AccessLevel.PROTECTED; | ||
|
||
@Getter | ||
@Embeddable | ||
@EqualsAndHashCode | ||
@NoArgsConstructor(access = PROTECTED) | ||
public class ShowTime { | ||
|
||
@Column(name = "show_total_minutes", nullable = false) | ||
private int totalMinutes; | ||
|
||
@Column(name = "show_intermission_minutes", nullable = false) | ||
private int intermissionMinutes; | ||
} |
33 changes: 33 additions & 0 deletions
33
core/src/main/java/dev/hooon/show/domain/entity/place/Place.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,33 @@ | ||
package dev.hooon.show.domain.entity.place; | ||
|
||
import dev.hooon.common.entity.TimeBaseEntity; | ||
import jakarta.persistence.*; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
import static jakarta.persistence.GenerationType.IDENTITY; | ||
import static lombok.AccessLevel.PROTECTED; | ||
|
||
@Entity | ||
@Getter | ||
@Table(name = "place_table") | ||
@NoArgsConstructor(access = PROTECTED) | ||
public class Place extends TimeBaseEntity { | ||
|
||
@Id | ||
@GeneratedValue(strategy = IDENTITY) | ||
@Column(name = "place_id") | ||
private Long id; | ||
|
||
@Column(name = "place_name", nullable = false) | ||
private String name; | ||
|
||
@Column(name = "place_contact_info") | ||
private String contactInfo; | ||
|
||
@Column(name = "place_address", nullable = false) | ||
private String address; | ||
|
||
@Column(name = "place_url") | ||
private String placeUrl; | ||
} |
53 changes: 53 additions & 0 deletions
53
core/src/main/java/dev/hooon/show/domain/entity/seat/Seat.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,53 @@ | ||
package dev.hooon.show.domain.entity.seat; | ||
|
||
import dev.hooon.common.entity.TimeBaseEntity; | ||
import dev.hooon.show.domain.entity.Show; | ||
import jakarta.persistence.*; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.time.LocalDate; | ||
|
||
import static jakarta.persistence.ConstraintMode.NO_CONSTRAINT; | ||
import static jakarta.persistence.EnumType.STRING; | ||
import static jakarta.persistence.FetchType.LAZY; | ||
import static jakarta.persistence.GenerationType.IDENTITY; | ||
import static lombok.AccessLevel.PROTECTED; | ||
|
||
@Entity | ||
@Getter | ||
@Table(name = "seat_table") | ||
@NoArgsConstructor(access = PROTECTED) | ||
public class Seat extends TimeBaseEntity { | ||
|
||
@Id | ||
@GeneratedValue(strategy = IDENTITY) | ||
@Column(name = "seat_id") | ||
private Long id; | ||
|
||
@ManyToOne(fetch = LAZY) | ||
@JoinColumn(name = "seat_show_id", nullable = false, foreignKey = @ForeignKey(value = NO_CONSTRAINT)) | ||
private Show show; | ||
|
||
@Enumerated(STRING) | ||
@Column(name = "seat_grade", nullable = false) | ||
private SeatGrade seatGrade; | ||
|
||
@Column(name = "seat_is_seat", nullable = false) | ||
private boolean isSeat; | ||
|
||
@Embedded | ||
private SeatPositionInfo positionInfo; | ||
|
||
@Column(name = "seat_price", nullable = false) | ||
private int price; | ||
|
||
@Column(name = "seat_show_date", nullable = false) | ||
private LocalDate showDate; | ||
|
||
@Embedded | ||
private ShowRound showRound; | ||
|
||
@Column(name = "seat_is_booked", nullable = false) | ||
private boolean isBooked; | ||
} |
17 changes: 17 additions & 0 deletions
17
core/src/main/java/dev/hooon/show/domain/entity/seat/SeatGrade.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,17 @@ | ||
package dev.hooon.show.domain.entity.seat; | ||
|
||
import lombok.Getter; | ||
import lombok.RequiredArgsConstructor; | ||
|
||
@Getter | ||
@RequiredArgsConstructor | ||
public enum SeatGrade { | ||
|
||
VIP("VIP석"), | ||
R("R석"), | ||
S("S석"), | ||
A("A석"), | ||
B("B석"); | ||
|
||
private final String description; | ||
} |
25 changes: 25 additions & 0 deletions
25
core/src/main/java/dev/hooon/show/domain/entity/seat/SeatPositionInfo.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,25 @@ | ||
package dev.hooon.show.domain.entity.seat; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Embeddable; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
import static lombok.AccessLevel.PROTECTED; | ||
|
||
@Getter | ||
@Embeddable | ||
@EqualsAndHashCode | ||
@NoArgsConstructor(access = PROTECTED) | ||
public class SeatPositionInfo { | ||
|
||
@Column(name = "seat_sector") | ||
private String sector; | ||
|
||
@Column(name = "seat_row", nullable = false) | ||
private String row; | ||
|
||
@Column(name = "seat_col", nullable = false) | ||
private int col; | ||
} |
24 changes: 24 additions & 0 deletions
24
core/src/main/java/dev/hooon/show/domain/entity/seat/ShowRound.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,24 @@ | ||
package dev.hooon.show.domain.entity.seat; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Embeddable; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.time.LocalTime; | ||
|
||
import static lombok.AccessLevel.PROTECTED; | ||
|
||
@Getter | ||
@Embeddable | ||
@EqualsAndHashCode | ||
@NoArgsConstructor(access = PROTECTED) | ||
public class ShowRound { | ||
|
||
@Column(name = "seat_show_round") | ||
private int round; | ||
|
||
@Column(name = "seat_start_time") | ||
private LocalTime startTime; | ||
} |
27 changes: 27 additions & 0 deletions
27
core/src/main/java/dev/hooon/show/domain/entity/showlike/ShowLike.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,27 @@ | ||
package dev.hooon.show.domain.entity.showlike; | ||
|
||
import dev.hooon.common.entity.TimeBaseEntity; | ||
import jakarta.persistence.*; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
import static jakarta.persistence.GenerationType.IDENTITY; | ||
import static lombok.AccessLevel.PROTECTED; | ||
|
||
@Entity | ||
@Getter | ||
@Table(name = "show_like_table") | ||
@NoArgsConstructor(access = PROTECTED) | ||
public class ShowLike extends TimeBaseEntity { | ||
|
||
@Id | ||
@GeneratedValue(strategy = IDENTITY) | ||
@Column(name = "show_like_id") | ||
private Long id; | ||
|
||
@Column(name = "show_like_user_id", nullable = false) | ||
private Long userId; | ||
|
||
@Column(name = "show_like_show_id", nullable = false) | ||
private Long showId; | ||
} |
Oops, something went wrong.