package com.eshore.gringotts.web.domain.base.controller;

import com.eshore.gringotts.web.configuration.amis.AmisResponse;
import org.eclipse.collections.api.set.ImmutableSet;

/**
 * @author lanyuanxiaoyao
 * @date 2024-11-28
 */
public interface SimpleController<SAVE_ITEM, LIST_ITEM, DETAIL_ITEM> {
    AmisResponse<Long> save(SAVE_ITEM item) throws Exception;

    AmisResponse<ImmutableSet<LIST_ITEM>> list() throws Exception;

    AmisResponse<DETAIL_ITEM> detail(Long id) throws Exception;

    AmisResponse<Object> remove(Long id) throws Exception;
}
