diff --git a/src/main/java/com/com/cnu/devlog_springboot/model/Project.java b/src/main/java/com/com/cnu/devlog_springboot/model/Project.java new file mode 100644 index 0000000..29d0b72 --- /dev/null +++ b/src/main/java/com/com/cnu/devlog_springboot/model/Project.java @@ -0,0 +1,25 @@ +package com.com.cnu.devlog_springboot.model; + +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import lombok.*; + +import java.time.LocalDate; + +@Getter +@Setter +@Entity(name = "projects") +@AllArgsConstructor +@NoArgsConstructor(access = AccessLevel.PROTECTED, force = true) +public class Project { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + Integer id; + String title; + String summary; + String contents; + LocalDate startDate; + LocalDate endDate; +} diff --git a/src/main/java/com/com/cnu/devlog_springboot/model/request/ProjectRequest.java b/src/main/java/com/com/cnu/devlog_springboot/model/request/ProjectRequest.java new file mode 100644 index 0000000..2ae3a17 --- /dev/null +++ b/src/main/java/com/com/cnu/devlog_springboot/model/request/ProjectRequest.java @@ -0,0 +1,12 @@ +package com.com.cnu.devlog_springboot.model.request; + +import java.time.LocalDate; + +public record ProjectRequest( + String title, + String summary, + String contents, + LocalDate startDate, + LocalDate endDate +) { +}