schema is defined in this way
const mongoose = app.mongoose;
const { Schema } = mongoose;
const UserSchema = new Schema({
phone: {
type: String
},
unphone: {
type: String
}
});
return mongoose.model("DayTraininga", UserSchema);
query method
async trainingDays() {
const { ctx } = this;
let phone = ctx.get("x-user-id");
let count = ctx.model.DayTraining.find({ },function(err,counqt){
console.log("count*****************",counqt)
});
return count > 0 ? count : 1;
}
Database
found a lot of information, said that mongoose will automatically add s and so on, I add s to s, but not