WMS_MAIN/app/model/after_sale_function.js
liufumingren c2a761ca26 feat(inbox): 新增开门/到货/进场/离场车牌登记与 extend_props 持久化
- functions 新增 openDoor/registerLicensePlate/enter/departure(规则表+权限分组)
- 到货登记表 wms_inbox_arrival_register(含消费字段,离场闭环,货主收货群优先推送)
- 回执 extend_props 持久化落库与定时补发送下发(重推兜底回读)
- 车牌提取正则兼容异体字(粤/粵)
- 售后类型/关键字/函数/回复 v2 模型与迁移
- INBOX V2 HTTP 测试报告与指南
2026-09-17 02:41:43 +08:00

68 lines
1.5 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

'use strict';
module.exports = app => {
const { STRING, INTEGER, BIGINT, TINYINT, DATE } = app.Sequelize;
const AfterSaleFunction = app.model.define('afterSaleFunction', {
id: {
type: BIGINT(20).UNSIGNED,
primaryKey: true,
autoIncrement: true,
comment: '主键',
},
function_code: {
type: STRING(50),
allowNull: false,
comment: '处理函数编码(与 inbox functions registry 注册名一致)',
},
name: {
type: STRING(100),
allowNull: false,
comment: '处理函数名称',
},
description: {
type: STRING(500),
allowNull: true,
defaultValue: null,
comment: '处理函数说明',
},
is_enabled: {
type: TINYINT(1),
allowNull: false,
defaultValue: 1,
comment: '是否启用:1=启用,0=停用',
},
sort_order: {
type: INTEGER(11),
allowNull: false,
defaultValue: 0,
comment: '排序值,越小越靠前',
},
created_at: {
type: DATE,
comment: '创建时间',
},
updated_at: {
type: DATE,
comment: '更新时间',
},
}, {
tableName: 'wms_after_sale_function',
underscored: true,
timestamps: true,
createdAt: 'created_at',
updatedAt: 'updated_at',
paranoid: false,
comment: '售后处理函数表(子类型处理链路)',
indexes: [
{
unique: true,
fields: [ 'function_code' ],
name: 'uk_function_code',
},
],
});
return AfterSaleFunction;
};