import { CollectionConfig } from "payload";

export const HabbitEntries: CollectionConfig = {
  slug: 'habbitEntries',
  admin: {
    useAsTitle: 'completedDate',
    group: 'User Data',
  },
  fields: [
    {
      name: 'habbit',
      type: 'relationship',
      relationTo: 'habbits'
    },
    {
      name: 'completedDate',
      type: 'date',
      admin: {
        date: {
          pickerAppearance: 'dayAndTime'
        }
      }
    },
  ],
}
