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

const schema = mongoose.Schema({
    ip: {
        type: String,
        required: true
    },
    date:{
        type:String,
        required:true
    },
    qd: {
        type: ObjectId,
        ref:'tao-agent', 
        required: true
    },
    times:{
        type:Number,
        required:true
    }
}, {
    timestamps: true
});

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