]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - server/models/account/account-video-rate-interface.ts
Optimise transaction for video upload
[github/Chocobozzz/PeerTube.git] / server / models / account / account-video-rate-interface.ts
CommitLineData
e4f97bab
C
1import * as Sequelize from 'sequelize'
2import * as Promise from 'bluebird'
3
4import { VideoRateType } from '../../../shared/models/videos/video-rate.type'
16b90975 5import { AccountInstance } from './account-interface'
e4f97bab
C
6
7export namespace AccountVideoRateMethods {
8 export type Load = (accountId: number, videoId: number, transaction: Sequelize.Transaction) => Promise<AccountVideoRateInstance>
9}
10
11export interface AccountVideoRateClass {
12 load: AccountVideoRateMethods.Load
13}
14
15export interface AccountVideoRateAttributes {
16 type: VideoRateType
17 accountId: number
18 videoId: number
16b90975
C
19
20 Account?: AccountInstance
e4f97bab
C
21}
22
79d5caf9
C
23export interface AccountVideoRateInstance
24 extends AccountVideoRateClass, AccountVideoRateAttributes, Sequelize.Instance<AccountVideoRateAttributes> {
e4f97bab
C
25 id: number
26 createdAt: Date
27 updatedAt: Date
28}
29
79d5caf9
C
30export interface AccountVideoRateModel
31 extends AccountVideoRateClass, Sequelize.Model<AccountVideoRateInstance, AccountVideoRateAttributes> {}