1 import * as Sequelize from 'sequelize'
3 export namespace UserMethods {
4 export type IsPasswordMatch = (password, callback) => void
5 export type ToFormatedJSON = () => void
6 export type IsAdmin = () => boolean
8 export type CountTotal = (callback) => void
9 export type GetByUsername = (username) => any
10 export type List = (callback) => void
11 export type ListForApi = (start, count, sort, callback) => void
12 export type LoadById = (id, callback) => void
13 export type LoadByUsername = (username, callback) => void
14 export type LoadByUsernameOrEmail = (username, email, callback) => void
17 export interface UserClass {
18 isPasswordMatch: UserMethods.IsPasswordMatch,
19 toFormatedJSON: UserMethods.ToFormatedJSON,
20 isAdmin: UserMethods.IsAdmin,
22 countTotal: UserMethods.CountTotal,
23 getByUsername: UserMethods.GetByUsername,
24 list: UserMethods.List,
25 listForApi: UserMethods.ListForApi,
26 loadById: UserMethods.LoadById,
27 loadByUsername: UserMethods.LoadByUsername,
28 loadByUsernameOrEmail: UserMethods.LoadByUsernameOrEmail
31 export interface UserAttributes {
39 export interface UserInstance extends UserClass, UserAttributes, Sequelize.Instance<UserAttributes> {
45 export interface UserModel extends UserClass, Sequelize.Model<UserInstance, UserAttributes> {}