Files
e-tib.com/src/payload/collections/Team.ts
Marc Mintel d14122005d Initial commit: E-TIB production hardening & E2E foundation
Former-commit-id: ef04fca3d76375630c05aac117bf586953f3b657
2026-04-28 19:11:38 +02:00

54 lines
1.1 KiB
TypeScript

import type { CollectionConfig } from 'payload';
import { authenticated } from '../access/authenticated';
import { anyone } from '../access/anyone';
export const Team: CollectionConfig = {
slug: 'team',
admin: {
useAsTitle: 'name',
defaultColumns: ['name', 'position', 'email'],
},
access: {
read: anyone,
create: authenticated,
update: authenticated,
delete: authenticated,
},
fields: [
{
name: 'name',
type: 'text',
required: true,
},
{
name: 'position',
type: 'text',
required: true,
},
{
name: 'email',
type: 'email',
},
{
name: 'phone',
type: 'text',
},
{
name: 'image',
type: 'upload',
relationTo: 'media',
},
{
name: 'branch',
type: 'select',
options: [
{ label: 'E-TIB GmbH', value: 'e-tib' },
{ label: 'Ingenieurgesellschaft', value: 'ing' },
{ label: 'Bohrtechnik', value: 'bohr' },
{ label: 'Verwaltung', value: 'verw' },
],
required: true,
},
],
};