/* eslint-disable*/ 'use strict'; module.exports = dc => { const DataTypes = dc.ORM; const sequelize = dc.orm; const salePerformance = sequelize.define("salePerformance", { id: { type: DataTypes.INTEGER, allowNull: false, primaryKey: true, field: "id", autoIncrement: true, }, amount: { type: DataTypes.STRING, allowNull: false, field: "amount", }, actualPerformance: { type: DataTypes.STRING, allowNull: false, field: "actual_performance", }, assessmentPerformance: { type: DataTypes.STRING, allowNull: false, field: "assessment_performance", }, saleName : { type: DataTypes.STRING, allowNull: false, field: "sale_name", }, month: { type: DataTypes.INTEGER, allowNull: false, field: "month", }, year: { type: DataTypes.INTEGER, allowNull: false, field: "year", }, saleId: { type: DataTypes.INTEGER, allowNull: false, field: "sale_id", }, task: { type: DataTypes.INTEGER, allowNull: false, field: "task", } }, { tableName: "sale_performance", }); const { sale } = dc.models; sale.hasMany(salePerformance, { foreignKey: 'saleName', sourceKey: "sale" }) dc.models.salePerformance = salePerformance; return salePerformance; };