24 lines
476 B
TypeScript
24 lines
476 B
TypeScript
import type { CollectionConfig } from '../../../../src/collections/config/types';
|
|
import { mediaSlug } from '../Media';
|
|
|
|
export const postsSlug = 'posts';
|
|
|
|
export const PostsCollection: CollectionConfig = {
|
|
slug: postsSlug,
|
|
fields: [
|
|
{
|
|
name: 'text',
|
|
type: 'text',
|
|
},
|
|
{
|
|
name: 'associatedMedia',
|
|
type: 'upload',
|
|
relationTo: mediaSlug,
|
|
access: {
|
|
create: () => true,
|
|
update: () => false,
|
|
},
|
|
},
|
|
],
|
|
};
|