content: package Trip.Mate.Trip.model;
  
  import jakarta.persistence.Entity;
  import jakarta.persistence.GeneratedValue;
  import jakarta.persistence.GenerationType;
  import jakarta.persistence.Id;
  import jakarta.validation.constraints.Email;
  import jakarta.validation.constraints.NotBlank;
  import jakarta.validation.constraints.Pattern;
  import jakarta.validation.constraints.Size;
  import lombok.AllArgsConstructor;
  import lombok.Getter;
  import lombok.NoArgsConstructor;
  import lombok.Setter;
  
  @Entity
  @Getter
  @Setter
  @AllArgsConstructor
  @NoArgsConstructor
  public class User {
  
      @Id
      @GeneratedValue(strategy = GenerationType.IDENTITY)
      private Long id;
  
      @NotBlank(message = "First Name is required")
      @Size(min = 2, max = 30, message = "First Name must be between 2 and 30 characters")
      private String firstName;
  
      private String lastName;
  
      @NotBlank(message = "Phone number is required")
      @Pattern(regexp = "^[0-9]{10}$", message = "Phone number must be 10 digits")
      private String phone;
  
      @NotBlank(message = "Email is required")
      @Email(message = "Email should be valid")
      private String email;
  
      @NotBlank(message = "Password is required")
      @Size(min = 6, message = "Password must be at least 6 characters")
      private String password;
  
  
  
  }
  