package com.ai.da.service;


import com.ai.da.mapper.primary.entity.Style;
import com.ai.da.mapper.primary.entity.Workspace;
import com.ai.da.model.dto.ProjectDTO;
import com.ai.da.model.dto.WorkspaceDTO;
import com.ai.da.model.dto.WorkspaceSaveDTO;
import com.ai.da.model.enums.BizJson;
import com.ai.da.model.vo.ModelsVO;
import com.ai.da.model.vo.SaveOrUpdateProjectVO;
import com.ai.da.model.vo.StyleVO;
import com.ai.da.model.vo.WorkspaceVO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.transaction.annotation.Transactional;

import java.io.FileNotFoundException;
import java.util.List;

/**
 * 服务类
 *
 * @author SHAHAIBO
 * @since 2023-08-01
 */
public interface WorkspaceService extends IService<Workspace> {

    /**
     * 自定义分页
     *
     * @param page
     * @param workspace
     * @return
     */
    IPage<WorkspaceVO> selectWorkspacePage(IPage<WorkspaceVO> page, WorkspaceVO workspace);

    boolean saveOrUpdate(WorkspaceSaveDTO workspaceDTO);

    WorkspaceVO getPage(WorkspaceDTO query);

    List<BizJson> getEnumValues(String enumName);

    WorkspaceVO getByIdNew(Long id);

    WorkspaceVO getByIdForProject(Long id);

    List<ModelsVO> getMannequins(String sex, String style, String ageGroup);

    void systemFileCopy();

    void moveFile();

    void maleDataInsert() throws FileNotFoundException;

    List<Long> delete(List<Workspace> workspaceList);

    Workspace getCurrentWorkspace();

    List<StyleVO> styleList();

    @Transactional
    SaveOrUpdateProjectVO saveOrUpdateProject(ProjectDTO projectDTO);

    Long getByProjectId(Long projectId);

    Workspace getWSByProjectId(Long projectId);


    String getProjectSexById(Long projectId);

    String getStyleByProjectId(Long projectId);

    String getAgeGroupByProjectOrCollectionId(Long projectId, Long collectionId);
}
