package pe.galaxy.trainning.backend.entity;
import jakarta.persistence.*;
import lombok.*;
import java.util.Date;
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@Entity
@ToString
@Table(name = "facturas")
public class Factura {
@Id
@SequenceGenerator(
name = "factura_sequence",
sequenceName = "factura_sequence",
initialValue = 10000,
allocationSize = 1
)
@GeneratedValue(
strategy = GenerationType.SEQUENCE,
generator = "factura_sequence"
)
@Column(name = "id")
private Long id;
@Column(name = "fecha")
@Temporal(TemporalType.DATE)
private Date fecha;
@Column(name = "hora")
@Temporal(TemporalType.TIME)
private Date hora;
@Column(name = "importe_total")
private Double importeTotal;
}