From 2f5e5354940ed5441df6c1a87773d394877c2796 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=A2=85=ED=98=84?= Date: Wed, 17 Jan 2024 19:54:47 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B9=80=EC=A2=85=ED=98=84=20Activity,=20Activ?= =?UTF-8?q?ityFile,=20Category=20=ED=81=B4=EB=9E=98=EC=8A=A4=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/umc/forgrad/domain/Activity.java | 42 +++++++++++++++++++ .../java/umc/forgrad/domain/ActivityFile.java | 31 ++++++++++++++ .../umc/forgrad/domain/enums/Category.java | 6 +++ 3 files changed, 79 insertions(+) create mode 100644 src/main/java/umc/forgrad/domain/Activity.java create mode 100644 src/main/java/umc/forgrad/domain/ActivityFile.java create mode 100644 src/main/java/umc/forgrad/domain/enums/Category.java 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; +}