package app.mealsmadeeasy.api.user;

import jakarta.persistence.*;
import lombok.Data;
import org.springframework.security.core.GrantedAuthority;

@Entity
@Table(name = "user_granted_authority")
@Data
public class UserGrantedAuthority implements GrantedAuthority {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(nullable = false)
    private Integer id;

    private String authority;

    @ManyToOne
    @JoinColumn(name = "user_id")
    private User user;

}
