Skip to content
This repository was archived by the owner on May 19, 2021. It is now read-only.

Latest commit

 

History

History
12 lines (11 loc) · 439 Bytes

File metadata and controls

12 lines (11 loc) · 439 Bytes

data_mapper

MapのDelegatePropertyのキーをアノテーションで任意に設定

MutableMapの演算子をオーバーロードを実装しているため必ずMutableMapperを継承してください

class Human(map:MutableMap): MutableMapper() {
  @Mapper(name = "first_name")
  val firstName: String by map
  @Mapper(name = "last_name")
  val lastName: String by map
  val age: Int by map
}