-
-
Save championswimmer/5f2d8dd0a5f72e2b8bfaa1bd84a53dcb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#set($fileName = $NAME.substring(0,1).toLowerCase() + $NAME.substring(1)) | |
import {DataTypeAbstract, DefineAttributeColumnOptions, DefineAttributes, Instance, Model} from 'sequelize' | |
import * as Sequelize from 'sequelize' | |
export interface ${NAME}Attributes { | |
id: number | |
} | |
type ${NAME}DefineAttributes = { | |
[x in keyof ${NAME}Attributes]: string | DataTypeAbstract | DefineAttributeColumnOptions | |
} | |
export const ${fileName}Attrs: ${NAME}DefineAttributes = { | |
id: { | |
type: Sequelize.INTEGER, | |
primaryKey: true, | |
autoIncrement: true | |
} | |
} | |
export interface ${NAME}Instance extends Instance<${NAME}Attributes> { | |
get(): ${NAME}Attributes | |
} | |
export interface ${NAME} extends Model<${NAME}Instance, ${NAME}Attributes> { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment