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

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 + "resource")
public class Resource extends BaseEntity {

    @Column(name = "code", length = 100)
    @Comment("코드")
    private String code;

    @Column(name = "name", length = 100)
    @Comment("리소스명")
    private String name;

    @Column(name = "parent_code")
    @Comment("부모 코드")
    private long parentCode;

    @Column(name = "type", length = 50)
    @Comment("리소스 유형(메뉴, 페이지, 컴포넌트)")
    private String type;

    @Column(name = "path", length = 100)
    @Comment("주소")
    private String path;

    @Column(name = "sort_order")
    @Comment("정렬 순서")
    private int sortOrder;

    @Column(name = "description", length = 255)
    @Comment("설명")
    private String description;

    @Column(name = "menu_yn")
    @Comment("메뉴여부")
    private boolean menuYn;

}
