package cn.com.poc.human_resources.convert;

import cn.com.poc.human_resources.model.BizHumanResourceResumeContentModel;
import cn.com.poc.human_resources.entity.BizHumanResourceResumeContentEntity;
import cn.com.poc.human_resources.dto.BizHumanResourceResumeContentDto;
import cn.com.poc.human_resources.query.ResumeContentQueryItem;


public class BizHumanResourceResumeContentConvert {

    public static BizHumanResourceResumeContentEntity modelToEntity(BizHumanResourceResumeContentModel model) {
        BizHumanResourceResumeContentEntity entity = new BizHumanResourceResumeContentEntity();
        entity.setId(model.getId());
        entity.setResumeId(model.getResumeId());
        entity.setPositionId(model.getPositionId());
        entity.setResumeContent(model.getResumeContent());
        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 BizHumanResourceResumeContentModel entityToModel(BizHumanResourceResumeContentEntity entity) {
        BizHumanResourceResumeContentModel model = new BizHumanResourceResumeContentModel();
        model.setId(entity.getId());
        model.setResumeId(entity.getResumeId());
        model.setPositionId(entity.getPositionId());
        model.setResumeContent(entity.getResumeContent());
        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 BizHumanResourceResumeContentDto entityToDto(BizHumanResourceResumeContentEntity entity) {
        BizHumanResourceResumeContentDto dto = new BizHumanResourceResumeContentDto();
        dto.setId(entity.getId());
        dto.setResumeId(entity.getResumeId());
        dto.setPositionId(entity.getPositionId());
        dto.setResumeContent(entity.getResumeContent());
        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 BizHumanResourceResumeContentEntity dtoToEntity(BizHumanResourceResumeContentDto dto) {
        BizHumanResourceResumeContentEntity entity = new BizHumanResourceResumeContentEntity();
        entity.setId(dto.getId());
        entity.setResumeId(dto.getResumeId());
        entity.setPositionId(dto.getPositionId());
        entity.setResumeContent(dto.getResumeContent());
        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;
    }

    public static BizHumanResourceResumeContentEntity itemToEntity(ResumeContentQueryItem item) {
        BizHumanResourceResumeContentEntity bizHumanResourceResumeContentEntity =
                new BizHumanResourceResumeContentEntity();
        bizHumanResourceResumeContentEntity.setId(item.getId());
        bizHumanResourceResumeContentEntity.setResumeId(item.getResumeId());
        bizHumanResourceResumeContentEntity.setPositionId(item.getPositionId());
        bizHumanResourceResumeContentEntity.setResumeContent(item.getResumeContent());
        bizHumanResourceResumeContentEntity.setIsDeleted(item.getIsDeleted());
        bizHumanResourceResumeContentEntity.setCreator(item.getCreator());
        bizHumanResourceResumeContentEntity.setCreatedTime(item.getCreatedTime());
        bizHumanResourceResumeContentEntity.setModifier(item.getModifier());
        bizHumanResourceResumeContentEntity.setModifiedTime(item.getModifiedTime());
        bizHumanResourceResumeContentEntity.setSysVersion(item.getSysVersion());
        return bizHumanResourceResumeContentEntity;
    }
}