+import {
+ AllowNull,
+ BeforeDestroy,
+ BelongsTo,
+ Column,
+ CreatedAt,
+ DataType,
+ Default,
+ DefaultScope,
+ ForeignKey,
+ HasMany, IFindOptions,
+ Is,
+ Model,
+ Scopes,
+ Sequelize,
+ Table,
+ UpdatedAt
+} from 'sequelize-typescript'
+import { ActivityPubActor } from '../../../shared/models/activitypub'
+import { VideoChannel, VideoChannelSummary } from '../../../shared/models/videos'
+import {
+ isVideoChannelDescriptionValid,
+ isVideoChannelNameValid,
+ isVideoChannelSupportValid
+} from '../../helpers/custom-validators/video-channels'
+import { sendDeleteActor } from '../../lib/activitypub/send'
+import { AccountModel, ScopeNames as AccountModelScopeNames } from '../account/account'
+import { ActorModel, unusedActorAttributesForAPI } from '../activitypub/actor'
+import { buildServerIdsFollowedBy, buildTrigramSearchIndex, createSimilarityAttribute, getSort, throwIfNotValid } from '../utils'
+import { VideoModel } from './video'
+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'
+}