package org.xyzh.common.dto.sys;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.xyzh.common.dto.BaseDTO;

/**
 * @description    系统访问控制列表DTO
 * @filename    TbSysAclDTO.java
 * @author    yslg
 * @copyright yslg
 * @since 2025-11-04
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "系统访问控制列表DTO")
public class TbSysAclDTO extends BaseDTO {
    @Schema(description = "权限ID")
    private String aclId;

    @Schema(description = "对象类型：article/file/course/...")
    private String objectType;

    @Schema(description = "对象ID")
    private String objectId;

    @Schema(description = "主体类型：user/dept/role")
    private String principalType;

    @Schema(description = "主体ID")
    private String principalId;

    @Schema(description = "当主体为role且限定到某部门时的部门ID（支持“某部门的某角色”）")
    private String principalDeptId;

    @Schema(description = "权限位：1读 2写 4执行")
    private Integer permission;

    @Schema(description = "允许或显式拒绝", defaultValue = "true")
    private Boolean allow = true;

    @Schema(description = "是否包含子级（对dept/role生效）", defaultValue = "false")
    private Boolean includeDescendants = false;
}