Interface TableSuffixProvider

All Known Implementing Classes:
DefaultTableSuffixProvider

public interface TableSuffixProvider
表名后缀提供者接口

用于提供审计日志分表的表名后缀

使用场景: - 根据时间生成后缀(如:202401表示2024年1月) - 根据租户ID生成后缀(如:tenant_001) - 根据业务维度生成后缀

使用示例:

public class MonthTableSuffixProvider implements TableSuffixProvider {
    @Override
    public String tableSuffix() {
        return LocalDate.now().format(DateTimeFormatter.ofPattern("yyyyMM"));
    }
}
Author:
Kerbores(kerbores@riemann.tech)
  • Method Summary

    Modifier and Type
    Method
    Description
    获取表名后缀
  • Method Details

    • tableSuffix

      String tableSuffix()
      获取表名后缀

      返回的后缀将用于拼接完整的表名:t_audit_log_${suffix}

      Returns:
      表名后缀字符串