package com.rizki.mufrizal.spring.oauth2.custom.domain;

/**
 *
 * @Author Rizki Mufrizal <mufrizalrizki@gmail.com>
 * @Web <https://RizkiMufrizal.github.io>
 * @Since Feb 1, 2017
 * @Time 10:31:23 PM
 * @Encoding UTF-8
 * @Project Spring-OAuth2-Custom
 * @Package com.rizki.mufrizal.spring.oauth2.custom.domain
 *
 */
public class UserRole {

}

@@ -54,293 +54,2195 @@
 n;%0A%0A
-/**%0A *%0A * @Author Rizki Mufrizal %3Cmufrizalrizki@gmail.com%3E%0A * @Web %3Chttps://RizkiMufrizal.github.io%3E%0A * @Since Feb 1, 2017%0A * @Time 10:31:23 PM%0A * @Encoding UTF-8%0A * @Project Spring-OAuth2-Custom%0A * @Package com.rizki.mufrizal.spring.oauth2.custom.domain%0A *%0A */%0Apublic class UserRole %7B%0A
+import com.fasterxml.jackson.annotation.JsonIgnore;%0Aimport java.io.Serializable;%0Aimport javax.persistence.CascadeType;%0Aimport javax.persistence.Column;%0Aimport javax.persistence.ConstraintMode;%0Aimport javax.persistence.Entity;%0Aimport javax.persistence.EnumType;%0Aimport javax.persistence.Enumerated;%0Aimport javax.persistence.FetchType;%0Aimport javax.persistence.ForeignKey;%0Aimport javax.persistence.GeneratedValue;%0Aimport javax.persistence.Id;%0Aimport javax.persistence.JoinColumn;%0Aimport javax.persistence.ManyToOne;%0Aimport javax.persistence.Table;%0Aimport org.hibernate.annotations.GenericGenerator;%0A%0A/**%0A *%0A * @Author Rizki Mufrizal %3Cmufrizalrizki@gmail.com%3E%0A * @Web %3Chttps://RizkiMufrizal.github.io%3E%0A * @Since Feb 1, 2017%0A * @Time 10:31:23 PM%0A * @Encoding UTF-8%0A * @Project Spring-OAuth2-Custom%0A * @Package com.rizki.mufrizal.spring.oauth2.custom.domain%0A *%0A */%0A@Entity%0A@Table(name = %22tb_user_role%22)%0Apublic class UserRole implements Serializable %7B%0A%0A    @Id%0A    @GeneratedValue(generator = %22uuid2%22)%0A    @GenericGenerator(name = %22uuid2%22, strategy = %22uuid2%22)%0A    @Column(name = %22user_role_id%22, length = 36, nullable = false)%0A    private String userRoleId;%0A%0A    @Enumerated(EnumType.STRING)%0A    @Column(name = %22role%22, length = 15, nullable = false)%0A    private Role role;%0A%0A    @JsonIgnore%0A    @ManyToOne(cascade = %7BCascadeType.ALL%7D, fetch = FetchType.LAZY)%0A    @JoinColumn(name = %22username%22, nullable = false, foreignKey = @ForeignKey(ConstraintMode.CONSTRAINT))%0A    private User user;%0A%0A    /**%0A     * @return the userRoleId%0A     */%0A    public String getUserRoleId() %7B%0A        return userRoleId;%0A    %7D%0A%0A    /**%0A     * @param userRoleId the userRoleId to set%0A     */%0A    public void setUserRoleId(String userRoleId) %7B%0A        this.userRoleId = userRoleId;%0A    %7D%0A%0A    /**%0A     * @return the role%0A     */%0A    public Role getRole() %7B%0A        return role;%0A    %7D%0A%0A    /**%0A     * @param role the role to set%0A     */%0A    public void setRole(Role role) %7B%0A        this.role = role;%0A    %7D%0A%0A    /**%0A     * @return the user%0A     */%0A    public User getUser() %7B%0A        return user;%0A    %7D%0A%0A    /**%0A     * @param user the user to set%0A     */%0A    public void setUser(User user) %7B%0A        this.user = user;%0A    %7D
 %0A%7D%0A

add domain user role