'use strict'; const { businessFields } = require('../lib/orderFields'); const { ORDER_STATUS, ORDER_TABLE_BY_STATUS } = require('../lib/orderStatus'); /** * 配送中订单表(order_status_delivery) * * 外部系统回传履约结果后进入;创建时间超过 3 个月时由归档任务转入历史表。 * @param {Egg.Application} app egg application * @return {object} orderStatusDelivery model */ module.exports = app => { const tableName = ORDER_TABLE_BY_STATUS[ORDER_STATUS.DELIVERY]; const OrderStatusDelivery = app.model.define(tableName, businessFields(app.Sequelize, ORDER_STATUS.DELIVERY), { tableName, comment: '订单-配送', }); return OrderStatusDelivery; };