Files
payload/test/fields/collections/Point/index.ts
2022-08-15 16:54:23 -04:00

45 lines
791 B
TypeScript

import type { CollectionConfig } from '../../../../src/collections/config/types';
export const pointFieldsSlug = 'point-fields';
const PointFields: CollectionConfig = {
slug: pointFieldsSlug,
admin: {
useAsTitle: 'point',
},
versions: true,
fields: [
{
name: 'point',
type: 'point',
label: 'Location',
required: true,
},
{
name: 'localized',
type: 'point',
label: 'Localized Point',
unique: true,
localized: true,
},
{
type: 'group',
name: 'group',
fields: [
{
name: 'point',
type: 'point',
},
],
},
],
};
export const pointDoc = {
point: [7, -7],
localized: [15, -12],
group: { point: [1, 9] },
};
export default PointFields;