Use enum instead of regex in repository schema