Skip to content

Commit

Permalink
Merge pull request #3 from gatewayapps/mapping/sequelize
Browse files Browse the repository at this point in the history
Added sequelize mappings
  • Loading branch information
danielgary authored Oct 2, 2018
2 parents 678c745 + a09f5f8 commit f2e60e6
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gatewayapps/cradle-template-emitter",
"version": "0.1.0",
"version": "0.1.1",
"description": "Cradle emitter for reading Handlebars based template files",
"main": "./dist/index.js",
"scripts": {
Expand Down
26 changes: 26 additions & 0 deletions src/TemplateEmitter/mappings/sequelize/mapping.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
export const values = {
Boolean : {
defaultValue: false,
type: 'BOOLEAN',
},
DateTime: {
defaultValue: undefined,
type: 'DATE',
},
Decimal: {
defaultValue: 0,
type: 'DECIMAL'
},
Integer: {
defaultValue: 0,
type: 'INTEGER',
},
String : {
defaultValue: '\'\'',
type: 'STRING',
},
UniqueIdentifier: {
defaultValue: 'Sequelize.UUIDV4',
type: 'UUID'
}
}

0 comments on commit f2e60e6

Please sign in to comment.