<commit_before>package de.roamingthings.expenses.user.domain;

import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;

/**
 * @author <NAME> [<EMAIL>]
 * @version 2017/05/03
 */
@Entity
@Data
@NoArgsConstructor
public class User {
    @Id
    @GeneratedValue
    private Long id;

}<commit_msg>Added username, role and enabled to User entity<commit_after>package de.roamingthings.expenses.user.domain;

import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.NotEmpty;

import javax.persistence.*;
import javax.validation.constraints.Size;
import java.util.Set;

/**
 * @author <NAME> [<EMAIL>]
 * @version 2017/05/03
 */
@Entity
@Data
@NoArgsConstructor
public class User {
    @Id
    @GeneratedValue
    private Long id;

    @NotEmpty
    @Size(max = 50)
    @Column(length = 50, nullable = false)
    private String username;

    @NotEmpty
    @Column(name = "password_hash", length = 64, nullable = false)
    private String passwordHash;

    private boolean enabled;

    @ManyToMany(fetch = FetchType.EAGER)
    @JoinTable
    // ~ defaults to @JoinTable(name = "USER_ROLE", joinColumns = @JoinColumn(name = "user_id"),
    //     inverseJoinColumns = @joinColumn(name = "role_id"))
    private Set<Role> roles;

    public User(String username) {
        this.username = username;
    }
}
{'fraction_non_alphanumeric': 0.11658570437196392, 'fraction_numerical': 0.015267175572519083, 'mean_word_length': 3.888135593220339, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1795342', 'n_tokens_mistral': 480, 'n_tokens_neox': 452, 'n_words': 109}