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
23
server/models/job-interface.ts
Normal file
23
server/models/job-interface.ts
Normal file
|
@ -0,0 +1,23 @@
|
|||
import * as Sequelize from 'sequelize'
|
||||
|
||||
export namespace JobMethods {
|
||||
export type ListWithLimit = (limit, state, callback) => void
|
||||
}
|
||||
|
||||
export interface JobClass {
|
||||
listWithLimit: JobMethods.ListWithLimit
|
||||
}
|
||||
|
||||
export interface JobAttributes {
|
||||
state: string
|
||||
handlerName: string
|
||||
handlerInputData: object
|
||||
}
|
||||
|
||||
export interface JobInstance extends JobClass, JobAttributes, Sequelize.Instance<JobAttributes> {
|
||||
id: number
|
||||
createdAt: Date
|
||||
updatedAt: Date
|
||||
}
|
||||
|
||||
export interface JobModel extends JobClass, Sequelize.Model<JobInstance, JobAttributes> {}
|
Loading…
Add table
Add a link
Reference in a new issue