package com.cool.store.service.store;

import com.cool.store.request.store.StoreTypeOptionSaveRequest;
import com.cool.store.request.store.StoreTypeQueryRequest;
import com.cool.store.request.store.StoreTypeUpdateRequest;
import com.cool.store.vo.store.StoreTypeOptionVO;
import com.cool.store.vo.store.StoreTypeVO;
import com.github.pagehelper.PageInfo;

import java.util.List;

/**
 * 店型 Service
 */
public interface StoreTypeService {

    Boolean add(StoreTypeUpdateRequest request);

    Boolean update(StoreTypeUpdateRequest request);

    PageInfo<StoreTypeVO> queryPage(StoreTypeQueryRequest request);

    /**
     * 删除(软删除)：仅停用状态允许删除
     */
    Boolean deleteByIds(List<Long> ids);

    /**
     * 启用/停用
     */
    Boolean changeActive(Long id, Boolean active);

    /**
     * 保存店型可用配置选项
     */
    Boolean saveStoreTypeOptions(StoreTypeOptionSaveRequest request);

    /**
     * 查询店型已配置的选项绑定
     */
    List<StoreTypeOptionVO> listStoreTypeOptions(Long storeTypeId);

    /**
     * 小程序：按门店类型查询启用的店型
     */
    List<StoreTypeVO> listActiveByStoreType(Integer storeType);
}
