package com.goldenchart.entity;

import jakarta.persistence.*;
import lombok.*;

@Entity
@Table(name = "gc_role_menu_permission",
        uniqueConstraints = @UniqueConstraint(columnNames = {"role", "menu_id"}))
@Getter @Setter @NoArgsConstructor @AllArgsConstructor @Builder
public class GcRoleMenuPermission {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @Column(nullable = false, length = 20)
    private String role;

    @Column(name = "menu_id", nullable = false, length = 50)
    private String menuId;

    @Column(nullable = false)
    private Boolean allowed = true;
}
