// Path: src/main/java/com/sajo/teamkerbell/vo/TodoListVO.java
// @Data
// @NoArgsConstructor
// public class TodoListVO {
//     @NotNull
//     private String content;
//     @NotNull
//     private LocalDate startDate;
//     @NotNull
//     private LocalDate endDate;
//     private Integer userId;
// 
//     public TodoListVO(String content, LocalDate startDate, LocalDate endDate, Integer userId) {
//         this.content = content;
//         this.startDate = startDate;
//         this.endDate = endDate;
//         this.userId = userId;
//     }
// }


import com.sajo.teamkerbell.vo.TodoListVO;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDate;
    }

    public void check() {
        this.finished = !this.finished;
    }

    public void overdue(LocalDate nowDate) {
        if (nowDate.isAfter(this.endDate))
            this.overdue = true;
    }

    @PrePersist
    protected void onCreate() {
        updatedAt = createdAt = LocalDate.now();
    }

    @PreUpdate
    protected void onUpdate() {
        updatedAt = LocalDate.now();
    }

    public static TodoList from(int projectId, TodoListVO todoListVO) {
        return new TodoList(
                todoListVO.getContent(),
                todoListVO.getStartDate(),
                todoListVO.getEndDate(),
                projectId,
                todoListVO.getUserId());
    }

// Path: src/main/java/com/sajo/teamkerbell/vo/TodoListVO.java
// @Data
// @NoArgsConstructor
// public class TodoListVO {
//     @NotNull
//     private String content;
//     @NotNull
//     private LocalDate startDate;
//     @NotNull
//     private LocalDate endDate;
//     private Integer userId;
// 
//     public TodoListVO(String content, LocalDate startDate, LocalDate endDate, Integer userId) {
//         this.content = content;
//         this.startDate = startDate;
//         this.endDate = endDate;
//         this.userId = userId;
//     }
// }


// Path: src/main/java/com/sajo/teamkerbell/entity/TodoList.java
import com.sajo.teamkerbell.vo.TodoListVO;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDate;

    }

    public void check() {
        this.finished = !this.finished;
    }

    public void overdue(LocalDate nowDate) {
        if (nowDate.isAfter(this.endDate))
            this.overdue = true;
    }

    @PrePersist
    protected void onCreate() {
        updatedAt = createdAt = LocalDate.now();
    }

    @PreUpdate
    protected void onUpdate() {
        updatedAt = LocalDate.now();
    }

    public static TodoList from(int projectId, TodoListVO todoListVO) {
        return new TodoList(
                todoListVO.getContent(),
                todoListVO.getStartDate(),
                todoListVO.getEndDate(),
                projectId,
                todoListVO.getUserId());
    }

    public void update(TodoListVO todoListVO) {