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.
187 lines
4.5 KiB
187 lines
4.5 KiB
/* eslint-disable*/
|
|
|
|
'use strict';
|
|
|
|
module.exports = dc => {
|
|
const DataTypes = dc.ORM;
|
|
const sequelize = dc.orm;
|
|
const ReceivableDetail = sequelize.define("receivableDetail", {
|
|
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: "序号:自动生成\n(自动升序),每一年自动从1开始",
|
|
primaryKey: false,
|
|
field: "serial_no",
|
|
autoIncrement: false
|
|
},
|
|
number: {
|
|
type: DataTypes.STRING,
|
|
allowNull: false,
|
|
defaultValue: null,
|
|
comment: "编号:年份+序号 如2022年1",
|
|
primaryKey: false,
|
|
field: "number",
|
|
autoIncrement: false
|
|
},
|
|
department: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "部门:申请部门",
|
|
primaryKey: false,
|
|
field: "department",
|
|
autoIncrement: false
|
|
},
|
|
sale: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "销售人员:申请人",
|
|
primaryKey: false,
|
|
field: "sale",
|
|
autoIncrement: false
|
|
},
|
|
contractNo: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "合同编号",
|
|
primaryKey: false,
|
|
field: "contract_no",
|
|
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
|
|
},
|
|
amount: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "合同金额:【合同金额\n(元)】",
|
|
primaryKey: false,
|
|
field: "amount",
|
|
autoIncrement: false
|
|
},
|
|
changeAmount: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "变更后合同金额",
|
|
primaryKey: false,
|
|
field: "change_amount",
|
|
autoIncrement: false
|
|
},
|
|
receivableYear: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "回款年份",
|
|
primaryKey: false,
|
|
field: "receivable_year",
|
|
autoIncrement: false
|
|
},
|
|
receivableDate: {
|
|
type: DataTypes.DATEONLY,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "回款日期",
|
|
primaryKey: false,
|
|
field: "receivable_date",
|
|
autoIncrement: false
|
|
},
|
|
receivableAmount: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "回款金额",
|
|
primaryKey: false,
|
|
field: "receivable_amount",
|
|
autoIncrement: false
|
|
},
|
|
invoicedBack: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "开票-回款",
|
|
primaryKey: false,
|
|
field: "invoiced_back ",
|
|
autoIncrement: false
|
|
},
|
|
remainConAmount: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "剩余合同金额",
|
|
primaryKey: false,
|
|
field: "remain_con_amount",
|
|
autoIncrement: false
|
|
},
|
|
incomeConfirmdate: {
|
|
type: DataTypes.DATEONLY,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "收入确认时间",
|
|
primaryKey: false,
|
|
field: "income_confirmdate",
|
|
autoIncrement: false
|
|
},
|
|
thirdPayment: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "第三方付款单位",
|
|
primaryKey: false,
|
|
field: "third_payment",
|
|
autoIncrement: false
|
|
},
|
|
remark: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "备注:回款流程》-备注",
|
|
primaryKey: false,
|
|
field: "remark",
|
|
autoIncrement: false
|
|
}
|
|
}, {
|
|
tableName: "receivable_detail",
|
|
comment: "",
|
|
indexes: []
|
|
});
|
|
dc.models.ReceivableDetail = ReceivableDetail;
|
|
return ReceivableDetail;
|
|
};
|