import type { CollectionConfig } from "payload";

export const media: CollectionConfig = {
  slug: "media",
  custom: {
    retention: {
      purgeSchedule: "monthly",
      postDeletion: {
        duration: "P90D",
        trigger: "after-deletion",
        action: "hard-delete",
      },
    },
  },
  upload: {
    mimeTypes: ["image/*", "application/pdf"],
  },
  admin: {
    useAsTitle: "filename",
  },
  fields: [
    {
      name: "alt",
      type: "text",
      required: true,
    },
  ],
};
