"use strict"; module.exports = app => { const { INTEGER, BIGINT, STRING, DATE, TINYINT } = app.Sequelize; const PrintStations = app.model.define('print_stations', { id: { type: INTEGER.UNSIGNED, autoIncrement: true, primaryKey: true, comment: '自增主键ID', }, warehouse_id: { type: BIGINT.UNSIGNED, allowNull: false, comment: '仓库ID', }, default_printer_name:{ type: STRING(50), allowNull: true, comment: '默认打印机名称', }, name: { type: STRING(100), allowNull: false, comment: '打印台名称', }, computer_id: { type: INTEGER, allowNull: false, comment: '打印电脑ID', }, custom_barcode: { type: STRING(100), allowNull: true, comment: '自定义编码', }, creator_id: { type: BIGINT.UNSIGNED, allowNull: false, comment: '创建人工号ID', }, creator_name: { type: STRING(50), allowNull: false, comment: '创建人名称', }, create_at: { type: DATE, allowNull: false, comment: '创建时间', }, update_at: { type: DATE, allowNull: false, comment: '更新时间', }, deleted: { type: TINYINT, allowNull: false, defaultValue: 0, comment: '软删除标记:0-未删除,1-已删除', }, }, { tableName: 'wms_print_stations', freezeTableName: true, underscored: false, timestamps: false, indexes: [ { unique: true, name: 'uk_print_station_id', fields: ['print_station_id'], }, { name: 'idx_warehouse_id', fields: ['warehouse_id'], }, { name: 'idx_computer_id', fields: ['computer_id'], }, { name: 'idx_name', fields: ['name'], }, { name: 'idx_custom_barcode', fields: ['custom_barcode'], }, { name: 'idx_creator_id', fields: ['creator_id'], }, { name: 'idx_create_at', fields: ['create_at'], }, ], comment: '打印台信息表', }); return PrintStations; };