package com.ruoyi.ss.suit.domain;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Set;

/**
 * @author wjh
 * 2024/5/8
 */
@Data
public class SuitBO extends Suit {

    @ApiModelProperty("设备ID集合")
    private Set<Long> deviceIds;


    /**
     * 过滤APP创建字段
     * @return
     */
    public SuitBO filterCreateByApp() {
        SuitBO bo = new SuitBO();
        bo.setName(getName());
        bo.setValue(getValue());
        bo.setPrice(getPrice());
        bo.setDescription(getDescription());
        bo.setTimeUnit(getTimeUnit());
        bo.setUserId(getUserId());
        bo.setDeviceIds(getDeviceIds());
        bo.setFeeMode(getFeeMode());
        bo.setFeeType(getFeeType());
        bo.setGearAmount(getGearAmount());
        bo.setGearTime(getGearTime());
        bo.setEnabledLowPowerClose(getEnabledLowPowerClose());
        bo.setLowPower(getLowPower());
        bo.setEnabledVoice(getEnabledVoice());
        bo.setVoiceMinutes(getVoiceMinutes());
        bo.setDeposit(getDeposit());
        return bo;
    }

    /**
     * 过滤APP更新字段
     * @return
     */
    public SuitBO filterUpdateByApp() {
        SuitBO bo = new SuitBO();
        bo.setSuitId(getSuitId());
        bo.setName(getName());
        bo.setValue(getValue());
        bo.setPrice(getPrice());
        bo.setDescription(getDescription());
        bo.setTimeUnit(getTimeUnit());
        bo.setDeviceIds(getDeviceIds());
        bo.setFeeMode(getFeeMode());
        bo.setFeeType(getFeeType());
        bo.setGearAmount(getGearAmount());
        bo.setGearTime(getGearTime());
        bo.setEnabledLowPowerClose(getEnabledLowPowerClose());
        bo.setLowPower(getLowPower());
        bo.setEnabledVoice(getEnabledVoice());
        bo.setVoiceMinutes(getVoiceMinutes());
        bo.setDeposit(getDeposit());
        return bo;
    }
}
