WMS_MAIN/app/model/print_computer.js
liufumingren f40370baca feat(print): 打印电脑管理增强(录制、软删除、独立接口)
- print_computer: 新增录制字段(is_recording/recording_size/remote_play_url/recording_directory/deleted_at)

- print_stations: 新增 deleted_at 软删除

- 新增 printComputer service (systemMethods + systems)

- order_print 重构: 商品信息从 picking 表直读,不再依赖 order_items

- 8 条迁移: 录制→软删除→权限→目录
2026-07-27 03:47:09 +08:00

81 lines
1.8 KiB
JavaScript
Raw 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 { INTEGER, BIGINT, STRING, DATE, BOOLEAN } = app.Sequelize;
const PrintComputer = app.model.define('print_computer', {
id: {
type: INTEGER,
primaryKey: true,
autoIncrement: true,
allowNull: false,
comment: '主键ID',
},
warehouse_id: {
type: BIGINT.UNSIGNED,
allowNull: true,
comment: '仓库ID',
},
name: {
type: STRING(255),
allowNull: true,
comment: '打印台名称',
},
status: {
type: INTEGER(1),
allowNull: false,
defaultValue: 1,
comment: '状态,1-已激活,0-未激活',
},
last_login_time: {
type: DATE,
allowNull: true,
comment: '上次登录时间',
},
is_recording: {
type: BOOLEAN,
allowNull: false,
defaultValue: false,
comment: '是否作为录制电脑,1-是,0-否',
},
recording_size_value: {
type: INTEGER.UNSIGNED,
allowNull: true,
defaultValue: null,
comment: '录制大小数值',
},
recording_size_unit: {
type: STRING(10),
allowNull: true,
defaultValue: null,
comment: '录制存储单位:KB/MB/GB/TB',
},
remote_play_url: {
type: STRING(500),
allowNull: true,
defaultValue: null,
comment: '远程播放地址',
},
recording_directory: {
type: STRING(500),
allowNull: true,
defaultValue: null,
comment: '录制目录路径',
},
deleted_at: {
type: DATE,
allowNull: true,
defaultValue: null,
comment: '软删除时间',
},
}, {
tableName: 'wms_print_computer',
freezeTableName: true,
underscored: false,
timestamps: false,
comment: '打印台电脑表',
});
return PrintComputer;
};