Variable prismaModelCreateExcludeConst

prismaModelCreateExclude: typeof prismaModelCreateExclude = ...

Use this to define mock entries that shouldn't be saved to the database so that we can easily write tests for missing data.

import type {PrismaClient} from '@prisma/client';
import {prismaModelCreateExclude, PrismaKeyedModelCreate} from '@augment-vir/common';

export const mockUsers = {
user1: {
id: 1,
authRole: 'admin',
},
missingUser: {
id: -1,
authRole: 'user',
[prismaModelCreateExclude]: true,
},
} as const satisfies PrismaKeyedModelCreate<PrismaClient, 'User'>;

@augment-vir/common