'use strict';
// var mongoose = require('mongoose');
import { Schema, model, connect } from 'mongoose';

var  emailSchema = new Schema(
    {
        user_id:{
            type: Schema.Types.ObjectId,
            ref:'User'
        },
       
        email_to:{
            type: String
        },
        email_subject:{
            type: String
        },
        email_content:{
            type: String
        },
        cron_email_type:{
            type: String
        },
        cron_email_status:{
            type: String,
            default:"PENDING"
        },
        is_deleted: {
            type: Boolean,
            default: false
        }
    },
    {
        timestamps: true,
    },
);

let CronEmail = model('Cron_Email', emailSchema)
//module.exports.User =  mongoose.model('User', userSchema);
module.exports = {CronEmail, emailSchema}