@@ -0,0 +1,1549 @@
+package com.rizki.mufrizal.belajar.oauth2.domain;%0A%0Aimport org.hibernate.annotations.Cascade;%0A%0Aimport javax.persistence.*;%0Aimport java.io.Serializable;%0Aimport java.util.HashSet;%0Aimport java.util.Set;%0A%0A@Entity%0A@Table(name = %22tb_user%22,%0A        indexes = %7B%0A                @Index(columnList = %22username%22, name = %22username%22)%0A        %7D%0A)%0Apublic class User implements Serializable %7B%0A%0A    @Id%0A    @Column(name = %22username%22, length = 30, unique = true)%0A    private String username;%0A%0A    @Column(name = %22password%22, length = 200)%0A    private String password;%0A%0A    @Column(name = %22enable%22, columnDefinition = %22TINYINT%22)%0A    private Boolean enable = true;%0A%0A    @OneToMany(fetch = FetchType.LAZY, mappedBy = %22user%22, cascade = javax.persistence.CascadeType.ALL)%0A    @Cascade(%7Borg.hibernate.annotations.CascadeType.SAVE_UPDATE, org.hibernate.annotations.CascadeType.DELETE%7D)%0A    private Set%3CUserRole%3E userRoles = new HashSet%3CUserRole%3E();%0A%0A    public String getUsername() %7B%0A        return username;%0A    %7D%0A%0A    public void setUsername(String username) %7B%0A        this.username = username;%0A    %7D%0A%0A    public String getPassword() %7B%0A        return password;%0A    %7D%0A%0A    public void setPassword(String password) %7B%0A        this.password = password;%0A    %7D%0A%0A    public Boolean isEnable() %7B%0A        return enable;%0A    %7D%0A%0A    public void setEnable(Boolean enable) %7B%0A        this.enable = enable;%0A    %7D%0A%0A    public Set%3CUserRole%3E getUserRoles() %7B%0A        return userRoles;%0A    %7D%0A%0A    public void setUserRoles(Set%3CUserRole%3E userRoles) %7B%0A        this.userRoles = userRoles;%0A    %7D%0A%7D%0A

Add Domain User