UNPKG

lingapp-revisao-redacao

Version:

Mongoose model for managing essay reviews

84 lines (66 loc) 1.98 kB
# @lingapp/revisao-redacao A Mongoose model for managing essay reviews in the LingApp system. This package provides a structured way to handle essay reviews with annotations, comments, and scoring. ## Features - Full TypeScript support - Mongoose model with proper typing - Support for PDF annotations - Competency-based review system - Status tracking for reviews - File attachments support (review PDF and audio feedback) ## Installation ```bash npm install @lingapp/revisao-redacao # or yarn add @lingapp/revisao-redacao ``` ## Usage ```typescript import { RevisaoRedacao, RevisaoRedacaoInterface, StatusRevisaoRedacao } from '@lingapp/revisao-redacao'; // Create a new review const review = new RevisaoRedacao({ tema: temaId, redacao: redacaoId, status: StatusRevisaoRedacao.EmAvaliacao, revisor: revisorId, revisao: [ { competencia: competenciaId, nota: 8.5, comentarios: [ { id: '1', linha: 5, comentario: 'Good argument structure', tags: [{ _id: 'tag1', name: 'Structure' }] } ], anotacoes: [] // PDF annotations } ], arquivoRevisao: fileId, audio: audioFileId // Optional audio feedback }); // Save the review await review.save(); ``` ## Types The package exports the following types: - `RevisaoRedacaoInterface` - Main review interface - `RevisaoInterface` - Individual competency review interface - `AnotacoesInterface` - Comment interface - `StatusRevisaoRedacao` - Review status enum - `TagInterface` - Tag interface for comments - `CompetenciaInterface` - Competency interface - And other related interfaces ## Schema Structure The model includes: - Review status tracking - Competency-based scoring - Line-specific comments with tags - PDF annotations support - File attachments (review PDF and audio) - Timestamps for creation and updates ## Contributing Contributions are welcome! Please feel free to submit a Pull Request. ## License MIT