mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 02:09:37 +02:00
Type models
This commit is contained in:
parent
65fcc3119c
commit
e02643f32e
76 changed files with 1710 additions and 816 deletions
26
server/models/request-video-event-interface.ts
Normal file
26
server/models/request-video-event-interface.ts
Normal file
|
@ -0,0 +1,26 @@
|
|||
import * as Sequelize from 'sequelize'
|
||||
|
||||
export namespace RequestVideoEventMethods {
|
||||
export type CountTotalRequests = (callback) => void
|
||||
export type ListWithLimitAndRandom = (limitPods, limitRequestsPerPod, callback) => void
|
||||
export type RemoveByRequestIdsAndPod = (ids, podId, callback) => void
|
||||
export type RemoveAll = (callback) => void
|
||||
}
|
||||
|
||||
export interface RequestVideoEventClass {
|
||||
countTotalRequests: RequestVideoEventMethods.CountTotalRequests
|
||||
listWithLimitAndRandom: RequestVideoEventMethods.ListWithLimitAndRandom
|
||||
removeByRequestIdsAndPod: RequestVideoEventMethods.RemoveByRequestIdsAndPod
|
||||
removeAll: RequestVideoEventMethods.RemoveAll
|
||||
}
|
||||
|
||||
export interface RequestVideoEventAttributes {
|
||||
type: string
|
||||
count: number
|
||||
}
|
||||
|
||||
export interface RequestVideoEventInstance extends Sequelize.Instance<RequestVideoEventAttributes> {
|
||||
id: number
|
||||
}
|
||||
|
||||
export interface RequestVideoEventModel extends RequestVideoEventClass, Sequelize.Model<RequestVideoEventInstance, RequestVideoEventAttributes> {}
|
Loading…
Add table
Add a link
Reference in a new issue