package com.competition.modules.biz.contest.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.competition.common.result.PageResult;
import com.competition.modules.biz.contest.dto.CreateContestDto;
import com.competition.modules.biz.contest.dto.QueryContestDto;
import com.competition.modules.biz.contest.entity.BizContest;

import java.util.Map;

public interface IContestService extends IService<BizContest> {

    BizContest createContest(CreateContestDto dto, Long creatorId);

    PageResult<Map<String, Object>> findAll(QueryContestDto dto, Long tenantId, boolean isSuperTenant);

    PageResult<Map<String, Object>> getMyContests(QueryContestDto dto, Long userId, Long tenantId);

    Map<String, Object> findDetail(Long id);

    BizContest updateContest(Long id, CreateContestDto dto);

    void publishContest(Long id, String contestState);

    void finishContest(Long id);

    void reopenContest(Long id);

    void removeContest(Long id);

    Map<String, Object> getStats(Long tenantId, boolean isSuperTenant);

    Map<String, Object> getDashboard(Long tenantId);
}
