37 lines
614 B
TypeScript
37 lines
614 B
TypeScript
// const payload = require('payload');
|
|
import type { CollectionConfig } from 'payload/types'
|
|
|
|
export const Pages: CollectionConfig = {
|
|
slug: 'pages',
|
|
labels: {
|
|
singular: 'Page',
|
|
plural: 'Pages',
|
|
},
|
|
admin: {
|
|
useAsTitle: 'title',
|
|
},
|
|
access: {
|
|
read: () => true,
|
|
},
|
|
fields: [
|
|
{
|
|
name: 'title',
|
|
label: 'Title',
|
|
type: 'text',
|
|
required: true,
|
|
},
|
|
{
|
|
name: 'slug',
|
|
label: 'Slug',
|
|
type: 'text',
|
|
required: true,
|
|
},
|
|
{
|
|
name: 'form',
|
|
label: 'Form',
|
|
type: 'relationship',
|
|
relationTo: 'forms',
|
|
},
|
|
],
|
|
}
|