/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package plate.wellmann.shop.persistence;

import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.OneToOne;
import javax.validation.constraints.NotNull;

/**
 *
 * @author Patrick
 */
@Entity
public class MyUserGroups extends AbstractEntity {
    @OneToOne
    private final Customer customer;

    @NotNull
    @Enumerated(EnumType.STRING)
    private Group userGroup;
    
    public enum Group {
        USER,
        SUPERUSER,
        MANAGER,
        ADMIN
    }
    
    public MyUserGroups(Customer customer, Group group) {
        this.customer = customer;
        this.userGroup = group;
    }

    public Group getUserGroup() {
        return userGroup;
    }

    public void setUserGroup(Group userGroup) {
        this.userGroup = userGroup;
    }
    
    
}
