DesenrolaAi / backend /src /admin /entities /error-log.entity.ts
Rafael Giandoso
feat: deploy DesenrolaAí no HF Spaces
af69a75
Raw
History Blame Contribute Delete
627 Bytes
import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
import { Document } from 'mongoose';
@Schema({ timestamps: true })
export class ErrorLog extends Document {
@Prop({ required: true, index: true })
path!: string;
@Prop({ required: true })
method!: string;
@Prop({ required: true })
statusCode!: number;
@Prop()
errorName?: string;
@Prop()
message?: string;
@Prop()
stack?: string;
@Prop()
ip?: string;
@Prop()
userAgent?: string;
@Prop({ type: Object })
requestContext?: Record<string, unknown>;
}
export const ErrorLogSchema = SchemaFactory.createForClass(ErrorLog);