/* * @Author: fuyu * @Date: 2021-03-22 19:10:00 * @LastEditors: fuyu * @LastEditTime: 2021-03-23 10:26:28 * @FilePath: /202103/code/test/tmp/Report.js */ const Sequelize = require('sequelize'); import sequelize from './db/sequelize'; /** * 患者信息 */ // primaryKey: true // defaultValue: null const Report = sequelize.define('report', { id: {type: Sequelize.STRING(50), allowNull: false, primaryKey: true}, // id, exam_id: {type: Sequelize.STRING(50), allowNull: true, defaultValue: null}, // exam_id, 检查key report_doctor_id: {type: Sequelize.STRING(50), allowNull: true, defaultValue: null}, // report_doctor_id, 报告医师ID report_doctor_name: {type: Sequelize.STRING(255), allowNull: true, defaultValue: null}, // report_doctor_name, 报告医师姓名 report_datetime: {type: Sequelize.DATE, allowNull: true, defaultValue: null}, // report_datetime, 报告时间 review_doctor_id: {type: Sequelize.STRING(50), allowNull: true, defaultValue: null}, // review_doctor_id, 审核医师ID review_doctor_name: {type: Sequelize.STRING(255), allowNull: true, defaultValue: null}, // review_doctor_name, 审核医师姓名 review_datetime: {type: Sequelize.DATE, allowNull: true, defaultValue: null}, // review_datetime, 审核时间 confirm_doctor_id: {type: Sequelize.STRING(50), allowNull: true, defaultValue: null}, // confirm_doctor_id, 确认医师ID confirm_doctor_name: {type: Sequelize.STRING(255), allowNull: true, defaultValue: null}, // confirm_doctor_name, 确认医师姓名 confirm_datetime: {type: Sequelize.DATE, allowNull: true, defaultValue: null}, // confirm_datetime, 确认时间 description: {type: Sequelize.TEXT, allowNull: true, defaultValue: null}, // description, 影像所见 impression: {type: Sequelize.TEXT, allowNull: true, defaultValue: null}, // impression, 意见建议 diagnose: {type: Sequelize.STRING(255), allowNull: true, defaultValue: null}, // diagnose, 诊断 qr_code: {type: Sequelize.STRING(255), allowNull: true, defaultValue: null}, // qr_code, 二维码 report_result: {type: Sequelize.STRING(255), allowNull: true, defaultValue: null}, // report_result, 报告结果 1阴性 2阳性 remote_application_id: {type: Sequelize.STRING(50), allowNull: true, defaultValue: null}, // remote_application_id, 申请单id type: {type: Sequelize.STRING(10), allowNull: false, defaultValue: '1'}, // type, 报告类型 1 本地 2 远程 }, { freezeTableName: true, charset: 'utf8', indexes:[ {fields : ['exam_id']} ], }); Report.sync({ force: false }).then(function() {}); export default Report;