type PostFindUniqueResult = Prisma.Result<
typeof db.post,
{
where: {
id: string;
};
include: {
author: true;
tags: true;
comments: {
include: {
author: true;
};
};
};
},
'findUnique'
>;
let post: PostFindUniqueResult;
post = await PostModel.findUnique({
where: {
id: params.id,
},
include: {
author: true,
tags: true,
comments: {
include: {
author: true,
},
},
},
});
type PostFindUniqueResult = Prisma.Result<
typeof db.post,
{
where: {
id: string;
};
include: {
author: true;
tags: true;
comments: {
include: {
author: true;
};
};
};
},
'findUnique'
>;
let post: PostFindUniqueResult;
post = await PostModel.findUnique({
where: {
id: params.id,
},
include: {
author: true,
tags: true,
comments: {
include: {
author: true,
},
},
},
});