// Path: leitoor/src/main/java/br/com/delogic/leitoor/entidade/enums/RedeSocial.java
// public enum RedeSocial {
// 
//     FACEBOOK, GOOGLE;
// 
// }


import javax.persistence.Column;
import javax.persistence.DiscriminatorColumn;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import br.com.delogic.jfunk.data.Identity;
import br.com.delogic.leitoor.entidade.enums.RedeSocial;
package br.com.delogic.leitoor.entidade;



@Entity
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(name = "PERFIL", length = 50)
public abstract class Usuario extends Identity<Integer> {

    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seq_usuario")
    @SequenceGenerator(name = "seq_usuario", sequenceName = "seq_usuario", allocationSize = 1, initialValue = 1)
    private Integer    id;

    @Column(unique = true, length = 50)
    private String     idFacebook;

    @Column(unique = true, length = 50)
    private String     idGoogle;

    @Column(unique = true, length = 100)
    private String     email;

    @Column(length = 100)
    private String     nome;

    private Boolean    ativo;

    @Column(unique = true, length = 50)
    private String     convite;

    @Enumerated(EnumType.STRING)
    @Column(length = 50)
// Path: leitoor/src/main/java/br/com/delogic/leitoor/entidade/enums/RedeSocial.java
// public enum RedeSocial {
// 
//     FACEBOOK, GOOGLE;
// 
// }


// Path: leitoor/src/main/java/br/com/delogic/leitoor/entidade/Usuario.java
import javax.persistence.Column;
import javax.persistence.DiscriminatorColumn;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import br.com.delogic.jfunk.data.Identity;
import br.com.delogic.leitoor.entidade.enums.RedeSocial;

package br.com.delogic.leitoor.entidade;



@Entity
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(name = "PERFIL", length = 50)
public abstract class Usuario extends Identity<Integer> {

    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seq_usuario")
    @SequenceGenerator(name = "seq_usuario", sequenceName = "seq_usuario", allocationSize = 1, initialValue = 1)
    private Integer    id;

    @Column(unique = true, length = 50)
    private String     idFacebook;

    @Column(unique = true, length = 50)
    private String     idGoogle;

    @Column(unique = true, length = 100)
    private String     email;

    @Column(length = 100)
    private String     nome;

    private Boolean    ativo;

    @Column(unique = true, length = 50)
    private String     convite;

    @Enumerated(EnumType.STRING)
    @Column(length = 50)
    private RedeSocial redeSocial;