package com.reading.platform.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.reading.platform.dto.request.CourseCreateRequest;
import com.reading.platform.dto.request.CourseUpdateRequest;
import com.reading.platform.entity.Course;

import java.util.List;
import java.util.Map;

/**
 * Course Service Interface
 */
public interface CourseService {

    Course createCourse(String tenantId, CourseCreateRequest request);

    Course updateCourse(String id, CourseUpdateRequest request);

    Course getCourseById(String id);

    Page<Course> getCoursePage(String tenantId, Integer pageNum, Integer pageSize, String keyword, String category, String status);

    Page<Course> getSystemCoursePage(Integer pageNum, Integer pageSize, String keyword, String category, String status);

    void deleteCourse(String id);

    void publishCourse(String id);

    void archiveCourse(String id);

    List<Course> getCoursesByTenantId(String tenantId);

    Page<Course> getReviewCoursePage(Integer pageNum, Integer pageSize);

    void submitCourse(String id);

    void withdrawCourse(String id);

    void approveCourse(String id, String comment);

    void rejectCourse(String id, String comment);

    /**
     * 获取课程课时列表
     */
    List<Map<String, Object>> getCourseLessons(String courseId);

}
