package cn.com.poc.equity.convert;	

import cn.com.poc.equity.model.BizPaymentPackageConfigurationModel;
import cn.com.poc.equity.entity.BizPaymentPackageConfigurationEntity;
import cn.com.poc.equity.dto.BizPaymentPackageConfigurationDto;


public class BizPaymentPackageConfigurationConvert {

    public static BizPaymentPackageConfigurationEntity modelToEntity(BizPaymentPackageConfigurationModel model){
        BizPaymentPackageConfigurationEntity entity = new BizPaymentPackageConfigurationEntity();
        entity.setId(model.getId());
        entity.setType(model.getType());
        entity.setDomain(model.getDomain());
        entity.setName(model.getName());
        entity.setExpiredNum(model.getExpiredNum());
        entity.setExpiredType(model.getExpiredType());
        entity.setAmount(model.getAmount());
        entity.setResourceCount(model.getResourceCount());
        entity.setOriginalPrice(model.getOriginalPrice());
        entity.setIsShowOriginalPrice(model.getIsShowOriginalPrice());
        entity.setSort(model.getSort());
        entity.setDescription(model.getDescription());
        entity.setExtraData(model.getExtraData());
        entity.setIsDeleted(model.getIsDeleted());
        entity.setCreator(model.getCreator());
        entity.setCreatedTime(model.getCreatedTime());
        entity.setModifier(model.getModifier());
        entity.setModifiedTime(model.getModifiedTime());
        entity.setSysVersion(model.getSysVersion());
        return entity;
    }

    public static BizPaymentPackageConfigurationModel entityToModel(BizPaymentPackageConfigurationEntity entity){
        BizPaymentPackageConfigurationModel model = new BizPaymentPackageConfigurationModel();
        model.setId(entity.getId());
        model.setType(entity.getType());
        model.setDomain(entity.getDomain());
        model.setName(entity.getName());
        model.setExpiredNum(entity.getExpiredNum());
        model.setExpiredType(entity.getExpiredType());
        model.setAmount(entity.getAmount());
        model.setResourceCount(entity.getResourceCount());
        model.setOriginalPrice(entity.getOriginalPrice());
        model.setIsShowOriginalPrice(entity.getIsShowOriginalPrice());
        model.setSort(entity.getSort());
        model.setDescription(entity.getDescription());
        model.setExtraData(entity.getExtraData());
        model.setIsDeleted(entity.getIsDeleted());
        model.setCreator(entity.getCreator());
        model.setCreatedTime(entity.getCreatedTime());
        model.setModifier(entity.getModifier());
        model.setModifiedTime(entity.getModifiedTime());
        model.setSysVersion(entity.getSysVersion());
        return model;
    }
    
    public static BizPaymentPackageConfigurationDto entityToDto(BizPaymentPackageConfigurationEntity entity){
        BizPaymentPackageConfigurationDto dto = new BizPaymentPackageConfigurationDto();
        dto.setId(entity.getId());
        dto.setType(entity.getType());
        dto.setDomain(entity.getDomain());
        dto.setName(entity.getName());
        dto.setExpiredNum(entity.getExpiredNum());
        dto.setExpiredType(entity.getExpiredType());
        dto.setAmount(entity.getAmount());
        dto.setResourceCount(entity.getResourceCount());
        dto.setOriginalPrice(entity.getOriginalPrice());
        dto.setIsShowOriginalPrice(entity.getIsShowOriginalPrice());
        dto.setSort(entity.getSort());
        dto.setDescription(entity.getDescription());
        dto.setExtraData(entity.getExtraData());
        dto.setIsDeleted(entity.getIsDeleted());
        dto.setCreator(entity.getCreator());
        dto.setCreatedTime(entity.getCreatedTime());
        dto.setModifier(entity.getModifier());
        dto.setModifiedTime(entity.getModifiedTime());
        dto.setSysVersion(entity.getSysVersion());
        return dto;
    }

    public static BizPaymentPackageConfigurationEntity dtoToEntity(BizPaymentPackageConfigurationDto dto){
        BizPaymentPackageConfigurationEntity entity = new BizPaymentPackageConfigurationEntity();
        entity.setId(dto.getId());
        entity.setType(dto.getType());
        entity.setDomain(dto.getDomain());
        entity.setName(dto.getName());
        entity.setExpiredNum(dto.getExpiredNum());
        entity.setExpiredType(dto.getExpiredType());
        entity.setAmount(dto.getAmount());
        entity.setResourceCount(dto.getResourceCount());
        entity.setOriginalPrice(dto.getOriginalPrice());
        entity.setIsShowOriginalPrice(dto.getIsShowOriginalPrice());
        entity.setSort(dto.getSort());
        entity.setDescription(dto.getDescription());
        entity.setExtraData(dto.getExtraData());
        entity.setIsDeleted(dto.getIsDeleted());
        entity.setCreator(dto.getCreator());
        entity.setCreatedTime(dto.getCreatedTime());
        entity.setModifier(dto.getModifier());
        entity.setModifiedTime(dto.getModifiedTime());
        entity.setSysVersion(dto.getSysVersion());
        return entity;
    }
}