<commit_before>
package org.dionysus.domain;

import java.util.Collection;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import org.hibernate.validator.constraints.NotBlank;
import org.springframework.data.jpa.domain.AbstractPersistable;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

/**
 *
 * @author pengwang, persist courses consultant published
 */
@Entity
@Table(name = "courses")
@EntityListeners(AuditingEntityListener.class)
public class Course extends AbstractPersistable<Long> {
    private static final long serialVersionUID = 2523934617928638918L;
    
    @Column(name = "title")
    @NotBlank(message = "course title is required")
    private String title;
    
    @Column(name = "description")
    private String description;
    
    //course has possible states, active, inactive, completed
    @Column(name = "state")
    private String state;
    
    //one consult can published many courses
    @ManyToOne(fetch = FetchType.EAGER)
    private User consultant;
    
    /*
    one course has many registrations, one user can register many courses
    */
    @ManyToMany(mappedBy = "registeredCourses")
    private Collection<User> registrations;
<commit_msg>Modify course.consult field type from User to Consultant<commit_after>
package org.dionysus.domain;

import java.util.Collection;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import org.hibernate.validator.constraints.NotBlank;
import org.springframework.data.jpa.domain.AbstractPersistable;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

/**
 *
 * @author pengwang, persist courses consultant published
 */
@Entity
@Table(name = "courses")
@EntityListeners(AuditingEntityListener.class)
public class Course extends AbstractPersistable<Long> {
    private static final long serialVersionUID = 2523934617928638918L;
    
    @Column(name = "title")
    @NotBlank(message = "course title is required")
    private String title;
    
    @Column(name = "description")
    private String description;
    
    //course has possible states, active, inactive, completed
    @Column(name = "state")
    private String state;
    
    //one consult can published many courses
    @ManyToOne(fetch = FetchType.EAGER)
    private Consultant consultant;
    
    /*
    one course has many registrations, one user can register many courses
    */
    @ManyToMany(mappedBy = "registeredCourses")
    private Collection<User> registrations;

{'fraction_non_alphanumeric': 0.08866515102305944, 'fraction_numerical': 0.012341669373173108, 'mean_word_length': 4.651376146788991, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '2650534', 'n_tokens_mistral': 878, 'n_tokens_neox': 863, 'n_words': 219}