package cn.novalon.gym.manage.groupcourse.repository;

import cn.novalon.gym.manage.groupcourse.domain.CourseLabel;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

import java.util.List;

public interface ICourseLabelRepository {

    Mono<CourseLabel> findById(Long id);

    Flux<CourseLabel> findAll();

    Flux<CourseLabel> findByKeyword(String keyword);

    Mono<CourseLabel> findByLabelName(String labelName);

    Mono<CourseLabel> save(CourseLabel courseLabel);

    Mono<CourseLabel> update(CourseLabel courseLabel);

    Mono<Void> deleteById(Long id);

    Flux<CourseLabel> findByTypeId(Long typeId);

    Mono<Void> addLabelsToType(Long typeId, List<Long> labelIds);

    Mono<Void> removeLabelFromType(Long typeId, Long labelId);

    Mono<Void> clearLabelsFromType(Long typeId);
}