Added setCreatedAt to factory