lumbung-kios-cms/src/collections/Makers.ts
2023-01-24 13:20:27 +01:00

32 lines
669 B
TypeScript

import { CollectionConfig } from 'payload/types';
const Makers: CollectionConfig = {
slug: 'makers',
// admin: {
// useAsTitle: 'email',
// },
access: {
read: () => true,
},
fields: [
{
name: 'name', // required
type: 'text', // required
required: true,
},
{
name: 'location',
type: 'point',
label: 'Location',
},
{
name: 'products', // required
type: 'relationship', // required
relationTo: 'products', // required
hasMany: true,
// TODO: make the name of the product visible in the dropdown
}
],
};
export default Makers;