add class mapping in yaml format, make Transaction abstract