'use strict'; const { Model } = require('sequelize'); module.exports = (sequelize, DataTypes) => { class User extends Model { /** * Helper method for defining associations. * This method is not a part of Sequelize lifecycle. * The `models/index` file will call this method automatically. */ static associate(models) { // define association here } }; User.init({ firstName: DataTypes.STRING, lastName: DataTypes.STRING, fatherName: DataTypes.STRING, codeMelli: DataTypes.BIGINT, workUnit: DataTypes.STRING, workUnitCode: DataTypes.INTEGER, address: DataTypes.TEXT, obligationNumber: DataTypes.INTEGER, obligationDate: DataTypes.DATE, requestNumber: DataTypes.INTEGER, requestDate: DataTypes.DATE, writtenOrderNumber: DataTypes.INTEGER, writtenOrderDate: DataTypes.DATE, deadline: DataTypes.INTEGER, deadlineUnit: { type: DataTypes.STRING, defaultValue: 'روز' }, fileName:{ type: DataTypes.STRING, allowNull: false, defaultValue: 'Hform4.docx' } }, { sequelize, modelName: 'User', }); return User; };