UNPKG

prisma-markdown

Version:

Prisma Markdown documents generator including ERD diagrams and comment descriptions

82 lines (81 loc) 1.48 kB
import { DMMF } from "@prisma/generator-helper"; /** * @pattern /[tsdnkr]/g */ type FormatString = string; /** * supported function * * @export * @interface IField */ export interface IFieldUtil { format(formatString?: FormatString): string; data(): IFieldData; } /** * FieldUtil * * @param {DMMF.Field} field * @param {boolean} [isFK] * @return {*} {IField} */ export declare const FieldUtil: (field: DMMF.Field, isFK?: boolean) => IFieldUtil; /** * process DMMF.Field * * @export * @interface IFieldData */ export interface IFieldData { /** * prisma type * * @type {string} * @memberof IFieldData */ type: string; /** * prisma database mapping name * * @type {string} * @memberof IFieldData */ name: string; /** * format tag * * @type {null | string} * @memberof IFieldData */ format: null | string; /** * colunm type * * @type {null | string} * @memberof IFieldData */ nativeType: null | string; /** * column size * * @type {null | number} * @memberof IFieldData */ size: null | number; /** * "PK" | "UK" | "FK" expressed null, singly or mixed * * @type {null | string} * @memberof IFieldData */ constraint: null | string; /** * not null * * @type {boolean} * @memberof IFieldData */ nullable: boolean; } export {};