package hozza.network.models.auth.entities;

import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;

@Entity(name="authorities")
@Table(name="authorities")
@Data
public class Authority implements Serializable
{
    @Id
    @ManyToOne(fetch = FetchType.LAZY, optional = false)
    @JoinColumn(name = "username", nullable = false)
    private User user;

    @Id
    @Column(name = "authority")
    private String authority;
}
