
package com.weighttracker.model;

import jakarta.persistence.*;
import lombok.*;
import java.time.LocalDateTime;

@Entity
@Table(name = "weight_record")
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class WeightRecord {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "user_id")
    private User user;

    private LocalDateTime date;
    private Double weight;
    private Double bodyFat;
    private Double muscleMass;
    private Double waterPercent;
    private Double bmi;
    private Integer metabolicAge;
    private Integer visceralFat;
    @Column(columnDefinition = "text")
    private String notes;
}
