diff --git a/src/models/word.model.ts b/src/models/word.model.ts deleted file mode 100644 index 38d884b..0000000 --- a/src/models/word.model.ts +++ /dev/null @@ -1,56 +0,0 @@ -import mongoose, { Schema, Document } from 'mongoose'; - -export enum WordClass { - nouns = 'nouns', // 명사 - pronouns = 'pronouns', // 대명사 - verbs = 'verbs', // 동사 - adverbs = 'adverbs', // 부사 - adjective = 'adjective', // 형용사 - articles = 'articles', // 관사 - prepositions = 'prepositions', // 전치사 - conjunctions = 'conjunctions', // 접촉사 - interjections = 'interjections', // 감탄사 -} - -export interface Word extends Document { - word: string; -} - -export interface Meaning extends Document { - meaning: [String]; -} - -export interface PronounceVoicePath extends Document { - pronounceVoicePath: string; -} - -export interface IWord extends Document { - word: Word; - wordClass: WordClass; - meaning: Meaning; - pronounceVoicePath: PronounceVoicePath; -} - -const WordSchema: Schema = new Schema({ - word: { - type: String, - required: true, - unique: true, - }, - meaning: { - type: [String], - required: true, - }, - wordClass: { - type: String, - required: true, - enum: Object.values(WordClass), - }, - pronounceVoicePath: { - type: String, - required: true, - unique: true, - }, -}); - -export default mongoose.model('Words', WordSchema);