Spaces:
Running
Running
File size: 741 Bytes
c01955c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | import mongoose from "mongoose";
const coding_schema = new mongoose.Schema({
recently_solved:[
{
type:String,
trim:true,
}
],
recently_visited:[ // pending walle
{
type:String,
trim:true,
}
],
all_questions_solved:[
{
type:String,
trim:true
}
],
easy:{
type:Number,
default:0
},
medium:{
type:Number,
default:0
},
hard:{
type:Number,
default:0
},
user:{
type:mongoose.Schema.ObjectId,
ref:"users"
}
});
const Coding=mongoose.model("coding",coding_schema)
export default Coding |