Fix error with enums type when generate from db