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
21
server/models/author-interface.ts
Normal file
21
server/models/author-interface.ts
Normal file
|
@ -0,0 +1,21 @@
|
|||
import * as Sequelize from 'sequelize'
|
||||
|
||||
export namespace AuthorMethods {
|
||||
export type FindOrCreateAuthor = (name, podId, userId, transaction, callback) => void
|
||||
}
|
||||
|
||||
export interface AuthorClass {
|
||||
findOrCreateAuthor: AuthorMethods.FindOrCreateAuthor
|
||||
}
|
||||
|
||||
export interface AuthorAttributes {
|
||||
name: string
|
||||
}
|
||||
|
||||
export interface AuthorInstance extends AuthorClass, AuthorAttributes, Sequelize.Instance<AuthorAttributes> {
|
||||
id: number
|
||||
createdAt: Date
|
||||
updatedAt: Date
|
||||
}
|
||||
|
||||
export interface AuthorModel extends AuthorClass, Sequelize.Model<AuthorInstance, AuthorAttributes> {}
|
Loading…
Add table
Add a link
Reference in a new issue