// ---------------------------------------------------------------------------
module.exports = function (sequelize, DataTypes) {
-// TODO: add indexes on searchable columns
+ // TODO: add indexes on searchable columns
const Video = sequelize.define('Video',
{
id: {
generateThumbnailFromBase64,
getDurationFromFile,
+ list,
listForApi,
listByHostAndRemoteId,
listOwnedAndPopulateAuthorAndTags,
})
}
+function list (callback) {
+ return this.find().asCallback()
+}
+
function listForApi (start, count, sort, callback) {
const query = {
offset: start,