1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-03 17:59:37 +02:00
Peertube/server/models/video-tag.ts
2017-05-25 17:32:16 +02:00

27 lines
507 B
TypeScript

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
}