diff --git a/src/main/java/umc/forgrad/domain/Activity.java b/src/main/java/umc/forgrad/domain/Activity.java new file mode 100644 index 0000000..1906b55 --- /dev/null +++ b/src/main/java/umc/forgrad/domain/Activity.java @@ -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; + + +} diff --git a/src/main/java/umc/forgrad/domain/ActivityFile.java b/src/main/java/umc/forgrad/domain/ActivityFile.java new file mode 100644 index 0000000..8b59d38 --- /dev/null +++ b/src/main/java/umc/forgrad/domain/ActivityFile.java @@ -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; + + +} \ No newline at end of file diff --git a/src/main/java/umc/forgrad/domain/enums/Category.java b/src/main/java/umc/forgrad/domain/enums/Category.java new file mode 100644 index 0000000..0b85233 --- /dev/null +++ b/src/main/java/umc/forgrad/domain/enums/Category.java @@ -0,0 +1,6 @@ +package umc.forgrad.domain.enums; + +public enum Category { + + CERTIFICATIONS, COMPETITIONS, VOLUNTEERS, AWARDS; +}