package com.ruoyi.bst.suit.service.impl;

import com.ruoyi.bst.store.domain.Store;
import com.ruoyi.bst.store.service.StoreConverter;
import com.ruoyi.bst.suit.domain.Suit;
import com.ruoyi.bst.suit.service.SuitConverter;
import org.springframework.stereotype.Service;

@Service
public class SuitConverterImpl implements SuitConverter {
    @Override
    public Suit toPoByCreate(Suit data) {
        if (data == null) {
            return null;
        }
        Suit po = new Suit();
        // 设置基本信息
        po.setUserId(data.getUserId());
        po.setStoreId(data.getStoreId());
        po.setOrderNum(data.getOrderNum());
        po.setLightingNums(data.getLightingNums());
        po.setRechargeAmount(data.getRechargeAmount());
        po.setStatus(data.getStatus());
        return po;
    }

    @Override
    public Suit toPoByUpdate(Suit data) {
        if (data == null) {
            return null;
        }
        Suit po = new Suit();
        // 设置基本信息
        po.setSuitId(data.getSuitId());
        po.setOrderNum(data.getOrderNum());
        po.setStoreId(data.getStoreId());
        po.setLightingNums(data.getLightingNums());
        po.setRechargeAmount(data.getRechargeAmount());
        po.setStatus(data.getStatus());
        return po;
    }
}
