2017-05-22 18:58:25 +00:00
|
|
|
import * as Sequelize from 'sequelize'
|
2017-07-05 11:26:25 +00:00
|
|
|
import * as Promise from 'bluebird'
|
2017-05-22 18:58:25 +00:00
|
|
|
|
|
|
|
export namespace TagMethods {
|
2017-07-05 11:26:25 +00:00
|
|
|
export type FindOrCreateTags = (tags: string[], transaction: Sequelize.Transaction) => Promise<TagInstance[]>
|
2017-05-22 18:58:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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> {}
|