content: package com.alkl1m.taskmanager.entity;
  
  import com.alkl1m.taskmanager.enums.Role;
  import jakarta.persistence.*;
  import jakarta.validation.constraints.Email;
  import jakarta.validation.constraints.NotBlank;
  import jakarta.validation.constraints.Size;
  import lombok.AllArgsConstructor;
  import lombok.Builder;
  import lombok.Data;
  import lombok.NoArgsConstructor;
  
  import java.util.ArrayList;
  import java.util.List;
  @Data
  @Entity
  @Builder
  @NoArgsConstructor
  @AllArgsConstructor
  @Table(schema = "taskmanager", name = "t_users")
  public class User {
      @Id
      @GeneratedValue(strategy = GenerationType.IDENTITY)
      private Long id;
  
      @Column(name="c_name")
      private String name;
  
      @Column(name="c_email")
      @Email
      private String email;
  
      @Column(name="c_password")
      private String password;
  
      @Column(name="c_role")
      private Role role;
  
      @Column(name="c_enabled")
      private Boolean enabled = false;
  
      @OneToMany(mappedBy = "user",
              cascade = CascadeType.ALL,
              orphanRemoval = true)
      private List<Project> projects = new ArrayList<>();
  
      public User(String name, String email, String password, Role role) {
          this.name = name;
          this.email = email;
          this.password = password;
          this.role = role;
      }
  }