-
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
1 parent
7c1ef11
commit 7179f06
Showing
20 changed files
with
355 additions
and
19 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
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
bootJar.enabled = false | ||
jar.enabled = true | ||
|
||
dependencies { | ||
implementation project(":app:domain:common-domain") | ||
|
||
// hypersistence utils | ||
implementation 'io.hypersistence:hypersistence-utils-hibernate-63:3.7.6' | ||
} |
26 changes: 26 additions & 0 deletions
26
app/domain/show-domain/src/main/java/org/example/entity/artist/Artist.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,26 @@ | ||
package org.example.entity.artist; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.Table; | ||
import lombok.AccessLevel; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import org.example.entity.BaseEntity; | ||
|
||
@Entity | ||
@Getter | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@Table(name = "app_artist") | ||
public class Artist extends BaseEntity { | ||
|
||
@Column(name = "english_name", nullable = false) | ||
private String englishName; | ||
|
||
@Column(name = "korean_name", nullable = false) | ||
private String koreanName; | ||
|
||
@Column(name = "country", nullable = false) | ||
private String country; | ||
|
||
} |
26 changes: 26 additions & 0 deletions
26
app/domain/show-domain/src/main/java/org/example/entity/artist/ArtistSearch.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,26 @@ | ||
package org.example.entity.artist; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.FetchType; | ||
import jakarta.persistence.JoinColumn; | ||
import jakarta.persistence.ManyToOne; | ||
import jakarta.persistence.Table; | ||
import lombok.AccessLevel; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import org.example.entity.BaseEntity; | ||
|
||
@Entity | ||
@Getter | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@Table(name = "app_artist_search") | ||
public class ArtistSearch extends BaseEntity { | ||
|
||
@Column(name = "name", nullable = false) | ||
private String name; | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "artist_id") | ||
private Artist artist; | ||
} |
20 changes: 20 additions & 0 deletions
20
app/domain/show-domain/src/main/java/org/example/entity/genre/Genre.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,20 @@ | ||
package org.example.entity.genre; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.Table; | ||
import lombok.AccessLevel; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import org.example.entity.BaseEntity; | ||
|
||
@Entity | ||
@Getter | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@Table(name = "app_genre") | ||
public class Genre extends BaseEntity { | ||
|
||
@Column(name = "name", nullable = false) | ||
private String name; | ||
|
||
} |
41 changes: 41 additions & 0 deletions
41
app/domain/show-domain/src/main/java/org/example/entity/show/Show.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,41 @@ | ||
package org.example.entity.show; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.Enumerated; | ||
import jakarta.persistence.Table; | ||
import java.time.LocalDate; | ||
import lombok.AccessLevel; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import org.example.entity.BaseEntity; | ||
import org.example.entity.show.info.SeatPrice; | ||
import org.example.entity.show.info.Ticketing; | ||
|
||
@Entity | ||
@Getter | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@Table(name = "app_show") | ||
public class Show extends BaseEntity { | ||
|
||
@Column(name = "title", nullable = false) | ||
private String title; | ||
|
||
@Column(name = "content", nullable = false) | ||
private String content; | ||
|
||
@Column(name = "date", nullable = false) | ||
private LocalDate date; | ||
|
||
@Column(name = "location", nullable = false) | ||
private String location; | ||
|
||
@Column(name = "image", nullable = false) | ||
private String image; | ||
|
||
@Enumerated | ||
private SeatPrice seatPrice; | ||
|
||
@Enumerated | ||
private Ticketing ticketing; | ||
} |
23 changes: 23 additions & 0 deletions
23
app/domain/show-domain/src/main/java/org/example/entity/show/ShowArtist.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,23 @@ | ||
package org.example.entity.show; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.Table; | ||
import java.util.UUID; | ||
import lombok.AccessLevel; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import org.example.entity.BaseEntity; | ||
|
||
@Entity | ||
@Getter | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@Table(name = "app_show_artist") | ||
public class ShowArtist extends BaseEntity { | ||
|
||
@Column(name = "show_id", nullable = false) | ||
private UUID showId; | ||
|
||
@Column(name = "artist_id", nullable = false) | ||
private UUID artistId; | ||
} |
24 changes: 24 additions & 0 deletions
24
app/domain/show-domain/src/main/java/org/example/entity/show/ShowGenre.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 org.example.entity.show; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.Table; | ||
import java.util.UUID; | ||
import lombok.AccessLevel; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import org.example.entity.BaseEntity; | ||
|
||
@Entity | ||
@Getter | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@Table(name = "app_show_genre") | ||
public class ShowGenre extends BaseEntity { | ||
|
||
@Column(name = "show_id", nullable = false) | ||
private UUID showId; | ||
|
||
@Column(name = "genre_id", nullable = false) | ||
private UUID genreId; | ||
|
||
} |
27 changes: 27 additions & 0 deletions
27
app/domain/show-domain/src/main/java/org/example/entity/show/ShowSearch.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 org.example.entity.show; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.FetchType; | ||
import jakarta.persistence.JoinColumn; | ||
import jakarta.persistence.ManyToOne; | ||
import jakarta.persistence.Table; | ||
import lombok.AccessLevel; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import org.example.entity.BaseEntity; | ||
|
||
@Entity | ||
@Getter | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@Table(name = "app_show_search") | ||
public class ShowSearch extends BaseEntity { | ||
|
||
@Column(name = "name", nullable = false) | ||
private String name; | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "show_id") | ||
private Show show; | ||
|
||
} |
20 changes: 20 additions & 0 deletions
20
app/domain/show-domain/src/main/java/org/example/entity/show/info/SeatPrice.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,20 @@ | ||
package org.example.entity.show.info; | ||
|
||
import io.hypersistence.utils.hibernate.type.json.JsonType; | ||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Embeddable; | ||
import java.util.HashMap; | ||
import java.util.Map; | ||
import org.hibernate.annotations.Type; | ||
|
||
@Embeddable | ||
public class SeatPrice { | ||
|
||
@Type(JsonType.class) | ||
@Column(name = "seat_price", columnDefinition = "jsonb", nullable = false) | ||
private Map<String, Integer> priceInformation = new HashMap<>(); | ||
|
||
public void savePriceInformation(String seatType, Integer price) { | ||
priceInformation.put(seatType, price); | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
app/domain/show-domain/src/main/java/org/example/entity/show/info/Ticketing.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,23 @@ | ||
package org.example.entity.show.info; | ||
|
||
import io.hypersistence.utils.hibernate.type.json.JsonType; | ||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Embeddable; | ||
import java.util.HashMap; | ||
import java.util.Map; | ||
import org.hibernate.annotations.Type; | ||
|
||
@Embeddable | ||
public class Ticketing { | ||
|
||
@Type(JsonType.class) | ||
@Column(name = "ticketing", columnDefinition = "jsonb", nullable = false) | ||
private Map<String, String> ticketingInformation = new HashMap<>(); | ||
|
||
public void saveTicketingInformation( | ||
String ticketBookingSite, | ||
String ticketingSiteUrl | ||
) { | ||
ticketingInformation.put(ticketBookingSite, ticketingSiteUrl); | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
app/domain/user-domain/src/main/java/org/example/entity/InterestShow.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,23 @@ | ||
package org.example.entity; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.Table; | ||
import java.util.UUID; | ||
import lombok.AccessLevel; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Entity | ||
@Getter | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@Table(name = "app_interest_show") | ||
public class InterestShow extends BaseEntity { | ||
|
||
@Column(name = "user_id", nullable = false) | ||
private UUID userId; | ||
|
||
@Column(name = "show_id", nullable = false) | ||
private UUID showId; | ||
|
||
} |
24 changes: 24 additions & 0 deletions
24
app/domain/user-domain/src/main/java/org/example/entity/SubscribeArtist.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 org.example.entity; | ||
|
||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.Table; | ||
import java.util.UUID; | ||
import lombok.AccessLevel; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Entity | ||
@Getter | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@Table(name = "app_subscribe_artist") | ||
public class SubscribeArtist extends BaseEntity { | ||
|
||
@Column(name = "user_id", nullable = false) | ||
private UUID userId; | ||
|
||
@Column(name = "artist_id", nullable = false) | ||
private UUID artistId; | ||
|
||
} |
22 changes: 22 additions & 0 deletions
22
app/domain/user-domain/src/main/java/org/example/entity/SubscribeGenre.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 org.example.entity; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.Table; | ||
import java.util.UUID; | ||
import lombok.AccessLevel; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Entity | ||
@Getter | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@Table(name = "app_subscribe_genre") | ||
public class SubscribeGenre extends BaseEntity { | ||
|
||
@Column(name = "user_id", nullable = false) | ||
private UUID userId; | ||
|
||
@Column(name = "genre_id", nullable = false) | ||
private UUID genreId; | ||
} |
Oops, something went wrong.