]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - server/models/account/account-follow-interface.ts
Add MANAGE_PEERTUBE_FOLLOW right
[github/Chocobozzz/PeerTube.git] / server / models / account / account-follow-interface.ts
1 import * as Sequelize from 'sequelize'
2 import * as Bluebird from 'bluebird'
3 import { FollowState } from '../../../shared/models/accounts/follow.model'
4
5 export namespace AccountFollowMethods {
6 export type LoadByAccountAndTarget = (accountId: number, targetAccountId: number) => Bluebird<AccountFollowInstance>
7 }
8
9 export interface AccountFollowClass {
10 loadByAccountAndTarget: AccountFollowMethods.LoadByAccountAndTarget
11 }
12
13 export interface AccountFollowAttributes {
14 accountId: number
15 targetAccountId: number
16 state: FollowState
17 }
18
19 export interface AccountFollowInstance extends AccountFollowClass, AccountFollowAttributes, Sequelize.Instance<AccountFollowAttributes> {
20 id: number
21 createdAt: Date
22 updatedAt: Date
23 }
24
25 export interface AccountFollowModel extends AccountFollowClass, Sequelize.Model<AccountFollowInstance, AccountFollowAttributes> {}