package org.springblade.modules.mall.wrapper;

import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.modules.mall.entity.Coupon;
import org.springblade.modules.mall.vo.CouponVO;

import java.util.Objects;

/**
 * Author pangqijun
 * Date 2023/5/6
 * Description
 */
public class CouponWrapper extends BaseEntityWrapper<Coupon, CouponVO> {

    public static CouponWrapper build() {
        return new CouponWrapper();
    }

    @Override
    public CouponVO entityVO(Coupon entity) {
        return Objects.requireNonNull(BeanUtil.copy(entity, CouponVO.class));
    }
}
