package studycave.studycaverestservice.model.userBadge;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import studycave.studycaverestservice.model.badge.Badge;
import studycave.studycaverestservice.model.user.User;

import javax.persistence.*;

@Entity
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
public class UserBadge {
    @Id
    @Column(name="id")
    @GeneratedValue(strategy= GenerationType.IDENTITY)
    private Long id;

    @ManyToOne
    @JoinColumn(name="badge_id",referencedColumnName="id")
    private Badge badge;

    @ManyToOne
    @JoinColumn(name="user_id",referencedColumnName="id")
    private User user;
}
