package com.cloudhandson.vpdbackoffice.domain.masking;

public record MaskingRule(
    long ruleId,
    String ruleCode,
    String ruleName,
    String templateCode,
    String description,
    String enabledYn
) {

  public boolean enabled() {
    return "Y".equalsIgnoreCase(enabledYn);
  }

  public MaskingTemplate template() {
    return MaskingTemplate.from(templateCode);
  }

  public String templateLabel() {
    return template().label();
  }
}
