lumbung-kios-cms/src/collections/Makers.ts

32 lines
669 B
TypeScript
Raw Normal View History

2023-01-24 12:20:27 +00:00
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;