package com.bio.bio_backend.domain.base.memberauthgroup.entity;

import com.bio.bio_backend.domain.base.authgroup.entity.AuthGroup;
import com.bio.bio_backend.domain.base.member.entity.Member;
import com.bio.bio_backend.global.constants.AppConstants;
import com.bio.bio_backend.global.entity.BaseEntity;

import jakarta.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import org.hibernate.annotations.Comment;

@Entity
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Table(name = AppConstants.TABLE_PREFIX + "member_auth_group")
public class MemberAuthGroup extends BaseEntity {

    @Comment("사용자 OID")
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "member_oid")
    private Member memberOid;

    @Comment("권한 그룹 OID")
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "auth_group_oid")
    private AuthGroup authGroupOid;
}
