data class Customer(val id: Long, val name: String, val email: String)
data class UserDTO(var userId: Long = 0, var fullName: String = "", var contactEmail: String = "")
val mapping = Platymap
.flow(Customer::class.java)
.to(UserDTO::class.java)
.map { it.id }.to { dto, value -> dto.userId = value }
.map { it.name }.to { dto, value -> dto.fullName = value }
.map { it.email }.to { dto, value -> dto.contactEmail = value }
.build()
val customer = Customer(1, "John Doe", "[email protected]")
val userDTO = mapping.execute(customer)