项企-报表中心
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

63 lines
1.6 KiB

/* 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, { foreighKey: 'saleName', targetKey: "sale" })
dc.models.salePerformance = salePerformance;
return salePerformance;
};