tianji/src/server/model/auditLog.ts

21 lines
408 B
TypeScript
Raw Normal View History

2024-01-22 05:07:46 +00:00
import { WorkspaceAuditLogType } from '@prisma/client';
import { prisma } from './_client';
/**
* create audit log which can query by log
*/
export async function createAuditLog(info: {
workspaceId: string;
relatedId?: string;
relatedType?: WorkspaceAuditLogType;
content: string;
}) {
const log = await prisma.workspaceAuditLog.create({
data: {
...info,
},
});
return log;
}