public function validateTimestamps(EntityDefinition $entityMetadata)
    {
        $columnNames = [];

        // get column names
        foreach ($entityMetadata['table']['columns'] as $column) {
            $columnNames[] = $column['name'];
        }

        // get version column names
        if (! empty($entityMetadata['versionTable'])) {
            foreach ($entityMetadata['versionTable']['columns'] as $column) {
                $columnNames[] = $column['name'];
            }
        }

        if (! in_array('created_at', $columnNames) || ! in_array('updated_at', $columnNames)) {
            throw new DomainException('@Timestamps annotation defined in class ' . $entityMetadata['class'] . ' requires a $createdAt and an $updatedAt column property.');
        }
    }