diff options
Diffstat (limited to 'server/models/author-interface.ts')
-rw-r--r-- | server/models/author-interface.ts | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/server/models/author-interface.ts b/server/models/author-interface.ts new file mode 100644 index 000000000..d2475c3bd --- /dev/null +++ b/server/models/author-interface.ts | |||
@@ -0,0 +1,21 @@ | |||
1 | import * as Sequelize from 'sequelize' | ||
2 | |||
3 | export namespace AuthorMethods { | ||
4 | export type FindOrCreateAuthor = (name, podId, userId, transaction, callback) => void | ||
5 | } | ||
6 | |||
7 | export interface AuthorClass { | ||
8 | findOrCreateAuthor: AuthorMethods.FindOrCreateAuthor | ||
9 | } | ||
10 | |||
11 | export interface AuthorAttributes { | ||
12 | name: string | ||
13 | } | ||
14 | |||
15 | export interface AuthorInstance extends AuthorClass, AuthorAttributes, Sequelize.Instance<AuthorAttributes> { | ||
16 | id: number | ||
17 | createdAt: Date | ||
18 | updatedAt: Date | ||
19 | } | ||
20 | |||
21 | export interface AuthorModel extends AuthorClass, Sequelize.Model<AuthorInstance, AuthorAttributes> {} | ||