Files
payload/test/plugin-search/collections/Posts.ts
2024-03-19 00:59:56 -04:00

31 lines
492 B
TypeScript

import type { CollectionConfig } from 'payload/types'
import { postsSlug } from '../shared.js'
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',
},
],
}