+import { CONFIG, CONSTRAINTS_FIELDS } from '../../initializers'
+import { ServerModel } from '../server/server'
+import { DefineIndexesOptions } from 'sequelize'
+import { AvatarModel } from '../avatar/avatar'
+import { VideoPlaylistModel } from './video-playlist'
+
+// FIXME: Define indexes here because there is an issue with TS and Sequelize.literal when called directly in the annotation
+const indexes: DefineIndexesOptions[] = [
+ buildTrigramSearchIndex('video_channel_name_trigram', 'name'),
+
+ {
+ fields: [ 'accountId' ]
+ },
+ {
+ fields: [ 'actorId' ]
+ }
+]
+
+export enum ScopeNames {
+ AVAILABLE_FOR_LIST = 'AVAILABLE_FOR_LIST',
+ WITH_ACCOUNT = 'WITH_ACCOUNT',
+ WITH_ACTOR = 'WITH_ACTOR',
+ WITH_VIDEOS = 'WITH_VIDEOS',
+ SUMMARY = 'SUMMARY'
+}