content: package com.pomodoro.app.model;
  
  import java.time.LocalDateTime;
  
  import jakarta.persistence.Column;
  import jakarta.persistence.Entity;
  import jakarta.persistence.EnumType;
  import jakarta.persistence.Enumerated;
  import jakarta.persistence.GeneratedValue;
  import jakarta.persistence.GenerationType;
  import jakarta.persistence.Id;
  import jakarta.persistence.JoinColumn;
  import jakarta.persistence.ManyToOne;
  import jakarta.persistence.Table;
  
  import lombok.AllArgsConstructor;
  import lombok.Builder;
  import lombok.Data;
  import lombok.NoArgsConstructor;
  
  @Entity
  @Table(name = "pomodoro_sessions")
  @Data
  @Builder
  @NoArgsConstructor
  @AllArgsConstructor
  public class PomodoroSession {
  
      @Id
      @GeneratedValue(strategy = GenerationType.IDENTITY)
      private Long id;
  
      @ManyToOne
      @JoinColumn(name = "user_id", nullable = false)
      private User user;
  
      @Column(name = "start_time", nullable = false)
      private LocalDateTime startTime;
  
      @Column(name = "end_time")
      private LocalDateTime endTime;
  
      @Column(name = "duration_minutes")
      private Integer durationMinutes;
  
      @Enumerated(EnumType.STRING)
      @Column(name = "session_type")
      private SessionType sessionType;
  
      @Column(name = "completed")
      private Boolean completed = false;
  
      @Column(name = "notes")
      private String notes;
  
      @Column(name = "task_description")
      private String taskDescription;
  
      public enum SessionType {
          FOCUS,
          SHORT_BREAK,
          LONG_BREAK
      }
  }