make dto macro run on beforeinheritance