我有一个梯形的模型
var keystone = require('keystone');
/**
* Logs Model
* ===================
*/
var Logs = new keystone.List('log', {
map: { name: 'clientname' },
track: true,
noedit: true,
});
Logs.add({
clientname: { type: String, trim: true },
ingredientName: { type: String, trim: true, lowercase: true },
upc: { type: String, trim: true },
sku: { type: String, trim: true },
handle: { type: String, trim: true },
status: { type: String, trim: true },
method: { type: String, trim: true },
url: { type: String, trim: true },
date: { type: Date },
});
/**
* Registration
*/
Logs.defaultColumns = 'url, clientname, status, date';
Logs.register();
此数据的默认排序是按日期排序,我希望它按照客户端名称的降序排列。 我该如何实现?