All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.arextest.schedule.model.converter.ReplayPlanConverter Maven / Gradle / Ivy

There is a newer version: 2.0.4
Show newest version
package com.arextest.schedule.model.converter;

import com.arextest.schedule.model.ReplayPlan;
import com.arextest.schedule.model.dao.mongodb.ReplayPlanCollection;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

/**
 * Created by rchen9 on 2022/8/19.
 */
@Mapper
public interface ReplayPlanConverter {

  ReplayPlanConverter INSTANCE = Mappers.getMapper(ReplayPlanConverter.class);

  ReplayPlan dtoFromDao(ReplayPlanCollection dao);


  @Mappings({
      @Mapping(target = "id", expression = "java(null)"),
      @Mapping(target = "dataChangeCreateTime", expression = "java(System.currentTimeMillis())"),
      @Mapping(target = "dataChangeUpdateTime", expression = "java(System.currentTimeMillis())"),
      @Mapping(target = "dataChangeCreateDate", expression = "java(new java.util.Date())")
  })
  ReplayPlanCollection daoFromDto(ReplayPlan dto);

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy