import { t as i18nT } from "i18next"; import { Link } from "react-router"; interface Props { items: { name: string; title: string; type?: ModelPropertyType; customType?: { name: string; route?: string }; description?: string; required: boolean }[]; } export enum ModelPropertyType { String, DateTime, Int, Decimal, Boolean, UUID, Cuid, } export default function DocPropertiesTable({ items }: Props) { return (
{items.map((item) => ( ))}
{i18nT("components.docs.properties.name")} {i18nT("components.docs.properties.title")} {i18nT("components.docs.properties.type")} {i18nT("components.docs.properties.description")}
{item.name} {item.required && *} {item.title} {item.customType && ( {item.customType.route ? ( {item.customType.name} ) : ( item.customType.name )} )} {item.type !== undefined && ModelPropertyType[item.type]} {item.description}
); }