sriramv 2021-08-11 12:34:15 +05:30
commit bb89fd0ccc
7 changed files with 233 additions and 0 deletions

View 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
View 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
View 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
View 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
}

View 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
}

View 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
}

View 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
}