PeerTube/server/models/account/account-follow-interface.ts

26 lines
859 B
TypeScript
Raw Normal View History

2017-11-09 17:51:58 +01:00
import * as Sequelize from 'sequelize'
2017-11-13 17:39:41 +01:00
import * as Bluebird from 'bluebird'
import { FollowState } from '../../../shared/models/accounts/follow.model'
2017-11-09 17:51:58 +01:00
export namespace AccountFollowMethods {
2017-11-13 17:39:41 +01:00
export type LoadByAccountAndTarget = (accountId: number, targetAccountId: number) => Bluebird<AccountFollowInstance>
2017-11-09 17:51:58 +01:00
}
export interface AccountFollowClass {
2017-11-13 17:39:41 +01:00
loadByAccountAndTarget: AccountFollowMethods.LoadByAccountAndTarget
2017-11-09 17:51:58 +01:00
}
export interface AccountFollowAttributes {
accountId: number
targetAccountId: number
2017-11-13 17:39:41 +01:00
state: FollowState
2017-11-09 17:51:58 +01:00
}
export interface AccountFollowInstance extends AccountFollowClass, AccountFollowAttributes, Sequelize.Instance<AccountFollowAttributes> {
id: number
createdAt: Date
updatedAt: Date
}
export interface AccountFollowModel extends AccountFollowClass, Sequelize.Model<AccountFollowInstance, AccountFollowAttributes> {}