All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.quarkus.qe.database.postgresql.Book Maven / Gradle / Ivy

package io.quarkus.qe.database.postgresql;

import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.SequenceGenerator;
import jakarta.persistence.Table;
import jakarta.validation.constraints.NotBlank;

import io.quarkus.hibernate.orm.panache.PanacheEntityBase;

@Entity
@Table(name = "book")
public class Book extends PanacheEntityBase {

    @Id
    @SequenceGenerator(name = "bookSequence", sequenceName = "Book_SEQ", allocationSize = 1)
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "bookSequence")
    public Long id;

    @NotBlank(message = "book title must be set")
    public String title;

    @NotBlank(message = "book author must be set")
    public String author;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy