aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/tag-interface.ts
blob: 08e5c32463d12415d71a5e70b1c15f1d0aa704cd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import * as Sequelize from 'sequelize'
import * as Promise from 'bluebird'

export namespace TagMethods {
  export type FindOrCreateTags = (tags: string[], transaction: Sequelize.Transaction) => Promise<TagInstance[]>
}

export interface TagClass {
  findOrCreateTags: TagMethods.FindOrCreateTags
}

export interface TagAttributes {
  name: string
}

export interface TagInstance extends TagClass, TagAttributes, Sequelize.Instance<TagAttributes> {
  id: number
}

export interface TagModel extends TagClass, Sequelize.Model<TagInstance, TagAttributes> {}