package studycave.studycaverestservice.model.studyGroup.dto;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.sql.Date;

@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@JsonInclude(JsonInclude.Include.NON_NULL)
public class ContentDto {

    private Long id;
    private String title;
    private Date addDate;
    private String owner;
    private Long grade;
    private Long maxScore;

    private Long dateTo;
    private Long dateFrom;

    public void setAddDate() {

        java.util.Date utilDate = new java.util.Date();
        Date sqlDate = new Date(utilDate.getTime());
        this.addDate = sqlDate;
    }

}
