create entity and mapper