package com.lesingle.modules.sys.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.lesingle.common.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 权限实体
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("t_sys_permission")
@Schema(description = "系统权限实体")
public class SysPermission extends BaseEntity {

    @Schema(description = "租户ID")
    @TableField("tenant_id")
    private Long tenantId;

    @Schema(description = "权限名称")
    private String name;

    @Schema(description = "权限编码（格式：resource:action）")
    private String code;

    @Schema(description = "资源")
    private String resource;

    @Schema(description = "操作")
    private String action;

    @Schema(description = "描述")
    private String description;
}
