const mongoose = require('mongoose');
const {ObjectId} = mongoose.SchemaTypes;

const schema = mongoose.Schema({
    info: {
        type: String,
        required: true
    },
    creater:{
        type:ObjectId,
        required: true,
        ref:'tao-agent'
    },
    schedule:{
        type:ObjectId,
        required: true,
        ref:'tao-schedule'
    },
    status:{
        type: String,
        required: true
    },
    link:{
        type:ObjectId,
        required: true,
        ref:'tao-link'
    }
}, {
    timestamps: true
});

schema.index({info: 1});
module.exports = mongoose.model('tao-kouling', schema);
