/*
 * File: src/main/java/reports/model/inventories/Batch.java
 * Description: This model represents the Batch entity, capturing details about product batches
 * in the inventory system. It includes fields for product ID, batch number, expiry date, and
 * timestamps for creation and updates.
 */

package com.nebula.erp.reports.model.inventories;

import jakarta.persistence.*;
import lombok.Getter;
import lombok.Setter;

import java.time.LocalDate;
import java.time.LocalDateTime;

@Entity
@Table(name = "batch")
@Getter
@Setter
public class Batch {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @Column(nullable = false)
    private Long product_id;

    @Column(nullable = false)
    private Integer quantity;

    @Column(nullable = false)
    private String batch_code;

    @Column(nullable = false)
    private LocalDate expiry_date;

    @Column(nullable = false)
    private LocalDate manufacture_date;

    @Column(nullable = false)
    private Long grn_item_id;

    @Column(nullable = false)
    private String tenant;

    private LocalDateTime createdAt = LocalDateTime.now();
    private LocalDateTime updatedAt = LocalDateTime.now();
    private LocalDateTime deleted_at = null;
}