import _sequelize from 'sequelize'; const { Model, Sequelize } = _sequelize; export default class networkstructure extends Model { static init(sequelize, DataTypes) { super.init({ ID: { autoIncrement: true, type: DataTypes.INTEGER, allowNull: false, primaryKey: true }, SinaID: { type: DataTypes.INTEGER, allowNull: true }, MomayeziID: { type: DataTypes.INTEGER, allowNull: true }, Name: { type: DataTypes.STRING(100), allowNull: false }, FullName: { type: DataTypes.STRING(150), allowNull: true }, Level: { type: DataTypes.TINYINT.UNSIGNED, allowNull: false }, Type: { type: DataTypes.TINYINT.UNSIGNED, allowNull: true }, Level1ID: { type: DataTypes.INTEGER, allowNull: true }, Level1Name: { type: DataTypes.STRING(100), allowNull: true }, Level2ID: { type: DataTypes.INTEGER, allowNull: true }, Level2Name: { type: DataTypes.STRING(100), allowNull: true }, Level3ID: { type: DataTypes.INTEGER, allowNull: true }, Level3Name: { type: DataTypes.STRING(100), allowNull: true }, Level4ID: { type: DataTypes.INTEGER, allowNull: true }, Level4Name: { type: DataTypes.STRING(100), allowNull: true }, Level5ID: { type: DataTypes.INTEGER, allowNull: true }, Level5Name: { type: DataTypes.STRING(100), allowNull: true }, Level6ID: { type: DataTypes.INTEGER, allowNull: true }, Level6Name: { type: DataTypes.STRING(100), allowNull: true }, Level7ID: { type: DataTypes.INTEGER, allowNull: true }, Level7Name: { type: DataTypes.STRING(100), allowNull: true }, Level8ID: { type: DataTypes.INTEGER, allowNull: true }, Level8Name: { type: DataTypes.STRING(100), allowNull: true }, Level9ID: { type: DataTypes.INTEGER, allowNull: true }, Level9Name: { type: DataTypes.STRING(100), allowNull: true }, ProvinceCode: { type: DataTypes.STRING(10), allowNull: true }, ProvinceName: { type: DataTypes.STRING(20), allowNull: true }, TownshipCode: { type: DataTypes.STRING(10), allowNull: true }, TownshipName: { type: DataTypes.STRING(20), allowNull: true }, CountyCode: { type: DataTypes.STRING(10), allowNull: true }, CountyName: { type: DataTypes.STRING(20), allowNull: true }, CityCode: { type: DataTypes.STRING(10), allowNull: true }, CityName: { type: DataTypes.STRING(50), allowNull: true }, RegionCode: { type: DataTypes.CHAR(10), allowNull: true }, RegionName: { type: DataTypes.STRING(2), allowNull: true }, RuralDistinctCode: { type: DataTypes.STRING(10), allowNull: true }, RuralDistinctName: { type: DataTypes.STRING(50), allowNull: true }, VillageCode: { type: DataTypes.STRING(10), allowNull: true }, VillageName: { type: DataTypes.STRING(100), allowNull: true }, AbstractID: { type: DataTypes.INTEGER, allowNull: true } }, { sequelize, tableName: 'networkstructure', hasTrigger: true, timestamps: false, indexes: [ { name: "PRIMARY", unique: true, using: "BTREE", fields: [ { name: "ID" }, ] }, ] }); return networkstructure; } }