import _sequelize from 'sequelize'; const { Model, Sequelize } = _sequelize; export default class checklistresults extends Model { static init(sequelize, DataTypes) { super.init({ ID: { autoIncrement: true, type: DataTypes.INTEGER, allowNull: false, primaryKey: true }, UnitId: { type: DataTypes.INTEGER, allowNull: true }, ChecklistId: { type: DataTypes.INTEGER, allowNull: true }, QuestionId: { type: DataTypes.INTEGER, allowNull: true }, InspectionId: { type: DataTypes.INTEGER, allowNull: true }, Answer: { type: DataTypes.STRING(50), allowNull: true }, Comment: { type: DataTypes.STRING(200), allowNull: true }, Status: { type: DataTypes.TINYINT.UNSIGNED, allowNull: true }, CreateDate: { type: DataTypes.DATE, allowNull: false, defaultValue: Sequelize.fn('current_timestamp') }, DeleteDate: { type: DataTypes.DATE, allowNull: true } }, { sequelize, tableName: 'checklistresults', hasTrigger: true, timestamps: false, indexes: [ { name: "PRIMARY", unique: true, using: "BTREE", fields: [ { name: "ID" }, ] }, ] }); return checklistresults; } }