UNPKG

lingapp-revisao-redacao

Version:

Mongoose model for managing essay reviews

110 lines (109 loc) 2.95 kB
import { Document } from "mongoose"; import { Annotation } from "pdf-annotator-react"; import { FileInterface } from "lingapp-file"; import { UsuarioInterface } from "lingapp-usuario"; export interface TagResponse { _id: string; tag: string; tipo: string; competencia: string; } export interface CompetenciaWithTags { competencia: CompetenciaInterface; tagsCompetencia: TagResponse[]; } export interface CompetenciaInterface extends Document { _id: string; categoria: string; competencia: number; displayName: string; color: string; } export interface TagInterface extends Document { _id: string; tag: string; tipo: string; competencia: string; } export interface TagCompetenciaInterface extends Document { _id: string; categoria?: CategoriaRedacaoInterface; competencia: CompetenciaInterface; tagsCompetencia: Array<TagInterface>; } export interface CategoriaRedacaoInterface extends Document { _id: string; titulo: string; descricao: string; img: FileInterface; valorPagoPorCorrecao: number; } export interface PropostaRedacaoInterface extends Document { _id: string; tema: string; descricao: string; keywords: string[]; materiaisAuxiliares: FileInterface[]; img: FileInterface; categoriaRedacao: CategoriaRedacaoInterface; } export interface CategoriaRedacaoInterface extends Document { _id: string; titulo: string; descricao: string; img: FileInterface; valorPagoPorCorrecao: number; } export interface RascunhoInterface { texto: string; arquivo: FileInterface; } export declare enum StatusRedacao { Pendente = "Enviada", EmAvaliacao = "Em avalia\u00E7\u00E3o", Revisada = "Revisada", Rascunho = "Em edi\u00E7\u00E3o" } export interface RedacaoInterface extends Document { _id: string; aluno: UsuarioInterface; tema: PropostaRedacaoInterface; texto: string; arquivo: FileInterface; rascunho?: RascunhoInterface; status: StatusRedacao; avaliacoes: Array<RevisaoInterface>; createdAt?: string; updatedAt?: string; submittedAt?: string; media?: number; } export interface AnotacoesInterface { id: string; linha: number; comentario: string; tags?: TagInterface[]; } export interface RevisaoInterface { competencia: CompetenciaInterface; nota: number; comentarios?: AnotacoesInterface[]; anotacoes: Annotation[]; } export declare enum StatusRevisaoRedacao { EmAvaliacao = "Em avalia\u00E7\u00E3o", Revisada = "Revisada", Expirada = "Expirada" } export interface RevisaoRedacaoInterface extends Document { _id: string; tema: PropostaRedacaoInterface; redacao: RedacaoInterface; status: StatusRevisaoRedacao; revisao: RevisaoInterface[]; revisor: UsuarioInterface; updatedAt: string; nota?: number; arquivoRevisao: FileInterface; audio?: FileInterface; }