📜  如何在 sequelize join 语句中使用三元运算 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:43.206000             🧑  作者: Mango

代码示例1
exports.getStaticCompanies = function () {
    return Company.findAll({
        where: {
            id: [46128, 2865, 49569,  1488,   45600,   61991,  1418,  61919,   53326,   61680]
        }, 
        // Add order conditions here....
        order: [
            ['id', 'DESC'],
            ['name', 'ASC'],
        ],
        attributes: ['id', 'logo_version', 'logo_content_type', 'name', 'updated_at']
    });
};