dev #12
@ -1,5 +1,6 @@
|
||||
import type { CollectionConfig } from "payload";
|
||||
import { lexicalEditor } from "@payloadcms/richtext-lexical";
|
||||
import formatSlug from "@/utils/payload/formatSlug";
|
||||
|
||||
export const Teams: CollectionConfig = {
|
||||
slug: "teams",
|
||||
@ -9,6 +10,13 @@ export const Teams: CollectionConfig = {
|
||||
type: "text",
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
name: "slug",
|
||||
type: "text",
|
||||
hooks: {
|
||||
beforeValidate: [formatSlug("name")],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "role",
|
||||
type: "text",
|
||||
|
@ -319,6 +319,7 @@ export interface Page {
|
||||
export interface Team {
|
||||
id: number;
|
||||
name: string;
|
||||
slug?: string | null;
|
||||
role: string;
|
||||
img: number | Media;
|
||||
biography?: {
|
||||
@ -762,6 +763,7 @@ export interface PagesSelect<T extends boolean = true> {
|
||||
*/
|
||||
export interface TeamsSelect<T extends boolean = true> {
|
||||
name?: T;
|
||||
slug?: T;
|
||||
role?: T;
|
||||
img?: T;
|
||||
biography?: T;
|
||||
|
Loading…
x
Reference in New Issue
Block a user