package com.crm.ucard.service;

import com.crm.rely.backend.core.dto.base.BaseResultDto;
import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
import com.crm.rely.backend.core.dto.ucard.CardFileDto;
import com.crm.rely.backend.core.entity.base.BaseDeleteEntities;
import com.crm.rely.backend.core.entity.ucard.CardFileAddEntity;
import com.crm.rely.backend.core.entity.ucard.CardFilePageEntity;
import com.crm.rely.backend.core.entity.ucard.CardFileUpdateEntity;
import com.crm.rely.backend.core.entity.ucard.CardWebSocketEntity;
import com.crm.rely.backend.exception.ServiceException;
import org.springframework.web.multipart.MultipartFile;

public interface UcardFileService {

    /**
     * 扫码上传文件
     */
    BaseResultDto scanCode(CardWebSocketEntity entity) throws ServiceException;

    /**
     * 新增文件
     */
    BaseResultDto cardFileAdd(CardFileAddEntity entity) throws ServiceException;

    /**
     * 更新文件
     */
    BaseResultDto cardFileUpdate(CardFileUpdateEntity entity) throws ServiceException;

    /**
     * 删除文件
     */
    BaseResultDto cardFileDelete(BaseDeleteEntities entity) throws ServiceException;

    /**
     * 文件分页列表
     */
    ResultWithPagerDto<CardFileDto> cardFileSearchList(CardFilePageEntity entity) throws ServiceException;

    /**
     * 文件上传
     */
    String commonUpload(MultipartFile file, String middlePath) throws Exception;

}
