const { CloudQuery } = require("./cloud-query");

async function main() {

    // 查询指定教练，修改价格
    let query = new CloudQuery("Tutor");
    let tutor = await query.get("imkGFr6Ztj");
    console.log('tutor', tutor)
    tutor.set({
        price: 199
    })
    tutor = await tutor.save()

    // 条件查询：价格大于60
    let query2 = new CloudQuery("FoodMenu");
    query2.lessThan("price", 60);
    // query2.greaterThan("price", 20);
    let foodList = await query2.find();
    console.log("foodList", foodList)

    // 条件查询：性别等于女
    let query3 = new CloudQuery("Tutor");
    query3.equalTo("gender", "女");
    let tutorList = await query3.find();
    console.log("tutorList", tutorList);
}


main();