完善政府端
This commit is contained in:
63
government-backend/models/EpidemicActivity.js
Normal file
63
government-backend/models/EpidemicActivity.js
Normal file
@@ -0,0 +1,63 @@
|
||||
const { DataTypes } = require('sequelize');
|
||||
const sequelize = require('../config/database');
|
||||
|
||||
const EpidemicActivity = sequelize.define('EpidemicActivity', {
|
||||
id: {
|
||||
type: DataTypes.INTEGER,
|
||||
primaryKey: true,
|
||||
autoIncrement: true
|
||||
},
|
||||
activityName: {
|
||||
type: DataTypes.STRING(255),
|
||||
allowNull: false,
|
||||
comment: '活动名称'
|
||||
},
|
||||
livestockCategory: {
|
||||
type: DataTypes.STRING(100),
|
||||
allowNull: true,
|
||||
comment: '防疫畜别'
|
||||
},
|
||||
diseaseCategory: {
|
||||
type: DataTypes.STRING(100),
|
||||
allowNull: true,
|
||||
comment: '疫病类别'
|
||||
},
|
||||
vaccineUsed: {
|
||||
type: DataTypes.STRING(255),
|
||||
allowNull: true,
|
||||
comment: '使用疫苗'
|
||||
},
|
||||
vaccineBatch: {
|
||||
type: DataTypes.STRING(100),
|
||||
allowNull: true,
|
||||
comment: '疫苗批次'
|
||||
},
|
||||
preventionDate: {
|
||||
type: DataTypes.STRING(100),
|
||||
allowNull: true,
|
||||
comment: '防疫日期'
|
||||
},
|
||||
activityStatus: {
|
||||
type: DataTypes.ENUM('active', 'inactive'),
|
||||
defaultValue: 'active',
|
||||
comment: '活动状态'
|
||||
},
|
||||
updatedAt: {
|
||||
type: DataTypes.DATE,
|
||||
defaultValue: DataTypes.NOW,
|
||||
comment: '更新时间'
|
||||
},
|
||||
createdAt: {
|
||||
type: DataTypes.DATE,
|
||||
defaultValue: DataTypes.NOW,
|
||||
comment: '创建时间'
|
||||
}
|
||||
}, {
|
||||
tableName: 'epidemic_activities',
|
||||
timestamps: true,
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt',
|
||||
paranoid: false
|
||||
});
|
||||
|
||||
module.exports = EpidemicActivity;
|
||||
Reference in New Issue
Block a user