package com.zhongshu.card.server.core.service.devices.deviceProduct;

import com.github.microservice.net.ResultContent;
import com.zhongshu.card.client.model.devices.deviceProduct.DeviceProductModel;
import com.zhongshu.card.client.model.devices.deviceProduct.DeviceProductParam;
import com.zhongshu.card.server.core.dao.devices.DeviceProductDao;
import com.zhongshu.card.server.core.dao.org.OrganizationDao;
import com.zhongshu.card.server.core.domain.devices.DeviceProduct;
import com.zhongshu.card.server.core.service.base.SuperService;
import com.zhongshu.card.server.core.util.BeanUtils;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author TRX
 * @date 2025/1/8
 */
@Slf4j
@Service
public class DeviceProductService extends SuperService {

    @Autowired
    private DeviceProductDao deviceProductDao;

    @Autowired
    private OrganizationDao organizationDao;

    public ResultContent saveInfo(DeviceProductParam param) {


        return ResultContent.buildSuccess();
    }

    public DeviceProductModel toModel(DeviceProduct entity) {
        DeviceProductModel model = new DeviceProductModel();
        if (ObjectUtils.isNotEmpty(entity)) {
            BeanUtils.copyProperties(entity, model);


        }
        return model;
    }
}
