package com.ttstd.signaling.store;

import com.ttstd.signaling.model.DeviceBinding;

import java.util.List;
import java.util.Optional;

/**
 * 绑定关系存储抽象。生产环境由 JPA 实现，测试/演示由内存实现。
 */
public interface BindingStore {

    DeviceBinding save(DeviceBinding binding);

    Optional<DeviceBinding> findByDeviceUidAndUserId(String deviceUid, String userId);

    List<DeviceBinding> listByDeviceUid(String deviceUid);

    List<DeviceBinding> listByUserId(String userId);

    void delete(String bindingId);
}
