package com.zcloud.zcGbsServicer.persistence.repository.impl;

import com.zcloud.zcGbsServicer.persistence.mapper.AlarmUserMapper;
import com.zcloud.zcGbsServicer.persistence.repository.AlarmUserRepository;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

@Service
@RequiredArgsConstructor
public class AlarmUserRepositoryImpl implements AlarmUserRepository {

    private final AlarmUserMapper alarmUserMapper;

    @Override
    public Long getTenantIdByUserId(Long userId) {
        if (userId == null) {
            return null;
        }
        return alarmUserMapper.selectTenantIdByUserId(userId);
    }
}
