package com.example.demo.model;

import io.swagger.v3.oas.annotations.media.Schema;

/**
 * 数据权限规则实体。
 */
@Schema(description = "数据权限规则实体")
public class DataRule {

    @Schema(description = "规则ID")
    private Long id;

    @Schema(description = "角色ID")
    private Long roleId;

    @Schema(description = "规则类型：self-本人，dept-本部门，all-全部，custom-自定义")
    private String ruleType;

    @Schema(description = "自定义条件")
    private String customCondition;

    public DataRule() {
    }

    public DataRule(Long id, Long roleId, String ruleType, String customCondition) {
        this.id = id;
        this.roleId = roleId;
        this.ruleType = ruleType;
        this.customCondition = customCondition;
    }

    public Long getId() { return id; }
    public void setId(Long id) { this.id = id; }
    public Long getRoleId() { return roleId; }
    public void setRoleId(Long roleId) { this.roleId = roleId; }
    public String getRuleType() { return ruleType; }
    public void setRuleType(String ruleType) { this.ruleType = ruleType; }
    public String getCustomCondition() { return customCondition; }
    public void setCustomCondition(String customCondition) { this.customCondition = customCondition; }
}
