| import mongoose, { Schema, Document } from 'mongoose'; | |
| export interface IPreset extends Document { | |
| userId: mongoose.Types.ObjectId; | |
| name: string; | |
| voice: { | |
| type: string; | |
| language: string; | |
| tone: string; | |
| speed: number; | |
| }; | |
| music: string; | |
| fonts: { | |
| primary: string; | |
| secondary: string; | |
| }; | |
| colors: { | |
| primary: string; | |
| secondary: string; | |
| accent: string; | |
| }; | |
| transitions: string; | |
| videoStyle: string; | |
| } | |
| const PresetSchema = new Schema<IPreset>({ | |
| userId: { | |
| type: Schema.Types.ObjectId, | |
| ref: 'User', | |
| required: true, | |
| }, | |
| name: { | |
| type: String, | |
| required: true, | |
| trim: true, | |
| }, | |
| voice: { | |
| type: { | |
| type: String, | |
| default: 'neutral', | |
| }, | |
| language: { | |
| type: String, | |
| default: 'en', | |
| }, | |
| tone: { | |
| type: String, | |
| default: 'professional', | |
| }, | |
| speed: { | |
| type: Number, | |
| default: 1.0, | |
| }, | |
| }, | |
| music: { | |
| type: String, | |
| default: '', | |
| }, | |
| fonts: { | |
| primary: { | |
| type: String, | |
| default: 'Playfair Display', | |
| }, | |
| secondary: { | |
| type: String, | |
| default: 'Montserrat', | |
| }, | |
| }, | |
| colors: { | |
| primary: { | |
| type: String, | |
| default: '#1A1A1A', | |
| }, | |
| secondary: { | |
| type: String, | |
| default: '#F5F5F5', | |
| }, | |
| accent: { | |
| type: String, | |
| default: '#D4AF37', | |
| }, | |
| }, | |
| transitions: { | |
| type: String, | |
| enum: ['fade', 'slide', 'zoom', 'dissolve', 'none'], | |
| default: 'fade', | |
| }, | |
| videoStyle: { | |
| type: String, | |
| enum: ['minimal', 'dynamic', 'cinematic', 'bold', 'elegant'], | |
| default: 'minimal', | |
| }, | |
| }); | |
| export const Preset = mongoose.model<IPreset>('Preset', PresetSchema); | |