content: package com.example.demo.student;
  
  import lombok.*;
  
  import javax.persistence.*;
  import javax.validation.constraints.Email;
  import javax.validation.constraints.NotBlank;
  import javax.validation.constraints.NotNull;
  
  @ToString
  @Getter
  @Setter
  @EqualsAndHashCode
  @NoArgsConstructor
  @AllArgsConstructor
  @Entity
  @Table
  public class Student {
      @Id
      @SequenceGenerator(
              name = "student_sequence",
              sequenceName = "student_sequence",
              allocationSize = 1
      )
      @GeneratedValue(
              generator = "student_sequence",
              strategy = GenerationType.SEQUENCE)
      private Long id;
      @NotBlank
      @Column(nullable = false)
      private String name;
      @Email
      @Column(nullable = false, unique = true)
      private String email;
      @NotNull
      @Enumerated(EnumType.STRING)
      @Column(nullable = false)
      private Gender gender;
  
      public Student(String name, String email, Gender gender) {
          this.name = name;
          this.email = email;
          this.gender = gender;
      }
  }
  