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

import com.baomidou.mybatisplus.extension.service.IService;
import com.lesingle.common.result.PageResult;
import com.lesingle.modules.biz.contest.dto.QueryWorkDto;
import com.lesingle.modules.biz.contest.dto.SubmitWorkDto;
import com.lesingle.modules.biz.contest.entity.BizContestWork;

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

public interface IContestWorkService extends IService<BizContestWork> {

    /**
     * 为指定活动生成下一个作品编号（与 {@link #submitWork} 所用规则一致：W{contestId}-{序号}）。
     */
    String nextContestWorkNo(Long contestId);

    Map<String, Object> submitWork(SubmitWorkDto dto, Long tenantId, Long submitterId);

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

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

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

    List<Map<String, Object>> getWorkVersions(Long registrationId);

    PageResult<Map<String, Object>> getGuidedWorks(Long contestId, String workNo, String playerName, String accountNo, Long page, Long pageSize, Long userId);

    void removeWork(Long id);
}
