-
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.
- Loading branch information
Showing
5 changed files
with
151 additions
and
0 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
src/main/java/TiCatch/backend/domain/history/entity/History.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 TiCatch.backend.domain.history.entity; | ||
|
||
import TiCatch.backend.domain.member.entity.Member; | ||
import TiCatch.backend.global.entity.BaseTimeEntity; | ||
import jakarta.persistence.*; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Entity | ||
@Getter | ||
@Table(name = "history") | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class History extends BaseTimeEntity { | ||
|
||
//예매 기록 ID | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
private Long historyId; | ||
|
||
//멤버 | ||
@ManyToOne | ||
@JoinColumn(name = "member_id", nullable = false) | ||
private Member member; | ||
|
||
//예매 좌석정보 | ||
private String historyInfo; | ||
|
||
//예매 난이도 | ||
private int historyLevel; | ||
} |
29 changes: 29 additions & 0 deletions
29
src/main/java/TiCatch/backend/domain/member/entity/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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package TiCatch.backend.domain.member.entity; | ||
|
||
import TiCatch.backend.global.entity.BaseTimeEntity; | ||
import jakarta.persistence.*; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Entity | ||
@Getter | ||
@Table(name = "member") | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class Member extends BaseTimeEntity { | ||
|
||
//멤버 ID | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
private Long memberId; | ||
|
||
//멤버 닉네임 | ||
@Column(nullable = false, length = 30) | ||
private String memberNickname; | ||
|
||
//총 s점수 | ||
@Column(nullable = false) | ||
private String memberScore; | ||
|
||
} |
40 changes: 40 additions & 0 deletions
40
src/main/java/TiCatch/backend/domain/ticketing/entity/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,40 @@ | ||
package TiCatch.backend.domain.ticketing.entity; | ||
|
||
import TiCatch.backend.domain.member.entity.Member; | ||
import TiCatch.backend.global.entity.BaseTimeEntity; | ||
import jakarta.persistence.*; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.time.LocalDate; | ||
|
||
@Entity | ||
@Getter | ||
@Table(name = "ticketing") | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class Ticketing extends BaseTimeEntity { | ||
|
||
//티켓팅 ID | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
private Long ticketingId; | ||
|
||
//멤버 | ||
@ManyToOne | ||
@JoinColumn(name = "member_id", nullable = false) | ||
private Member member; | ||
|
||
//티켓팅 레벨 | ||
@Column(nullable = false, length = 20) | ||
private int ticketingLevel; | ||
|
||
//티켓팅 시간 | ||
@Column(nullable = false) | ||
private LocalDate ticketingTime; | ||
|
||
//티켓팅 상태 | ||
@Column(nullable = false, length = 20) | ||
private String ticketingState; | ||
} |
25 changes: 25 additions & 0 deletions
25
src/main/java/TiCatch/backend/global/entity/BaseDateEntity.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 TiCatch.backend.global.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.LocalDate; | ||
|
||
@Getter | ||
@MappedSuperclass | ||
@EntityListeners(AuditingEntityListener.class) | ||
public abstract class BaseDateEntity { | ||
|
||
@CreatedDate | ||
@Column(nullable = false, updatable = false) | ||
private LocalDate createdDate; | ||
|
||
@LastModifiedDate | ||
@Column(nullable = false) | ||
private LocalDate modifiedDate; | ||
} |
25 changes: 25 additions & 0 deletions
25
src/main/java/TiCatch/backend/global/entity/BaseTimeEntity.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 TiCatch.backend.global.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; | ||
|
||
@Getter | ||
@MappedSuperclass | ||
@EntityListeners(AuditingEntityListener.class) | ||
public abstract class BaseTimeEntity { | ||
|
||
@CreatedDate | ||
@Column(nullable = false, updatable = false) | ||
private LocalDateTime createdDate; | ||
|
||
@LastModifiedDate | ||
@Column(nullable = false) | ||
private LocalDateTime modifiedDate; | ||
} |