'use strict'
/**
 * 订单交付表
 */
module.exports = function (db, DataTypes) {
	return db.define('oorderdeliver', {
		orderId: {type: DataTypes.STRING, field: 'order_id', allowNull: false,comment:'订单ID' },
    deliverId: {type: DataTypes.STRING, field: 'deliver_id', allowNull: false, comment:'交付商id' },
    deliverName: { type: DataTypes.STRING, field: 'deliver_name', allowNull: false, comment:'交付商名称'},
		deliverDivide: {type: DataTypes.STRING, field: 'deliver_divide', allowNull: false,comment:'订单分成' },
    auditResult: { type: DataTypes.STRING, field: 'audit_result', allowNull: true,defaultValue:'', comment:'审核结果'},
    auditRemark: {type: DataTypes.STRING, field: 'audit_remark', allowNull: true,defaultValue:'', comment:'交付审核备注'},
    deliverMailAddr: { type: DataTypes.STRING, field: 'deliver_mail_addr', allowNull: true, defaultValue:'',comment:'交付地址'},
    deliverMailTo: {type: DataTypes.STRING, field: 'deliver_mail_to', allowNull: true,  defaultValue:'',comment:'收件人' },
		deliverMailMobile: { type: DataTypes.STRING, field: 'deliver_mail_mobile', allowNull: true, defaultValue:'', comment:'联系电话'},
    deliverContent: {type: DataTypes.STRING, field: 'deliver_content', allowNull: true, defaultValue:'', comment:'交付内容' },
    deliverMailNo: {type: DataTypes.STRING, field: 'deliver_mail_no', allowNull: true, defaultValue:'', comment:'交付商交付快递单号' },
    deliverMailImg: {type: DataTypes.STRING, field: 'deliver_mail_img', allowNull: true, defaultValue:'', comment:'交付商交付快递单号图片' },
    createdAt: { type: DataTypes.DATE, field: 'created_at', allowNull: false, defaultValue: DataTypes.NOW },
    updatedAt: { type: DataTypes.DATE, field: 'updated_at', allowNull: false, defaultValue: DataTypes.NOW },
    deletedAt: { type: DataTypes.DATE, field: 'deleted_at', allowNull: true }
	},
	{
		timestamps: true,
		underscore: true,
    paranoid: true,
    version: true,
		tableName: 'o_order_deliver',
		comment: '订单交付表',
	});
}

