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

const session = mongoose.Schema({
    user:{
        type: ObjectId,
        ref: 'tao-agent'
    }
}, {
    timestamps: true
});

// user.pre('save', async function (next) {
//     if (!this.isNew) return next();

//     this.id = await module.exports.count() + 1;
//     next();
// });

module.exports = mongoose.model('session', session);
