package com.ruoyi.ss.device.domain;

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

import java.util.Set;

/**
 * @author wjh
 * 2024/5/10
 */
@Data
public class DeviceBO extends Device {

    @ApiModelProperty("套餐ID列表")
    private Set<Long> suitIds;

    /**
     * 过滤新增字段
     */
    public DeviceBO filterCreate() {
        DeviceBO bo = new DeviceBO();
        bo.setCustomPicture(getCustomPicture());
        bo.setModelId(getModelId());
        bo.setMac(getMac());
        bo.setDeviceNo(getDeviceNo());
        bo.setDeviceName(getDeviceName());
        bo.setServiceRate(getServiceRate());
        bo.setRemark(getRemark());
        bo.setServiceType(getServiceType());
        bo.setStartTime(getStartTime());
        bo.setStartPrice(getStartPrice());
        bo.setStartUnit(getStartUnit());
        bo.setOverTime(getOverTime());
        bo.setOverPrice(getOverPrice());
        bo.setOverUnit(getOverUnit());
        bo.setSuitIds(getSuitIds());
        bo.setLimitRechargeTime(getLimitRechargeTime());
        bo.setLimitRechargeReason(getLimitRechargeReason());
        bo.setServiceMode(getServiceMode());
        bo.setAgentServiceRate(getAgentServiceRate());
        bo.setAgentId(getAgentId());
        bo.setMonthFee(getMonthFee());
        return bo;
    }

    /**
     * 过滤更新字段
     */
    public DeviceBO filterUpdate() {
        DeviceBO bo = new DeviceBO();
        bo.setDeviceId(getDeviceId());
        bo.setCustomPicture(getCustomPicture());
        bo.setModelId(getModelId());
        bo.setDeviceNo(getDeviceNo());
        bo.setDeviceName(getDeviceName());
        bo.setServiceRate(getServiceRate());
        bo.setRemark(getRemark());
        bo.setServiceType(getServiceType());
        bo.setStartTime(getStartTime());
        bo.setStartPrice(getStartPrice());
        bo.setStartUnit(getStartUnit());
        bo.setOverTime(getOverTime());
        bo.setOverPrice(getOverPrice());
        bo.setOverUnit(getOverUnit());
        bo.setSuitIds(getSuitIds());
        bo.setLimitRechargeTime(getLimitRechargeTime());
        bo.setLimitRechargeReason(getLimitRechargeReason());
        bo.setServiceMode(getServiceMode());
        bo.setAgentServiceRate(getAgentServiceRate());
        bo.setAgentId(getAgentId());
        bo.setMonthFee(getMonthFee());
        return bo;
    }

    /**
     * 过滤代理商更新字段
     * @return
     */
    public DeviceBO filterUpdateByAgent() {
        DeviceBO bo = new DeviceBO();
        bo.setDeviceId(getDeviceId());
        bo.setAgentServiceRate(getAgentServiceRate());
        return bo;
    }
}
