lingapp-redacao
v1.0.0
Published
Mongoose model for managing essays
Maintainers
Readme
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
npm install lingapp-redacao
# or
yarn add lingapp-redacaoUsage
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 interfaceRascunhoInterface- Draft interfaceStatusRedacao- Essay status enumUsuarioInterface- User interfacePropostaRedacaoInterface- Essay proposal interfaceFileInterface- 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
