package com.itsol.quantrivanphong.model;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(name = "role_detail")
public class RoleDetail {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id", nullable = false, unique = true)
    private int id;

    @Column(name = "action_name", length = 50)
    private String actionName;

    @Column(name = "action_code", length = 50)
    private String actionCode;

    @Column(name = "status")
    private boolean status;

    //    @JsonIgnore
    @ManyToOne(fetch = FetchType.EAGER)
    private Role role;
}
