surya:add models file added
This commit is contained in:
parent
4c3155f685
commit
ffed23a840
35
app/models/Brokenperiods.js
Normal file
35
app/models/Brokenperiods.js
Normal file
@ -0,0 +1,35 @@
|
||||
'use strict'
|
||||
const { Model } = require('sequelize')
|
||||
module.exports = (sequelize, DataTypes) => {
|
||||
class Brokenperiods extends Model {
|
||||
/**
|
||||
* Helper method for defining associations.
|
||||
* This method is not a part of Sequelize lifecycle.
|
||||
* The `models/index` file will call this method automatically.
|
||||
*/
|
||||
// define association here
|
||||
//static associate({ Model_name }) {
|
||||
//this.hasMany(Model_name, { foreignKey: 'child_table_prim_key', as: 'child_tbl_name' })
|
||||
//}
|
||||
|
||||
|
||||
}
|
||||
Brokenperiods.init(
|
||||
{
|
||||
entity_id: { type: DataTypes.INTEGER },
|
||||
months: { type: DataTypes.INTEGER },
|
||||
cy: { type: DataTypes.INTEGER },
|
||||
py: { type: DataTypes.INTEGER },
|
||||
variation: { type: DataTypes.INTEGER },
|
||||
createdby: { type: DataTypes.INTEGER },
|
||||
updatedby: { type: DataTypes.INTEGER },
|
||||
|
||||
},
|
||||
{
|
||||
sequelize,
|
||||
tableName: 'brokenperiods',
|
||||
modelName: 'Brokenperiods',
|
||||
}
|
||||
)
|
||||
return Brokenperiods
|
||||
}
|
||||
33
app/models/Fin_remarks.js
Normal file
33
app/models/Fin_remarks.js
Normal file
@ -0,0 +1,33 @@
|
||||
'use strict'
|
||||
const { Model } = require('sequelize')
|
||||
module.exports = (sequelize, DataTypes) => {
|
||||
class Fin_remarks extends Model {
|
||||
/**
|
||||
* Helper method for defining associations.
|
||||
* This method is not a part of Sequelize lifecycle.
|
||||
* The `models/index` file will call this method automatically.
|
||||
*/
|
||||
// define association here
|
||||
//static associate({ Model_name }) {
|
||||
//this.hasMany(Model_name, { foreignKey: 'child_table_prim_key', as: 'child_tbl_name' })
|
||||
//}
|
||||
|
||||
|
||||
}
|
||||
Fin_remarks.init(
|
||||
{
|
||||
entity_id: { type: DataTypes.INTEGER },
|
||||
itemid: { type: DataTypes.INTEGER },
|
||||
remarks: { type: DataTypes.STRING },
|
||||
createdby: { type: DataTypes.INTEGER },
|
||||
updatedby: { type: DataTypes.INTEGER },
|
||||
|
||||
},
|
||||
{
|
||||
sequelize,
|
||||
tableName: 'fin_remarks',
|
||||
modelName: 'Fin_remarks',
|
||||
}
|
||||
)
|
||||
return Fin_remarks
|
||||
}
|
||||
35
app/models/Financials.js
Normal file
35
app/models/Financials.js
Normal file
@ -0,0 +1,35 @@
|
||||
'use strict'
|
||||
const { Model } = require('sequelize')
|
||||
module.exports = (sequelize, DataTypes) => {
|
||||
class Financials extends Model {
|
||||
/**
|
||||
* Helper method for defining associations.
|
||||
* This method is not a part of Sequelize lifecycle.
|
||||
* The `models/index` file will call this method automatically.
|
||||
*/
|
||||
// define association here
|
||||
//static associate({ Model_name }) {
|
||||
//this.hasMany(Model_name, { foreignKey: 'child_table_prim_key', as: 'child_tbl_name' })
|
||||
//}
|
||||
|
||||
|
||||
}
|
||||
Financials.init(
|
||||
{
|
||||
entity_id: { type: DataTypes.INTEGER },
|
||||
fy: { type: DataTypes.STRING },
|
||||
st_type:{ type: DataTypes.STRING },
|
||||
itemid: { type: DataTypes.INTEGER },
|
||||
value: { type: DataTypes.INTEGER },
|
||||
createdby: { type: DataTypes.INTEGER },
|
||||
updatedby: { type: DataTypes.INTEGER },
|
||||
|
||||
},
|
||||
{
|
||||
sequelize,
|
||||
tableName: 'financials',
|
||||
modelName: 'Financials',
|
||||
}
|
||||
)
|
||||
return Financials
|
||||
}
|
||||
34
app/models/Itemsmaster.js
Normal file
34
app/models/Itemsmaster.js
Normal file
@ -0,0 +1,34 @@
|
||||
'use strict'
|
||||
const { Model } = require('sequelize')
|
||||
module.exports = (sequelize, DataTypes) => {
|
||||
class Itemsmaster extends Model {
|
||||
/**
|
||||
* Helper method for defining associations.
|
||||
* This method is not a part of Sequelize lifecycle.
|
||||
* The `models/index` file will call this method automatically.
|
||||
*/
|
||||
// define association here
|
||||
//static associate({ Model_name }) {
|
||||
//this.hasMany(Model_name, { foreignKey: 'child_table_prim_key', as: 'child_tbl_name' })
|
||||
//}
|
||||
|
||||
|
||||
}
|
||||
Itemsmaster.init(
|
||||
{
|
||||
statement: { type: DataTypes.INTEGER },
|
||||
section: { type: DataTypes.INTEGER },
|
||||
subsection: { type: DataTypes.INTEGER },
|
||||
itemtext: { type: DataTypes.STRING },
|
||||
createdby: { type: DataTypes.INTEGER },
|
||||
updatedby: { type: DataTypes.INTEGER },
|
||||
|
||||
},
|
||||
{
|
||||
sequelize,
|
||||
tableName: 'itemsmaster',
|
||||
modelName: 'Itemsmaster',
|
||||
}
|
||||
)
|
||||
return Itemsmaster
|
||||
}
|
||||
32
app/models/Sectionsmaster.js
Normal file
32
app/models/Sectionsmaster.js
Normal file
@ -0,0 +1,32 @@
|
||||
'use strict'
|
||||
const { Model } = require('sequelize')
|
||||
module.exports = (sequelize, DataTypes) => {
|
||||
class Sectionsmaster extends Model {
|
||||
/**
|
||||
* Helper method for defining associations.
|
||||
* This method is not a part of Sequelize lifecycle.
|
||||
* The `models/index` file will call this method automatically.
|
||||
*/
|
||||
// define association here
|
||||
//static associate({ Model_name }) {
|
||||
//this.hasMany(Model_name, { foreignKey: 'child_table_prim_key', as: 'child_tbl_name' })
|
||||
//}
|
||||
|
||||
|
||||
}
|
||||
Sectionsmaster.init(
|
||||
{
|
||||
statement: { type: DataTypes.INTEGER },
|
||||
section: { type: DataTypes.STRING },
|
||||
createdby: { type: DataTypes.INTEGER },
|
||||
updatedby: { type: DataTypes.INTEGER },
|
||||
|
||||
},
|
||||
{
|
||||
sequelize,
|
||||
tableName: 'sectionsmaster',
|
||||
modelName: 'Sectionsmaster',
|
||||
}
|
||||
)
|
||||
return Sectionsmaster
|
||||
}
|
||||
31
app/models/Statementsmaster.js
Normal file
31
app/models/Statementsmaster.js
Normal file
@ -0,0 +1,31 @@
|
||||
'use strict'
|
||||
const { Model } = require('sequelize')
|
||||
module.exports = (sequelize, DataTypes) => {
|
||||
class Statementsmaster extends Model {
|
||||
/**
|
||||
* Helper method for defining associations.
|
||||
* This method is not a part of Sequelize lifecycle.
|
||||
* The `models/index` file will call this method automatically.
|
||||
*/
|
||||
// define association here
|
||||
//static associate({ Model_name }) {
|
||||
//this.hasMany(Model_name, { foreignKey: 'child_table_prim_key', as: 'child_tbl_name' })
|
||||
//}
|
||||
|
||||
|
||||
}
|
||||
Statementsmaster.init(
|
||||
{
|
||||
statement: { type: DataTypes.STRING },
|
||||
createdby: { type: DataTypes.INTEGER },
|
||||
updatedby: { type: DataTypes.INTEGER },
|
||||
|
||||
},
|
||||
{
|
||||
sequelize,
|
||||
tableName: 'statementsmaster',
|
||||
modelName: 'Statementsmaster',
|
||||
}
|
||||
)
|
||||
return Statementsmaster
|
||||
}
|
||||
33
app/models/Subsectionsmaster.js
Normal file
33
app/models/Subsectionsmaster.js
Normal file
@ -0,0 +1,33 @@
|
||||
'use strict'
|
||||
const { Model } = require('sequelize')
|
||||
module.exports = (sequelize, DataTypes) => {
|
||||
class Subsectionsmaster extends Model {
|
||||
/**
|
||||
* Helper method for defining associations.
|
||||
* This method is not a part of Sequelize lifecycle.
|
||||
* The `models/index` file will call this method automatically.
|
||||
*/
|
||||
// define association here
|
||||
//static associate({ Model_name }) {
|
||||
//this.hasMany(Model_name, { foreignKey: 'child_table_prim_key', as: 'child_tbl_name' })
|
||||
//}
|
||||
|
||||
|
||||
}
|
||||
Subsectionsmaster.init(
|
||||
{
|
||||
section: { type: DataTypes.INTEGER },
|
||||
subsection: { type: DataTypes.STRING },
|
||||
itemtext: { type: DataTypes.STRING },
|
||||
createdby: { type: DataTypes.INTEGER },
|
||||
updatedby: { type: DataTypes.INTEGER },
|
||||
|
||||
},
|
||||
{
|
||||
sequelize,
|
||||
tableName: 'subsectionsmaster',
|
||||
modelName: 'Subsectionsmaster',
|
||||
}
|
||||
)
|
||||
return Subsectionsmaster
|
||||
}
|
||||
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "smc_cet_fin_backend",
|
||||
"name": "smc_cet_financials_backend",
|
||||
"version": "1.0.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user