added autoInc on primary key and made it optional in case class