Files
payload/test/fields/collections/Point/index.ts
2023-09-01 14:45:41 -04:00

45 lines
803 B
TypeScript

import type { CollectionConfig } from '../../../../packages/payload/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