aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video-tag.ts
blob: 2ccaf820d361eeff5cea1c0843b2710438ecfd20 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import * as Sequelize from 'sequelize'

import { addMethodsToModel } from './utils'
import {
  VideoTagClass,
  VideoTagInstance,
  VideoTagAttributes,

  VideoTagMethods
} from './video-tag-interface'

let VideoTag: Sequelize.Model<VideoTagInstance, VideoTagAttributes>

export default function (sequelize, DataTypes) {
  VideoTag = sequelize.define('VideoTag', {}, {
    indexes: [
      {
        fields: [ 'videoId' ]
      },
      {
        fields: [ 'tagId' ]
      }
    ]
  })

  return VideoTag
}