Files
payloadcms/test/plugin-search/collections/Posts.ts
2024-02-17 01:00:48 -05:00

31 lines
513 B
TypeScript

import type { CollectionConfig } from 'payload/dist/collections/config/types'
import { postsSlug } from '../shared'
export const Posts: CollectionConfig = {
slug: postsSlug,
labels: {
singular: 'Post',
plural: 'Posts',
},
admin: {
useAsTitle: 'title',
},
versions: {
drafts: true,
},
fields: [
{
name: 'title',
label: 'Title',
type: 'text',
required: true,
},
{
name: 'excerpt',
label: 'Excerpt',
type: 'text',
},
],
}