package com.yaoai.security.context;

public final class TenantContext {

    private static final ThreadLocal<Long> TENANT_ID = new InheritableThreadLocal<>();

    private TenantContext() {}

    public static void set(Long tenantId) {
        TENANT_ID.set(tenantId);
    }

    public static Long get() {
        return TENANT_ID.get();
    }

    public static void clear() {
        TENANT_ID.remove();
    }
}
