package com.persagy.labsl.services

import com.persagy.labsl.models.entities.tpt.Graph
import com.persagy.labsl.models.entities.tpt.pub.GraphPub
import com.persagy.service.models.requests.SCreateRequest
import com.persagy.service.models.requests.SUpdateRequest
import com.persagy.service.models.responses.SBaseResponse
import com.persagy.service.models.responses.SCreateResponse

/**
 * 图像处理逻辑
 * @author : lijie
 * Update By 2022/5/27 17:00
 */
interface GraphLogicService {
    /**
     * 创建草稿
     * @param request 请求参数
     * @return : com.persagy.service.models.responses.SCreateResponse<com.persagy.labsl.models.entities.tpt.Graph>
     * @author : lijie
     * Update By 2022/5/27 18:24
     */
    fun draftsCreateLogic(request: SCreateRequest<Graph>): SCreateResponse<Graph>

    /**
     * 保存草稿
     * @param graph 请求参数
     * @return : com.persagy.service.models.responses.SCreateResponse<com.persagy.labsl.models.entities.tpt.Graph>
     * @author : lijie
     * Update By 2022/5/27 18:24
     */
    fun saveLogic(graph: Graph): SCreateResponse<Graph>
    /**
     * 发布图形
     * @author : lijie
     * Update By 2022/5/27 18:42
     */
    fun pubDrawingsLogic(graph: GraphPub): SCreateResponse<GraphPub>

    /**
     * 图移至/移出回收站
     * @author : lijie
     * Update By 2022/5/31 19:20
     */
    fun recycleLogic(idList: ArrayList<Graph>): SBaseResponse
    /**
     * 已发布图形移至/移出回收站
     * @author : lijie
     * Update By 2022/5/31 19:23
     */
    fun recyclePubLogic(idList: ArrayList<Graph>): SBaseResponse
    /**
     * 草稿图形的更新操作
     * @author : lijie
     * Update By 2022/5/31 19:27
     */
    fun draftsUpdateLogic(request: SUpdateRequest<Graph>): SBaseResponse
    /**
     * 已发布图形的更新操作
     * @author : lijie
     * Update By 2022/5/31 19:30
     */
    fun pubUpdateLogic(request: SUpdateRequest<GraphPub>): SBaseResponse
    /**
     * 恢复回收站的图形
     * @author : lijie
     * Update By 2022/5/31 19:39
     */ 
    fun recoveryLogic(graph: Graph): SBaseResponse
    /**
     * 根据id删除图形
     * @author : lijie
     * Update By 2022/5/31 19:42
     */
    fun deleteByKeysListLogic(idList: ArrayList<Graph>): SBaseResponse
}