mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2024-10-30 11:52:24 +03:00
33 lines
772 B
TypeScript
33 lines
772 B
TypeScript
import * as Sequelize from 'sequelize'
|
|
import * as Promise from 'bluebird'
|
|
|
|
import { PodInstance } from '../pod/pod-interface'
|
|
|
|
export namespace AuthorMethods {
|
|
export type FindOrCreateAuthor = (
|
|
name: string,
|
|
podId: number,
|
|
userId: number,
|
|
transaction: Sequelize.Transaction
|
|
) => Promise<AuthorInstance>
|
|
}
|
|
|
|
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
|
|
|
|
podId: number
|
|
Pod: PodInstance
|
|
}
|
|
|
|
export interface AuthorModel extends AuthorClass, Sequelize.Model<AuthorInstance, AuthorAttributes> {}
|