1 import * as Sequelize from 'sequelize'
3 import { addMethodsToModel } from '../utils'
4 import { VideoChannelShareAttributes, VideoChannelShareInstance } from './video-channel-share-interface'
6 let VideoChannelShare: Sequelize.Model<VideoChannelShareInstance, VideoChannelShareAttributes>
8 export default function (sequelize: Sequelize.Sequelize, DataTypes: Sequelize.DataTypes) {
9 VideoChannelShare = sequelize.define<VideoChannelShareInstance, VideoChannelShareAttributes>('VideoChannelShare',
14 fields: [ 'accountId' ]
17 fields: [ 'videoChannelId' ]
23 const classMethods = [
26 addMethodsToModel(VideoChannelShare, classMethods)
28 return VideoChannelShare
31 // ------------------------------ METHODS ------------------------------
33 function associate (models) {
34 VideoChannelShare.belongsTo(models.Account, {
42 VideoChannelShare.belongsTo(models.VideoChannel, {
44 name: 'videoChannelId',