(kind: DMMF.FieldKind, name: string, type: string, extra?: Partial<DMMF.Field>)
| 2 | import type * as DMMF from '@prisma/dmmf' |
| 3 | |
| 4 | export function field(kind: DMMF.FieldKind, name: string, type: string, extra?: Partial<DMMF.Field>): DMMF.Field { |
| 5 | return { |
| 6 | kind, |
| 7 | name, |
| 8 | type, |
| 9 | isRequired: false, |
| 10 | isList: false, |
| 11 | isUnique: true, |
| 12 | isId: true, |
| 13 | isReadOnly: false, |
| 14 | hasDefaultValue: false, |
| 15 | ...extra, |
| 16 | } |
| 17 | } |
| 18 | |
| 19 | export function model(name: string, fields: DMMF.Field[]): DMMF.Model { |
| 20 | return { |
no outgoing calls
no test coverage detected