package kr.co.accura.wtm.domain.timesheet.entity;

import jakarta.persistence.*;
import kr.co.accura.wbx.spring.common.BaseEntity;
import lombok.*;

@Entity
@Table(name = "timesheet_uploads")
@Getter @Setter
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class TimesheetUpload extends BaseEntity {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @Column(name = "user_id", nullable = false)
    private Long userId;

    @Column(length = 500)
    private String filename;

    @Column(name = "file_path", length = 1000)
    private String filePath;

    @Column(name = "total_rows")
    private Integer totalRows;

    @Column(name = "success_rows")
    private Integer successRows;

    @Column(name = "error_rows")
    private Integer errorRows;

    @Column(name = "error_log", columnDefinition = "TEXT")
    private String errorLog;

    @Column(length = 20)
    private String status;
}
