Add AuditLog table and Prisma audit extension
This commit is contained in:
@@ -398,7 +398,8 @@ export const ModelName = {
|
||||
ProclamationCategory: 'ProclamationCategory',
|
||||
LicenseKey: 'LicenseKey',
|
||||
ApiKey: 'ApiKey',
|
||||
ColorPalette: 'ColorPalette'
|
||||
ColorPalette: 'ColorPalette',
|
||||
AuditLog: 'AuditLog'
|
||||
} as const
|
||||
|
||||
export type ModelName = (typeof ModelName)[keyof typeof ModelName]
|
||||
@@ -414,7 +415,7 @@ export type TypeMap<ExtArgs extends runtime.Types.Extensions.InternalArgs = runt
|
||||
omit: GlobalOmitOptions
|
||||
}
|
||||
meta: {
|
||||
modelProps: "user" | "profile" | "address" | "session" | "account" | "userRole" | "verification" | "proclamation" | "proclamationGroup" | "userProclamations" | "solfeggioFrequency" | "proclamationCategory" | "licenseKey" | "apiKey" | "colorPalette"
|
||||
modelProps: "user" | "profile" | "address" | "session" | "account" | "userRole" | "verification" | "proclamation" | "proclamationGroup" | "userProclamations" | "solfeggioFrequency" | "proclamationCategory" | "licenseKey" | "apiKey" | "colorPalette" | "auditLog"
|
||||
txIsolationLevel: TransactionIsolationLevel
|
||||
}
|
||||
model: {
|
||||
@@ -1528,6 +1529,80 @@ export type TypeMap<ExtArgs extends runtime.Types.Extensions.InternalArgs = runt
|
||||
}
|
||||
}
|
||||
}
|
||||
AuditLog: {
|
||||
payload: Prisma.$AuditLogPayload<ExtArgs>
|
||||
fields: Prisma.AuditLogFieldRefs
|
||||
operations: {
|
||||
findUnique: {
|
||||
args: Prisma.AuditLogFindUniqueArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$AuditLogPayload> | null
|
||||
}
|
||||
findUniqueOrThrow: {
|
||||
args: Prisma.AuditLogFindUniqueOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$AuditLogPayload>
|
||||
}
|
||||
findFirst: {
|
||||
args: Prisma.AuditLogFindFirstArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$AuditLogPayload> | null
|
||||
}
|
||||
findFirstOrThrow: {
|
||||
args: Prisma.AuditLogFindFirstOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$AuditLogPayload>
|
||||
}
|
||||
findMany: {
|
||||
args: Prisma.AuditLogFindManyArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$AuditLogPayload>[]
|
||||
}
|
||||
create: {
|
||||
args: Prisma.AuditLogCreateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$AuditLogPayload>
|
||||
}
|
||||
createMany: {
|
||||
args: Prisma.AuditLogCreateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
createManyAndReturn: {
|
||||
args: Prisma.AuditLogCreateManyAndReturnArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$AuditLogPayload>[]
|
||||
}
|
||||
delete: {
|
||||
args: Prisma.AuditLogDeleteArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$AuditLogPayload>
|
||||
}
|
||||
update: {
|
||||
args: Prisma.AuditLogUpdateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$AuditLogPayload>
|
||||
}
|
||||
deleteMany: {
|
||||
args: Prisma.AuditLogDeleteManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
updateMany: {
|
||||
args: Prisma.AuditLogUpdateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
updateManyAndReturn: {
|
||||
args: Prisma.AuditLogUpdateManyAndReturnArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$AuditLogPayload>[]
|
||||
}
|
||||
upsert: {
|
||||
args: Prisma.AuditLogUpsertArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$AuditLogPayload>
|
||||
}
|
||||
aggregate: {
|
||||
args: Prisma.AuditLogAggregateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.AggregateAuditLog>
|
||||
}
|
||||
groupBy: {
|
||||
args: Prisma.AuditLogGroupByArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.AuditLogGroupByOutputType>[]
|
||||
}
|
||||
count: {
|
||||
args: Prisma.AuditLogCountArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.AuditLogCountAggregateOutputType> | number
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} & {
|
||||
other: {
|
||||
@@ -1746,6 +1821,25 @@ export const ColorPaletteScalarFieldEnum = {
|
||||
export type ColorPaletteScalarFieldEnum = (typeof ColorPaletteScalarFieldEnum)[keyof typeof ColorPaletteScalarFieldEnum]
|
||||
|
||||
|
||||
export const AuditLogScalarFieldEnum = {
|
||||
id: 'id',
|
||||
createdAt: 'createdAt',
|
||||
userId: 'userId',
|
||||
email: 'email',
|
||||
roleId: 'roleId',
|
||||
roleName: 'roleName',
|
||||
page: 'page',
|
||||
action: 'action',
|
||||
entity: 'entity',
|
||||
entityId: 'entityId',
|
||||
before: 'before',
|
||||
after: 'after',
|
||||
ip: 'ip'
|
||||
} as const
|
||||
|
||||
export type AuditLogScalarFieldEnum = (typeof AuditLogScalarFieldEnum)[keyof typeof AuditLogScalarFieldEnum]
|
||||
|
||||
|
||||
export const SortOrder = {
|
||||
asc: 'asc',
|
||||
desc: 'desc'
|
||||
@@ -1761,6 +1855,14 @@ export const JsonNullValueInput = {
|
||||
export type JsonNullValueInput = (typeof JsonNullValueInput)[keyof typeof JsonNullValueInput]
|
||||
|
||||
|
||||
export const NullableJsonNullValueInput = {
|
||||
DbNull: DbNull,
|
||||
JsonNull: JsonNull
|
||||
} as const
|
||||
|
||||
export type NullableJsonNullValueInput = (typeof NullableJsonNullValueInput)[keyof typeof NullableJsonNullValueInput]
|
||||
|
||||
|
||||
export const QueryMode = {
|
||||
default: 'default',
|
||||
insensitive: 'insensitive'
|
||||
@@ -1993,6 +2095,7 @@ export type GlobalOmitConfig = {
|
||||
licenseKey?: Prisma.LicenseKeyOmit
|
||||
apiKey?: Prisma.ApiKeyOmit
|
||||
colorPalette?: Prisma.ColorPaletteOmit
|
||||
auditLog?: Prisma.AuditLogOmit
|
||||
}
|
||||
|
||||
/* Types for Logging */
|
||||
|
||||
Reference in New Issue
Block a user