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

const schema = mongoose.Schema({
    links:[{type: ObjectId, ref: 'tao-link'}],
    qd:{
        type:ObjectId,
        required: true,
        ref:'tao-agent'
    },
    status:{
        type: String,
        required: true
    },
    times:{
        type:Number,
        required: true
    },
    auto:{
        type:String,
        required: false
    },
    final:{
        type:Number,
        required:false
    }
}, {
    timestamps: true
});

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