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.
430 lines
12 KiB
430 lines
12 KiB
/* eslint-disable*/
|
|
|
|
'use strict';
|
|
|
|
module.exports = dc => {
|
|
const DataTypes = dc.ORM;
|
|
const sequelize = dc.orm;
|
|
const ContractDetail = sequelize.define("contractDetail", {
|
|
id: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: false,
|
|
defaultValue: null,
|
|
comment: null,
|
|
primaryKey: true,
|
|
field: "id",
|
|
autoIncrement: true
|
|
},
|
|
year: {
|
|
type: DataTypes.STRING,
|
|
allowNull: false,
|
|
defaultValue: null,
|
|
comment: "年度",
|
|
primaryKey: false,
|
|
field: "year ",
|
|
autoIncrement: false
|
|
},
|
|
serialNo: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: false,
|
|
defaultValue: null,
|
|
comment: "序号",
|
|
primaryKey: false,
|
|
field: "serial_no",
|
|
autoIncrement: false
|
|
},
|
|
number: {
|
|
type: DataTypes.STRING,
|
|
allowNull: false,
|
|
defaultValue: null,
|
|
comment: "编号",
|
|
primaryKey: false,
|
|
field: "number",
|
|
autoIncrement: false
|
|
},
|
|
introduction: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "简介",
|
|
primaryKey: false,
|
|
field: "introduction",
|
|
autoIncrement: false
|
|
},
|
|
contractNo: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "合同编号",
|
|
primaryKey: false,
|
|
field: "contract_no",
|
|
autoIncrement: false
|
|
},
|
|
applyDate: {
|
|
type: DataTypes.DATEONLY,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "申请日期",
|
|
primaryKey: false,
|
|
field: "apply_date",
|
|
autoIncrement: false
|
|
},
|
|
recConDate: {
|
|
type: DataTypes.DATEONLY,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "收到合同日期",
|
|
primaryKey: false,
|
|
field: "rec_con_date",
|
|
autoIncrement: false
|
|
},
|
|
contractPaper: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "合同纸质版情况",
|
|
primaryKey: false,
|
|
field: "contract_paper",
|
|
autoIncrement: false
|
|
},
|
|
contractElec: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "合同电子版情况",
|
|
primaryKey: false,
|
|
field: "contract_elec",
|
|
autoIncrement: false
|
|
},
|
|
department: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "部门",
|
|
primaryKey: false,
|
|
field: "department",
|
|
autoIncrement: false
|
|
},
|
|
business: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "业务线",
|
|
primaryKey: false,
|
|
field: "business",
|
|
autoIncrement: false
|
|
},
|
|
sale: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "销售人员",
|
|
primaryKey: false,
|
|
field: "sale",
|
|
autoIncrement: false
|
|
},
|
|
customer: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "客户名称",
|
|
primaryKey: false,
|
|
field: "customer",
|
|
autoIncrement: false
|
|
},
|
|
item: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "项目名称",
|
|
primaryKey: false,
|
|
field: "item",
|
|
autoIncrement: false
|
|
},
|
|
itemType: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "项目类型",
|
|
primaryKey: false,
|
|
field: "item_type",
|
|
autoIncrement: false
|
|
},
|
|
amount: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "合同金额",
|
|
primaryKey: false,
|
|
field: "amount",
|
|
autoIncrement: false
|
|
},
|
|
changeAmount: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "变更后合同金额",
|
|
primaryKey: false,
|
|
field: "change_amount",
|
|
autoIncrement: false
|
|
},
|
|
cInvoicedAmount: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "累计开票金额",
|
|
primaryKey: false,
|
|
field: "c_invoiced_amount",
|
|
autoIncrement: false
|
|
},
|
|
cBackAmount: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "累计回款金额",
|
|
primaryKey: false,
|
|
field: "c_back_amount",
|
|
autoIncrement: false
|
|
},
|
|
invoicedBack: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "开票-回款",
|
|
primaryKey: false,
|
|
field: "invoiced_back",
|
|
autoIncrement: false
|
|
},
|
|
unInvoicedAmount: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "未开票金额",
|
|
primaryKey: false,
|
|
field: "un_invoiced_amount",
|
|
autoIncrement: false
|
|
},
|
|
remainConAmount: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "剩余合同金额",
|
|
primaryKey: false,
|
|
field: "remain_con_amount",
|
|
autoIncrement: false
|
|
},
|
|
backPercent: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "回款率",
|
|
primaryKey: false,
|
|
field: "back_percent",
|
|
autoIncrement: false
|
|
},
|
|
retentionMoney: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "质保金",
|
|
primaryKey: false,
|
|
field: "retention_money",
|
|
autoIncrement: false
|
|
},
|
|
retentionPercent: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "质保金比例",
|
|
primaryKey: false,
|
|
field: "retention_percent",
|
|
autoIncrement: false
|
|
},
|
|
retentionTerm: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "质保期",
|
|
primaryKey: false,
|
|
field: "retention_term",
|
|
autoIncrement: false
|
|
},
|
|
invoiceTax1: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "发票税率金额",
|
|
primaryKey: false,
|
|
field: "invoice_tax1",
|
|
autoIncrement: false
|
|
},
|
|
invoiceTax2: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: null,
|
|
primaryKey: false,
|
|
field: "invoice_tax2",
|
|
autoIncrement: false
|
|
},
|
|
invoiceTax3: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: null,
|
|
primaryKey: false,
|
|
field: "invoice_tax3",
|
|
autoIncrement: false
|
|
},
|
|
payType: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "合同付款方式",
|
|
primaryKey: false,
|
|
field: "pay_type",
|
|
autoIncrement: false
|
|
},
|
|
cost: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "预支提成及委外费用",
|
|
primaryKey: false,
|
|
field: "cost",
|
|
autoIncrement: false
|
|
},
|
|
performanceRatio: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "业绩折算比例",
|
|
primaryKey: false,
|
|
field: "performance_ratio",
|
|
autoIncrement: false
|
|
},
|
|
realPerformance: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "实际业绩",
|
|
primaryKey: false,
|
|
field: "real_performance",
|
|
autoIncrement: false
|
|
},
|
|
assessmentPerformance: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "考核业绩",
|
|
primaryKey: false,
|
|
field: "assessment_performance",
|
|
autoIncrement: false
|
|
},
|
|
acceptanceDate: {
|
|
type: DataTypes.DATEONLY,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "验收日期",
|
|
primaryKey: false,
|
|
field: "acceptance_date",
|
|
autoIncrement: false
|
|
},
|
|
backConfirmDate: {
|
|
type: DataTypes.DATEONLY,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "收入确认时间",
|
|
primaryKey: false,
|
|
field: "back_confirm_date",
|
|
autoIncrement: false
|
|
},
|
|
recYear: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "接单年份",
|
|
primaryKey: false,
|
|
field: "rec_year",
|
|
autoIncrement: false
|
|
},
|
|
recMonth: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "接单月份",
|
|
primaryKey: false,
|
|
field: "rec_month",
|
|
autoIncrement: false
|
|
},
|
|
cusAttribute: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "客户属性",
|
|
primaryKey: false,
|
|
field: "cus_attribute",
|
|
autoIncrement: false
|
|
},
|
|
cusType: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "客户类型",
|
|
primaryKey: false,
|
|
field: "cus_type",
|
|
autoIncrement: false
|
|
},
|
|
industry: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "行业",
|
|
primaryKey: false,
|
|
field: "industry",
|
|
autoIncrement: false
|
|
},
|
|
source: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "信息来源",
|
|
primaryKey: false,
|
|
field: "source",
|
|
autoIncrement: false
|
|
},
|
|
cusProvince: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "客户省份",
|
|
primaryKey: false,
|
|
field: "cus_province",
|
|
autoIncrement: false
|
|
},
|
|
cusArea: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "项目所在地",
|
|
primaryKey: false,
|
|
field: "cus_area",
|
|
autoIncrement: false
|
|
},
|
|
text: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: null,
|
|
primaryKey: false,
|
|
field: "text",
|
|
autoIncrement: false
|
|
}
|
|
}, {
|
|
tableName: "contract_detail",
|
|
comment: "",
|
|
indexes: []
|
|
});
|
|
dc.models.ContractDetail = ContractDetail;
|
|
return ContractDetail;
|
|
};
|