UNPKG

lingapp-redacao

Version:
75 lines (57 loc) 1.52 kB
# lingapp-redacao A Mongoose model for managing essays in the LingApp system. This package provides a structured way to handle essays with drafts, submissions, and reviews. ## Features - Full TypeScript support - Mongoose model with proper typing - Draft management - Status tracking for essays - File attachments support - Integration with review system ## Installation ```bash npm install lingapp-redacao # or yarn add lingapp-redacao ``` ## Usage ```typescript import { Redacao, RedacaoInterface, StatusRedacao } from 'lingapp-redacao'; // Create a new essay const redacao = new Redacao({ aluno: alunoId, tema: temaId, texto: "Essay content...", arquivo: fileId, status: StatusRedacao.Rascunho, rascunho: { texto: "Draft content...", arquivo: draftFileId } }); // Save the essay await redacao.save(); ``` ## Types The package exports the following types: - `RedacaoInterface` - Main essay interface - `RascunhoInterface` - Draft interface - `StatusRedacao` - Essay status enum - `UsuarioInterface` - User interface - `PropostaRedacaoInterface` - Essay proposal interface - `FileInterface` - File interface - And other related interfaces ## Schema Structure The model includes: - Student information - Essay topic - Main text content - File attachments - Draft management - Status tracking - Review references - Timestamps for creation, updates, and submission - Average score ## Contributing Contributions are welcome! Please feel free to submit a Pull Request. ## License MIT