package com.td.boss.game.complayerland.service;

import com.td.boss.common.service.CommonService;
import com.td.boss.game.complayerland.pojo.ComPlayerDisasterProtected;
import com.td.boss.game.complayerland.vo.ComPlayerDisasterEnum;
import com.td.boss.game.complayerland.vo.ComPlayerDisasterProtectedVo;

import java.util.List;

public interface ComPlayerDisasterProtectedService extends CommonService<ComPlayerDisasterProtectedVo, ComPlayerDisasterProtected, String> {

    /**
     * 获取购买过的历史防护
     * @param userId
     * @return
     */
    List<ComPlayerDisasterProtected> getComPlayerDisasterProtectedByUserIdOrderByProtectTimeDesc(String userId);

    /**
     * 购买灾难防护 自动延长时间
     * @param userId 购买者
     * @param comPlayerDisasterEnum 购买类型
     * @param days 购买天数
     */
    void append(String userId, ComPlayerDisasterEnum comPlayerDisasterEnum, Integer days);
}
