Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose'; import { Document, Schema as MongooseSchema } from 'mongoose'; @Schema({ collection: 'project_import_exports', timestamps: true }) export class ProjectImportExport extends Document { @Prop({ type: MongooseSchema.Types.ObjectId, required: true, index: true }) tenantId!: MongooseSchema.Types.ObjectId; @Prop({ required: true, enum: ['import', 'export'] }) jobType!: string; @Prop({ required: true, enum: ['projects', 'tasks', 'time_entries'] }) entityType!: string; @Prop({ required: true, enum: ['pending', 'processing', 'completed', 'failed'], }) status!: string; @Prop({ default: 0 }) totalRecords!: number; @Prop({ default: 0 }) processedRecords!: number; @Prop({ default: 0 }) failedRecords!: number; @Prop({ type: [MongooseSchema.Types.Mixed], default: [] }) validationErrors!: Record<string, unknown>[]; @Prop({ type: MongooseSchema.Types.ObjectId }) createdBy?: MongooseSchema.Types.ObjectId; } export const ProjectImportExportSchema = SchemaFactory.createForClass(ProjectImportExport); |