package com.seer.teach.admin.service.impl;

import com.seer.teach.admin.convert.SubjectConvert;
import com.seer.teach.admin.response.SubjectResp;
import com.seer.teach.admin.service.AdminSubjectsService;
import com.seer.teach.teacher.module.entity.SubjectsEntity;
import com.seer.teach.teacher.service.SubjectsService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 科目管理服务实现类
 * </p>
 *
 * @author System
 * @since 2025-10-25
 */
@Slf4j
@Service
@RequiredArgsConstructor
public class AdminSubjectsServiceImpl implements AdminSubjectsService {

    private final SubjectsService subjectsService;

    @Override
    public List<SubjectResp> listSubjects() {
        List<SubjectsEntity> list = subjectsService.getSubjectList();
        return SubjectConvert.INSTANCE.convertRespList(list);
    }

}