Commit fb55a5e9 by 孙亚楠

dd

parent 94e5550a
...@@ -7,34 +7,34 @@ const moment = require('moment') ...@@ -7,34 +7,34 @@ const moment = require('moment')
*/ */
module.exports = (db, DataTypes) => { module.exports = (db, DataTypes) => {
return db.define("iivoice", { return db.define("iinvoice", {
// id: { type: DataTypes.STRING(32), allowNull: true, comment: "" }, // id: { type: DataTypes.STRING(32), allowNull: true, comment: "" },
province: { type: DataTypes.STRING(10), allowNull: true, comment: "发票对应省份" }, province: { type: DataTypes.STRING(10), allowNull: true, comment: "发票对应省份" },
invoice_type: { type: DataTypes.STRING(4), allowNull: true, comment: '发票类型 10 增值税专用发票 20 增值税普通发票 30 普通发票' }, invoice_type: { type: DataTypes.STRING(4), allowNull: true, comment: '发票类型 10 增值税专用发票 20 增值税普通发票 30 普通发票' },
invoice_join: { type: DataTypes.STRING(4), allowNull: true, comment: '发票联次 10 记账联 20 发票联 30 抵扣联 40 销售方次' }, invoice_join: { type: DataTypes.STRING(4), allowNull: true, comment: '发票联次 10 记账联 20 发票联 30 抵扣联 40 销售方次' },
invoice_no: { type: DataTypes.STRING(20), allowNull: true, comment: "发票代码" }, invoice_no: { type: DataTypes.STRING(20), allowNull: true,delaultValue:"", comment: "发票代码" },
invoice_number: { type: DataTypes.STRING(20), allowNull: true, comment: "发票号码" }, invoice_number: { type: DataTypes.STRING(20), allowNull: true,delaultValue:"", comment: "发票号码" },
invoice_time: { type: DataTypes.DATE, allowNull: true, comment: "开票日期" }, invoice_time: { type: DataTypes.DATE, allowNull: true, delaultValue:null,comment: "开票日期" },
merchant_id: { type: DataTypes.STRING(32), allowNull: true, defaultValue: null, COMMENT: '购买方商户id' }, merchant_id: { type: DataTypes.STRING(32), allowNull: true, defaultValue: "", COMMENT: '购买方商户id' },
merchant_name: { type: DataTypes.STRING(45), allowNull: false, COMMENT: '购买方名称' }, merchant_name: { type: DataTypes.STRING(45), allowNull: false, COMMENT: '购买方名称' },
merchant_credit_code: { type: DataTypes.STRING(45), allowNull: false, COMMENT: '购买方纳税人识别号' }, merchant_credit_code: { type: DataTypes.STRING(45), allowNull: false, COMMENT: '购买方纳税人识别号' },
merchant_addr: { type: DataTypes.STRING(45), allowNull: false, COMMENT: '购买方地址' }, merchant_addr: { type: DataTypes.STRING(45), allowNull: false, COMMENT: '购买方地址' },
merchant_mobile: { type: DataTypes.STRING(45), allowNull: false, COMMENT: '购买方电话' }, merchant_mobile: { type: DataTypes.STRING(45), allowNull: false, COMMENT: '购买方电话' },
merchant_bank: { type: DataTypes.STRING(45), allowNull: false, COMMENT: '购买方开户行' }, merchant_bank: { type: DataTypes.STRING(45), allowNull: false, COMMENT: '购买方开户行' },
merchant_account: { type: DataTypes.STRING(45), allowNull: false, COMMENT: '银行账号' }, merchant_account: { type: DataTypes.STRING(45), allowNull: false, COMMENT: '银行账号' },
businessmen_type: { type: DataTypes.STRING(4), allowNull: true, defaultValue: null, COMMENT: '销售方类型 10 个体工商户 20 自然人' }, businessmen_type: { type: DataTypes.STRING(4), allowNull: true, defaultValue: "", COMMENT: '销售方类型 10 个体工商户 20 自然人' },
businessmen_id: { type: DataTypes.STRING(32), allowNull: false, COMMENT: '销售商id' }, businessmen_id: { type: DataTypes.STRING(32), allowNull: false, COMMENT: '销售商id' },
businessmen_credit_code: { type: DataTypes.STRING(45), allowNull: false, COMMENT: '销售方社会统一信用代码' }, businessmen_credit_code: { type: DataTypes.STRING(45), allowNull: false, COMMENT: '销售方社会统一信用代码' },
businessmen_name: { type: DataTypes.STRING(45), allowNull: true, defaultValue: null, }, businessmen_name: { type: DataTypes.STRING(45), allowNull: true, defaultValue: "" },
businessmen_addr: { type: DataTypes.STRING(45), allowNull: false, COMMENT: '销售方地址' }, businessmen_addr: { type: DataTypes.STRING(45), allowNull: false, COMMENT: '销售方地址' },
businessmen_mobile: { type: DataTypes.STRING(45), allowNull: false, COMMENT: '销售方电话' }, businessmen_mobile: { type: DataTypes.STRING(45), allowNull: false, COMMENT: '销售方电话' },
businessmen_bank: { type: DataTypes.STRING(45), allowNull: false, COMMENT: '销售方开户行' }, businessmen_bank: { type: DataTypes.STRING(45), allowNull: false, COMMENT: '销售方开户行' },
businessmen_account: { type: DataTypes.STRING(45), allowNull: false, COMMENT: '销售方银行账号' }, businessmen_account: { type: DataTypes.STRING(45), allowNull: false, COMMENT: '销售方银行账号' },
apply_no: { type: DataTypes.STRING(45), allowNull: true, defaultValue: null, COMMENT: '发票申请编号' }, apply_no: { type: DataTypes.STRING(45), allowNull: true, defaultValue: "", COMMENT: '发票申请编号' },
apply_time: { type: DataTypes.DATE, allowNull: true, defaultValue: null, COMMENT: '发票申请时间' }, apply_time: { type: DataTypes.DATE, allowNull: true, defaultValue: null, COMMENT: '发票申请时间' },
invoice_amount: { type: DataTypes.INTEGER, allowNull: true, defaultValue: 0, COMMENT: '价税合计总金额' }, invoice_amount: { type: DataTypes.INTEGER, allowNull: true, defaultValue: 0, COMMENT: '价税合计总金额' },
invoice_content: { type: DataTypes.STRING(300), allowNull: false, defaultValue: null, COMMENT: '开票内容' }, invoice_content: { type: DataTypes.STRING(300), allowNull: false, defaultValue: null, COMMENT: '开票内容' },
contract: { type: DataTypes.STRING(500), allowNull: true, COMMENT: '合同' }, contract: { type: DataTypes.STRING(500), allowNull: true,delaultValue:"", COMMENT: '合同' },
personal_invoice_tax: { type: DataTypes.INTEGER, allowNull: false, defaultValue: null, COMMENT: '个税' }, personal_invoice_tax: { type: DataTypes.INTEGER, allowNull: false, defaultValue: null, COMMENT: '个税' },
additional_tax: { type: DataTypes.INTEGER, allowNull: false, defaultValue: null, COMMENT: '附加税' }, additional_tax: { type: DataTypes.INTEGER, allowNull: false, defaultValue: null, COMMENT: '附加税' },
value_added_tax: { type: DataTypes.INTEGER, allowNull: false, defaultValue: null, COMMENT: '增值税' }, value_added_tax: { type: DataTypes.INTEGER, allowNull: false, defaultValue: null, COMMENT: '增值税' },
...@@ -49,12 +49,12 @@ module.exports = (db, DataTypes) => { ...@@ -49,12 +49,12 @@ module.exports = (db, DataTypes) => {
bd_path:{ type: DataTypes.STRING(200), allowNull: true, defaultValue: null ,comment:"业务员权限"}, bd_path:{ type: DataTypes.STRING(200), allowNull: true, defaultValue: null ,comment:"业务员权限"},
channel_id:{ type: DataTypes.STRING(32), allowNull: true ,delaultValue:'',comment:"渠道ID"}, channel_id:{ type: DataTypes.STRING(32), allowNull: true ,delaultValue:'',comment:"渠道ID"},
product_id:{ type: DataTypes.STRING(32), allowNull: true ,delaultValue:'',comment:"商品ID"}, product_id:{ type: DataTypes.STRING(32), allowNull: true ,delaultValue:'',comment:"商品ID"},
created_at: { type: DataTypes.DATE, allowNull: true }, created_at: { type: DataTypes.DATE, field: 'created_at', allowNull: false, defaultValue: DataTypes.NOW },
updated_at: { type: DataTypes.DATE, allowNull: true }, updated_at: { type: DataTypes.DATE, field: 'updated_at', allowNull: false, defaultValue: DataTypes.NOW },
deleted_at: { type: DataTypes.DATE, allowNull: true }, deleted_at: { type: DataTypes.DATE, field: 'deleted_at', allowNull: true },
version: { type: DataTypes.INTEGER, allowNull: true, defaultValue: 0 } version: { type: DataTypes.INTEGER, allowNull: true, defaultValue: 0 }
}, { }, {
timestamps: true, timestamps: false,
paranoid: true, paranoid: true,
tableName: 'i_invoice', tableName: 'i_invoice',
comment: '发票表', comment: '发票表',
......
...@@ -18,12 +18,12 @@ module.exports = (db, DataTypes) => { ...@@ -18,12 +18,12 @@ module.exports = (db, DataTypes) => {
deliver_mail_no: { type: DataTypes.STRING, field: 'deliver_mail_no', allowNull: true, defaultValue: "", comment: '交付商交付快递单号' }, deliver_mail_no: { type: DataTypes.STRING, field: 'deliver_mail_no', allowNull: true, defaultValue: "", comment: '交付商交付快递单号' },
deliver_img: { type: DataTypes.STRING, field: 'deliver_img', allowNull: true, defaultValue: "", comment: '交接单' }, deliver_img: { type: DataTypes.STRING, field: 'deliver_img', allowNull: true, defaultValue: "", comment: '交接单' },
operator_id: { type: DataTypes.STRING, field: 'operator_id', allowNull: true, defaultValue: "", comment: '交付商业务员id' }, operator_id: { type: DataTypes.STRING, field: 'operator_id', allowNull: true, defaultValue: "", comment: '交付商业务员id' },
createdAt: { type: DataTypes.DATE, field: 'created_at', allowNull: false, defaultValue: DataTypes.NOW, comment: '发票创建时间' }, created_at: { type: DataTypes.DATE, field: 'created_at', allowNull: false, defaultValue: DataTypes.NOW },
updatedAt: { type: DataTypes.DATE, field: 'updated_at', allowNull: false, defaultValue: DataTypes.NOW, comment: '更新时间' }, updated_at: { type: DataTypes.DATE, field: 'updated_at', allowNull: false, defaultValue: DataTypes.NOW },
deletedAt: { type: DataTypes.DATE, field: 'deleted_at', allowNull: true, comment: '删除时间' }, deleted_at: { type: DataTypes.DATE, field: 'deleted_at', allowNull: true },
version: { type: DataTypes.INTEGER, allowNull: true, defaultValue: 0 } version: { type: DataTypes.INTEGER, allowNull: true, defaultValue: 0 }
}, { }, {
timestamps: true, timestamps: false,
paranoid: true, paranoid: true,
tableName: 'i_invoice_deliver', tableName: 'i_invoice_deliver',
comment: '发票交付商交付详细', comment: '发票交付商交付详细',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment