Skip to content

Commit

Permalink
feat: add columnName to global attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
DominusKelvin committed Sep 23, 2024
1 parent 21f11d6 commit 725c9db
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 6 deletions.
12 changes: 10 additions & 2 deletions templates/mellow-react/config/models.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,16 @@ module.exports.models = {
***************************************************************************/

attributes: {
createdAt: { type: 'number', autoCreatedAt: true },
updatedAt: { type: 'number', autoUpdatedAt: true },
createdAt: {
type: 'number',
autoCreatedAt: true,
columnName: 'created_at'
},
updatedAt: {
type: 'number',
autoUpdatedAt: true,
columnName: 'updated_at'
},
id: { type: 'number', autoIncrement: true }
//--------------------------------------------------------------------------
// /\ Using MongoDB?
Expand Down
12 changes: 10 additions & 2 deletions templates/mellow-svelte/config/models.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,16 @@ module.exports.models = {
***************************************************************************/

attributes: {
createdAt: { type: 'number', autoCreatedAt: true },
updatedAt: { type: 'number', autoUpdatedAt: true },
createdAt: {
type: 'number',
autoCreatedAt: true,
columnName: 'created_at'
},
updatedAt: {
type: 'number',
autoUpdatedAt: true,
columnName: 'updated_at'
},
id: { type: 'number', autoIncrement: true }
//--------------------------------------------------------------------------
// /\ Using MongoDB?
Expand Down
12 changes: 10 additions & 2 deletions templates/mellow-vue/config/models.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,16 @@ module.exports.models = {
***************************************************************************/

attributes: {
createdAt: { type: 'number', autoCreatedAt: true },
updatedAt: { type: 'number', autoUpdatedAt: true },
createdAt: {
type: 'number',
autoCreatedAt: true,
columnName: 'created_at'
},
updatedAt: {
type: 'number',
autoUpdatedAt: true,
columnName: 'updated_at'
},
id: { type: 'number', autoIncrement: true }
//--------------------------------------------------------------------------
// /\ Using MongoDB?
Expand Down

0 comments on commit 725c9db

Please sign in to comment.