27 lines
512 B
TypeScript
27 lines
512 B
TypeScript
import type { CollectionConfig } from "payload";
|
|
|
|
export const Users: CollectionConfig = {
|
|
slug: "users",
|
|
auth: true,
|
|
admin: {
|
|
useAsTitle: "email",
|
|
},
|
|
fields: [
|
|
{
|
|
name: "displayName",
|
|
type: "text",
|
|
},
|
|
{
|
|
name: "role",
|
|
type: "select",
|
|
options: [
|
|
{ label: "Admin", value: "admin" },
|
|
{ label: "Editor", value: "editor" },
|
|
{ label: "Author", value: "author" },
|
|
],
|
|
defaultValue: "author",
|
|
required: true,
|
|
},
|
|
],
|
|
};
|