-
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.
feat: 행사 및 행사에서 쓰이는 임베디드, Enum 클래스 생성
- Loading branch information
Showing
5 changed files
with
111 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.spaceclub.event.domain; | ||
|
||
import jakarta.persistence.Embeddable; | ||
import lombok.AccessLevel; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Embeddable | ||
@EqualsAndHashCode | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
public class BankInfo { | ||
|
||
private String bankName; | ||
|
||
private String accountNumber; | ||
|
||
} |
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,7 @@ | ||
package com.spaceclub.event.domain; | ||
|
||
public enum Category { | ||
|
||
SHOW | ||
|
||
} |
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,51 @@ | ||
package com.spaceclub.event.domain; | ||
|
||
import com.spaceclub.global.BaseTimeEntity; | ||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Embedded; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.EnumType; | ||
import jakarta.persistence.Enumerated; | ||
import jakarta.persistence.GeneratedValue; | ||
import jakarta.persistence.Id; | ||
import lombok.AccessLevel; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
@Entity | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
public class Event extends BaseTimeEntity { | ||
|
||
@Id | ||
@GeneratedValue | ||
@Column(name = "event_id") | ||
private Long id; | ||
|
||
@Enumerated(EnumType.STRING) | ||
private Category category; | ||
|
||
private String title; | ||
|
||
private String content; | ||
|
||
private String poster; | ||
|
||
private LocalDateTime startDate; | ||
|
||
private String location; | ||
|
||
private int capacity; | ||
|
||
@Embedded | ||
private BankInfo bankInfo; | ||
|
||
@Embedded | ||
private TicketInfo ticketInfo; | ||
|
||
@Embedded | ||
private FormInfo formInfo; | ||
|
||
private Long clubId; | ||
|
||
} |
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,19 @@ | ||
package com.spaceclub.event.domain; | ||
|
||
import jakarta.persistence.Embeddable; | ||
import lombok.AccessLevel; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
@Embeddable | ||
@EqualsAndHashCode | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
public class FormInfo { | ||
|
||
private LocalDateTime formOpenDate; | ||
|
||
private LocalDateTime formCloseDate; | ||
|
||
} |
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 com.spaceclub.event.domain; | ||
|
||
import jakarta.persistence.Embeddable; | ||
import lombok.AccessLevel; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Embeddable | ||
@EqualsAndHashCode | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
public class TicketInfo { | ||
|
||
private int maxTicketCount; | ||
|
||
private int cost; | ||
|
||
} |