cms.c2sgmbh/src/collections/SocialLinks.ts
Martin Porwoll 885ec93748 feat: add content collections for multi-tenant CMS
New collections:
- Categories: hierarchical content categorization
- Pages: flexible page builder with blocks
- Posts: blog/news articles with SEO
- Testimonials: customer reviews/quotes

Cookie & Consent management:
- ConsentLogs: GDPR consent tracking
- CookieConfigurations: per-tenant cookie settings
- CookieInventory: cookie registry

Additional:
- NewsletterSubscribers: email subscription management
- PrivacyPolicySettings: privacy policy configuration
- SocialLinks: social media links

Update Media collection with tenant support and image variants

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 08:18:58 +00:00

39 lines
889 B
TypeScript

import type { CollectionConfig } from 'payload'
export const SocialLinks: CollectionConfig = {
slug: 'social-links',
admin: {
useAsTitle: 'platform',
},
access: {
read: () => true,
create: ({ req }) => !!req.user,
update: ({ req }) => !!req.user,
delete: ({ req }) => !!req.user,
},
fields: [
{
name: 'platform',
type: 'select',
required: true,
options: [
{ label: 'Facebook', value: 'facebook' },
{ label: 'X (Twitter)', value: 'x' },
{ label: 'Instagram', value: 'instagram' },
{ label: 'YouTube', value: 'youtube' },
{ label: 'LinkedIn', value: 'linkedin' },
{ label: 'Xing', value: 'xing' },
],
},
{
name: 'url',
type: 'text',
required: true,
},
{
name: 'isActive',
type: 'checkbox',
defaultValue: true,
},
],
}