package de.assecutor.votianlt.repository;

import de.assecutor.votianlt.model.AppDevice;
import org.bson.types.ObjectId;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface AppDeviceRepository extends MongoRepository<AppDevice, ObjectId> {

    // Find all devices created by a specific user
    List<AppDevice> findByErstelltVon(ObjectId erstelltVon);

    // Find all devices not assigned to any user
    List<AppDevice> findByAppUserIdIsNull();
}
