59 lines
1.2 KiB
TypeScript
59 lines
1.2 KiB
TypeScript
import type { CollectionConfig } from 'payload'
|
|
|
|
export const Services: CollectionConfig = {
|
|
slug: 'services',
|
|
admin: {
|
|
useAsTitle: 'title',
|
|
defaultColumns: ['title', 'slug', 'updatedAt'],
|
|
},
|
|
fields: [
|
|
{
|
|
name: 'slug',
|
|
type: 'text',
|
|
required: true,
|
|
unique: true,
|
|
admin: { description: 'Identifiant URL (ex: construction-maison)' },
|
|
},
|
|
{
|
|
name: 'title',
|
|
type: 'text',
|
|
required: true,
|
|
label: 'Titre du service',
|
|
},
|
|
{
|
|
name: 'shortDescription',
|
|
type: 'text',
|
|
required: true,
|
|
label: 'Description courte (carte home page)',
|
|
},
|
|
{
|
|
name: 'longDescription',
|
|
type: 'textarea',
|
|
label: 'Description longue (page dédiée)',
|
|
},
|
|
{
|
|
name: 'icon',
|
|
type: 'text',
|
|
label: 'Emoji icône',
|
|
admin: { description: 'ex: 🏠' },
|
|
},
|
|
{
|
|
name: 'keywords',
|
|
type: 'array',
|
|
label: 'Mots-clés SEO',
|
|
fields: [
|
|
{
|
|
name: 'keyword',
|
|
type: 'text',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
name: 'order',
|
|
type: 'number',
|
|
label: "Ordre d'affichage",
|
|
defaultValue: 0,
|
|
},
|
|
],
|
|
}
|