add case class mapping and auto-gen primary key