Skip to content

Commit

Permalink
과제용 Project, ProjectRequest 레코드 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
gayeon1025 committed Apr 15, 2024
1 parent 1f2f988 commit a69f59b
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/main/java/com/com/cnu/devlog_springboot/model/Project.java
Original file line number Diff line number Diff line change
@@ -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;
}
Original file line number Diff line number Diff line change
@@ -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
) {
}

0 comments on commit a69f59b

Please sign in to comment.