aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/account/account-video-rate-interface.ts
blob: 1f395bc454db7a473bbe44318283559434d62e1d (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
28
29
30
31
import * as Sequelize from 'sequelize'
import * as Promise from 'bluebird'

import { VideoRateType } from '../../../shared/models/videos/video-rate.type'
import { AccountInstance } from './account-interface'

export namespace AccountVideoRateMethods {
  export type Load = (accountId: number, videoId: number, transaction: Sequelize.Transaction) => Promise<AccountVideoRateInstance>
}

export interface AccountVideoRateClass {
  load: AccountVideoRateMethods.Load
}

export interface AccountVideoRateAttributes {
  type: VideoRateType
  accountId: number
  videoId: number

  Account?: AccountInstance
}

export interface AccountVideoRateInstance
  extends AccountVideoRateClass, AccountVideoRateAttributes, Sequelize.Instance<AccountVideoRateAttributes> {
  id: number
  createdAt: Date
  updatedAt: Date
}

export interface AccountVideoRateModel
  extends AccountVideoRateClass, Sequelize.Model<AccountVideoRateInstance, AccountVideoRateAttributes> {}