Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
878 B
8
Indexable
Never
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;

}