aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/account/account-follow-interface.ts
blob: efdff915e1890da389bcff2d9807d62bee2516e1 (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
import * as Sequelize from 'sequelize'
import * as Bluebird from 'bluebird'
import { FollowState } from '../../../shared/models/accounts/follow.model'

export namespace AccountFollowMethods {
  export type LoadByAccountAndTarget = (accountId: number, targetAccountId: number) => Bluebird<AccountFollowInstance>
}

export interface AccountFollowClass {
  loadByAccountAndTarget: AccountFollowMethods.LoadByAccountAndTarget
}

export interface AccountFollowAttributes {
  accountId: number
  targetAccountId: number
  state: FollowState
}

export interface AccountFollowInstance extends AccountFollowClass, AccountFollowAttributes, Sequelize.Instance<AccountFollowAttributes> {
  id: number
  createdAt: Date
  updatedAt: Date
}

export interface AccountFollowModel extends AccountFollowClass, Sequelize.Model<AccountFollowInstance, AccountFollowAttributes> {}