package cn.iocoder.yudao.module.course.service;

import cn.iocoder.yudao.module.course.entity.SchoolStudentCommissionRecord;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

public interface SchoolStudentCommissionRecordService extends IService<SchoolStudentCommissionRecord>  {

    /**
     * 创建学员提成记录
     */
    boolean createRecord(SchoolStudentCommissionRecord record);

    /**
     * 更新学员提成记录
     */
    boolean updateRecord(SchoolStudentCommissionRecord record);

    /**
     * 删除学员提成记录
     */
    boolean deleteRecord(Long id);

    /**
     * 根据ID获取学员提成记录
     */
    SchoolStudentCommissionRecord getRecordById(Long id);

    /**
     * 获取学员的所有提成记录
     */
    List<SchoolStudentCommissionRecord> getRecordsByStudentId(Long studentId);

    /**
     * 获取教练的所有提成记录
     */
    List<SchoolStudentCommissionRecord> getRecordsByCoachId(Long coachId);

    /**
     * 更新提成发放状态
     */
    boolean updateGrantStatus(Long id, Integer isGrant);
}
