-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'entity' of https://github.com/FOR-GRAD/For-Grad-Server …
…into entity
- Loading branch information
Showing
3 changed files
with
79 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,42 @@ | ||
package umc.forgrad.domain; | ||
|
||
import jakarta.persistence.*; | ||
import jakarta.validation.constraints.NotNull; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import umc.forgrad.domain.common.BaseEntity; | ||
import umc.forgrad.domain.enums.Category; | ||
|
||
import java.time.LocalDate; | ||
|
||
@Builder | ||
@Entity | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Getter | ||
public class Activity extends BaseEntity { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
private Long id; | ||
|
||
|
||
private String title; | ||
|
||
private String content; | ||
|
||
private String prize; | ||
|
||
@NotNull | ||
private LocalDate startDate; | ||
|
||
@NotNull | ||
private LocalDate endDate; | ||
|
||
@Enumerated(EnumType.STRING) | ||
private Category category; //CERTIFICATIONS, COMPETITIONS, VOLUNTEERS, AWARDS; | ||
|
||
|
||
} |
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,31 @@ | ||
package umc.forgrad.domain; | ||
|
||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.GeneratedValue; | ||
import jakarta.persistence.GenerationType; | ||
import jakarta.persistence.Id; | ||
import jakarta.validation.constraints.NotNull; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Entity | ||
@Builder | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Getter | ||
public class ActivityFile { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
private Long id; | ||
|
||
|
||
@NotNull | ||
private String fileUrl; | ||
|
||
private String fileName; | ||
|
||
|
||
} |
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,6 @@ | ||
package umc.forgrad.domain.enums; | ||
|
||
public enum Category { | ||
|
||
CERTIFICATIONS, COMPETITIONS, VOLUNTEERS, AWARDS; | ||
} |