5 changed files with 299 additions and 9 deletions
@ -0,0 +1,241 @@ |
|||
/* eslint-disable*/ |
|||
|
|||
'use strict'; |
|||
|
|||
module.exports = dc => { |
|||
const DataTypes = dc.ORM; |
|||
const sequelize = dc.orm; |
|||
const PerformanceDetail = sequelize.define("performanceDetail", { |
|||
id: { |
|||
type: DataTypes.INTEGER, |
|||
allowNull: false, |
|||
defaultValue: null, |
|||
comment: null, |
|||
primaryKey: true, |
|||
field: "id", |
|||
autoIncrement: false |
|||
}, |
|||
recConDate: { |
|||
type: DataTypes.DATEONLY, |
|||
allowNull: false, |
|||
defaultValue: null, |
|||
comment: "收到合同日期", |
|||
primaryKey: false, |
|||
field: "rec_con_date", |
|||
autoIncrement: false |
|||
}, |
|||
month: { |
|||
type: DataTypes.STRING, |
|||
allowNull: false, |
|||
defaultValue: null, |
|||
comment: "月份", |
|||
primaryKey: false, |
|||
field: "month", |
|||
autoIncrement: false |
|||
}, |
|||
department: { |
|||
type: DataTypes.STRING, |
|||
allowNull: false, |
|||
defaultValue: null, |
|||
comment: "部门:申请部门", |
|||
primaryKey: false, |
|||
field: "department", |
|||
autoIncrement: false |
|||
}, |
|||
sale: { |
|||
type: DataTypes.STRING, |
|||
allowNull: false, |
|||
defaultValue: null, |
|||
comment: "销售人员", |
|||
primaryKey: false, |
|||
field: "sale", |
|||
autoIncrement: false |
|||
}, |
|||
customer: { |
|||
type: DataTypes.STRING, |
|||
allowNull: false, |
|||
defaultValue: null, |
|||
comment: "客户名称:【甲方名称】", |
|||
primaryKey: false, |
|||
field: "customer", |
|||
autoIncrement: false |
|||
}, |
|||
item: { |
|||
type: DataTypes.STRING, |
|||
allowNull: false, |
|||
defaultValue: null, |
|||
comment: "项目名称", |
|||
primaryKey: false, |
|||
field: "item", |
|||
autoIncrement: false |
|||
}, |
|||
amount: { |
|||
type: DataTypes.STRING, |
|||
allowNull: false, |
|||
defaultValue: null, |
|||
comment: "合同金额:【合同金额\n(元)】", |
|||
primaryKey: false, |
|||
field: "amount", |
|||
autoIncrement: false |
|||
}, |
|||
realPerformance: { |
|||
type: DataTypes.STRING, |
|||
allowNull: false, |
|||
defaultValue: null, |
|||
comment: "实际业绩;(合同金额-预\n支提成及委外费用)*特批折算比例\n(G-L)*K", |
|||
primaryKey: false, |
|||
field: "real_performance", |
|||
autoIncrement: false |
|||
}, |
|||
assessmentPerformance: { |
|||
type: DataTypes.STRING, |
|||
allowNull: false, |
|||
defaultValue: null, |
|||
comment: "合同金额*省外业务(1.1)*复购业务\n(1.05)*可复制的业务路径(1.1)", |
|||
primaryKey: false, |
|||
field: "assessment_performance", |
|||
autoIncrement: false |
|||
}, |
|||
isApproval: { |
|||
type: DataTypes.BOOLEAN, |
|||
allowNull: false, |
|||
defaultValue: null, |
|||
comment: "价格是否特批:根据折算比例-《合同明细表》推\n算(100%——“是”;其他为否)", |
|||
primaryKey: false, |
|||
field: "isApproval", |
|||
autoIncrement: false |
|||
}, |
|||
approvalProp: { |
|||
type: DataTypes.STRING, |
|||
allowNull: false, |
|||
defaultValue: null, |
|||
comment: "特批折算比例:【业绩折\n算比例】", |
|||
primaryKey: false, |
|||
field: "approval_prop", |
|||
autoIncrement: false |
|||
}, |
|||
cost: { |
|||
type: DataTypes.STRING, |
|||
allowNull: false, |
|||
defaultValue: null, |
|||
comment: "预支提成及委外费用", |
|||
primaryKey: false, |
|||
field: "cost", |
|||
autoIncrement: false |
|||
}, |
|||
serviceLine: { |
|||
type: DataTypes.STRING, |
|||
allowNull: false, |
|||
defaultValue: null, |
|||
comment: "业务线", |
|||
primaryKey: false, |
|||
field: "service_line", |
|||
autoIncrement: false |
|||
}, |
|||
cusType: { |
|||
type: DataTypes.STRING, |
|||
allowNull: false, |
|||
defaultValue: null, |
|||
comment: "客户类型", |
|||
primaryKey: false, |
|||
field: "cus_type", |
|||
autoIncrement: false |
|||
}, |
|||
industry: { |
|||
type: DataTypes.STRING, |
|||
allowNull: false, |
|||
defaultValue: null, |
|||
comment: "行业", |
|||
primaryKey: false, |
|||
field: "industry", |
|||
autoIncrement: false |
|||
}, |
|||
source: { |
|||
type: DataTypes.STRING, |
|||
allowNull: false, |
|||
defaultValue: null, |
|||
comment: "信息来源", |
|||
primaryKey: false, |
|||
field: "source", |
|||
autoIncrement: false |
|||
}, |
|||
itemType: { |
|||
type: DataTypes.STRING, |
|||
allowNull: false, |
|||
defaultValue: null, |
|||
comment: "项目类型", |
|||
primaryKey: false, |
|||
field: "item_type", |
|||
autoIncrement: false |
|||
}, |
|||
cusProvince: { |
|||
type: DataTypes.STRING, |
|||
allowNull: false, |
|||
defaultValue: null, |
|||
comment: "客户省份", |
|||
primaryKey: false, |
|||
field: "cus_province", |
|||
autoIncrement: false |
|||
}, |
|||
cusAttribute: { |
|||
type: DataTypes.STRING, |
|||
allowNull: false, |
|||
defaultValue: null, |
|||
comment: "客户属性:G:政府、事业单位\nB:央企、国企、平台商\nC:资源方", |
|||
primaryKey: false, |
|||
field: "cus_attribute", |
|||
autoIncrement: false |
|||
}, |
|||
repurchaseCount: { |
|||
type: DataTypes.INTEGER, |
|||
allowNull: false, |
|||
defaultValue: null, |
|||
comment: "复购次数:同一客户储备成单-成单项目数量\n(PM)", |
|||
primaryKey: false, |
|||
field: "repurchase_count", |
|||
autoIncrement: false |
|||
}, |
|||
reproducible: { |
|||
type: DataTypes.BOOLEAN, |
|||
allowNull: false, |
|||
defaultValue: null, |
|||
comment: "是否可复制的业务路径:《合同评审》表单获取", |
|||
primaryKey: false, |
|||
field: "reproducible", |
|||
autoIncrement: false |
|||
}, |
|||
outProvince: { |
|||
type: DataTypes.STRING, |
|||
allowNull: false, |
|||
defaultValue: null, |
|||
comment: "省外业务1.1:当【客户省份】=“江西”时,省外业务=1;当【客户省份】<>“江西”时,省外业务=1.1", |
|||
primaryKey: false, |
|||
field: "out_province", |
|||
autoIncrement: false |
|||
}, |
|||
repurchase: { |
|||
type: DataTypes.STRING, |
|||
allowNull: false, |
|||
defaultValue: null, |
|||
comment: "复购业务1.05:当【复购次数】\n<2时,复购业务=1;当【复购次数】\n>=2时,复购业务=1.05;", |
|||
primaryKey: false, |
|||
field: "repurchase", |
|||
autoIncrement: false |
|||
}, |
|||
isreproduce: { |
|||
type: DataTypes.STRING, |
|||
allowNull: false, |
|||
defaultValue: null, |
|||
comment: "可复制的业务路径1.1:当【是否可复\n制的业务路径】=“是”,可复制的业务路径=1.1;当【是否可复制的业务路径】=“否”,可复制的业务路径=1;", |
|||
primaryKey: false, |
|||
field: "isreproduce", |
|||
autoIncrement: false |
|||
} |
|||
}, { |
|||
tableName: "performance_detail", |
|||
comment: "", |
|||
indexes: [] |
|||
}); |
|||
dc.models.PerformanceDetail = PerformanceDetail; |
|||
return PerformanceDetail; |
|||
}; |
Loading…
Reference in new issue