commit dceaf128b007e044e886266320bccecc2cd63724 Author: kavehjamshidi Date: Wed Mar 31 12:54:28 2021 +0430 initial commit diff --git a/ancillarygroup DONE.js b/ancillarygroup DONE.js new file mode 100644 index 0000000..02f53ae --- /dev/null +++ b/ancillarygroup DONE.js @@ -0,0 +1,51 @@ +import _sequelize from 'sequelize'; +const { Model, Sequelize } = _sequelize; + +export default class ancillarygroup extends Model { + static init(sequelize, DataTypes) { + super.init({ + ID: { + type: DataTypes.SMALLINT, + allowNull: false, + primaryKey: true + }, + Code: { + type: DataTypes.STRING(10), + allowNull: false + }, + Value: { + type: DataTypes.STRING(200), + allowNull: false + }, + MainGroupCode: { + type: DataTypes.STRING(10), + allowNull: false + }, + MainGroupID: { + type: DataTypes.SMALLINT, + allowNull: false + }, + Version: { + type: DataTypes.DOUBLE, + allowNull: false + }, + Deleted: { + type: DataTypes.TINYINT, + allowNull: false + }, + MappedCode: { + type: DataTypes.STRING(50), + allowNull: true + }, + IsDedicated: { + type: DataTypes.TINYINT, + allowNull: true + } + }, { + sequelize, + tableName: 'ancillarygroup', + timestamps: false + }); + return ancillarygroup; + } +} diff --git a/cartables.js b/cartables.js new file mode 100644 index 0000000..67ea8e2 --- /dev/null +++ b/cartables.js @@ -0,0 +1,87 @@ +import _sequelize from 'sequelize'; +const { Model, Sequelize } = _sequelize; + +export default class cartables extends Model { + static init(sequelize, DataTypes) { + super.init({ + ID: { + type: DataTypes.BIGINT, + allowNull: true, + primaryKey: true + }, + CartableTypeID: { + type: DataTypes.TINYINT.UNSIGNED, + allowNull: true + }, + ItemTypeID: { + type: DataTypes.TINYINT.UNSIGNED, + allowNull: true + }, + UserID: { + type: DataTypes.INTEGER, + allowNull: true + }, + PositionID: { + type: DataTypes.INTEGER, + allowNull: true + }, + Title: { + type: DataTypes.STRING(255), + allowNull: true + }, + Unread: { + type: DataTypes.TINYINT, + allowNull: true + }, + Time: { + type: DataTypes.DATE, + allowNull: true + }, + WorkflowID: { + type: DataTypes.BIGINT, + allowNull: true + }, + Active: { + type: DataTypes.TINYINT, + allowNull: true + }, + HasStar: { + type: DataTypes.TINYINT, + allowNull: true + }, + FirstReadDate: { + type: DataTypes.DATE, + allowNull: true + }, + ExpirationDate: { + type: DataTypes.DATE, + allowNull: true + }, + TaskStatus: { + type: DataTypes.TINYINT.UNSIGNED, + allowNull: true + }, + RelatedRowId: { + type: DataTypes.BIGINT, + allowNull: true + }, + RelatedTableName: { + type: DataTypes.STRING(50), + allowNull: true + }, + Text: { + type: DataTypes.TEXT, + allowNull: true + }, + Conditions: { + type: DataTypes.TEXT, + allowNull: true + } + }, { + sequelize, + tableName: 'cartables', + timestamps: false + }); + return cartables; + } +} diff --git a/cartabletypes DONE.js b/cartabletypes DONE.js new file mode 100644 index 0000000..f55fa4c --- /dev/null +++ b/cartabletypes DONE.js @@ -0,0 +1,27 @@ +import _sequelize from 'sequelize'; +const { Model, Sequelize } = _sequelize; + +export default class cartabletypes extends Model { + static init(sequelize, DataTypes) { + super.init({ + ID: { + type: DataTypes.TINYINT.UNSIGNED, + allowNull: true, + primaryKey: true + }, + Code: { + type: DataTypes.TINYINT.UNSIGNED, + allowNull: true + }, + Value: { + type: DataTypes.STRING(50), + allowNull: true + } + }, { + sequelize, + tableName: 'cartabletypes', + timestamps: false + }); + return cartabletypes; + } +} diff --git a/chaincenters DONE.js b/chaincenters DONE.js new file mode 100644 index 0000000..1587c0a --- /dev/null +++ b/chaincenters DONE.js @@ -0,0 +1,39 @@ +import _sequelize from 'sequelize'; +const { Model, Sequelize } = _sequelize; + +export default class chaincenters extends Model { + static init(sequelize, DataTypes) { + super.init({ + ID: { + autoIncrement: true, + type: DataTypes.SMALLINT, + allowNull: false, + primaryKey: true + }, + Name: { + type: DataTypes.STRING(100), + allowNull: true + }, + UnitCount: { + type: DataTypes.SMALLINT, + allowNull: true + } + }, { + sequelize, + tableName: 'chaincenters', + hasTrigger: true, + timestamps: false, + indexes: [ + { + name: "PRIMARY", + unique: true, + using: "BTREE", + fields: [ + { name: "ID" }, + ] + }, + ] + }); + return chaincenters; + } +} diff --git a/checklistancilary DONE.js b/checklistancilary DONE.js new file mode 100644 index 0000000..13f7e41 --- /dev/null +++ b/checklistancilary DONE.js @@ -0,0 +1,43 @@ +import _sequelize from 'sequelize'; +const { Model, Sequelize } = _sequelize; + +export default class checklistancilary extends Model { + static init(sequelize, DataTypes) { + super.init({ + ID: { + autoIncrement: true, + type: DataTypes.INTEGER, + allowNull: false, + primaryKey: true + }, + ChecklistId: { + type: DataTypes.INTEGER, + allowNull: true + }, + AncilaryMainGroup: { + type: DataTypes.STRING(10), + allowNull: true + }, + IsicCode: { + type: DataTypes.STRING(10), + allowNull: true + } + }, { + sequelize, + tableName: 'checklistancilary', + hasTrigger: true, + timestamps: false, + indexes: [ + { + name: "PRIMARY", + unique: true, + using: "BTREE", + fields: [ + { name: "ID" }, + ] + }, + ] + }); + return checklistancilary; + } +} diff --git a/checklistquestions DONE.js b/checklistquestions DONE.js new file mode 100644 index 0000000..48b779e --- /dev/null +++ b/checklistquestions DONE.js @@ -0,0 +1,32 @@ +import _sequelize from 'sequelize'; +const { Model, Sequelize } = _sequelize; + +export default class checklistquestions extends Model { + static init(sequelize, DataTypes) { + super.init( + { + ID: { + autoIncrement: true, + type: DataTypes.INTEGER, + allowNull: false, + primaryKey: true, + }, + }, + { + sequelize, + tableName: 'checklistquestions', + hasTrigger: true, + timestamps: false, + indexes: [ + { + name: 'PRIMARY', + unique: true, + using: 'BTREE', + fields: [{ name: 'ID' }], + }, + ], + } + ); + return checklistquestions; + } +} diff --git a/checklistresults DONE.js b/checklistresults DONE.js new file mode 100644 index 0000000..6250e60 --- /dev/null +++ b/checklistresults DONE.js @@ -0,0 +1,68 @@ +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; + } +} diff --git a/checklists DONE.js b/checklists DONE.js new file mode 100644 index 0000000..faa65ef --- /dev/null +++ b/checklists DONE.js @@ -0,0 +1,78 @@ +import _sequelize from 'sequelize'; +const { Model, Sequelize } = _sequelize; + +export default class checklists extends Model { + static init(sequelize, DataTypes) { + super.init({ + ID: { + type: DataTypes.INTEGER, + allowNull: false, + primaryKey: true + }, + Title: { + type: DataTypes.STRING(200), + allowNull: true + }, + ShortName: { + type: DataTypes.STRING(200), + allowNull: true + }, + SignificationDate: { + type: DataTypes.DATEONLY, + allowNull: true + }, + NoeVahedID: { + type: DataTypes.STRING(50), + allowNull: true + }, + Status: { + type: DataTypes.TINYINT, + allowNull: true + }, + InsertDateTime: { + type: DataTypes.DATE, + allowNull: true + }, + UpdateDateTime: { + type: DataTypes.DATE, + allowNull: true + }, + DeleteDateTime: { + type: DataTypes.DATE, + allowNull: true + }, + Comment: { + type: DataTypes.STRING(50), + allowNull: true + }, + IsicId: { + type: DataTypes.STRING(50), + allowNull: true + }, + AncilaryId: { + type: DataTypes.STRING(50), + allowNull: true + }, + InspectionDomain: { + type: DataTypes.TINYINT.UNSIGNED, + allowNull: true + } + }, { + sequelize, + tableName: 'checklists', + hasTrigger: true, + timestamps: false, + indexes: [ + { + name: "PRIMARY", + unique: true, + using: "BTREE", + fields: [ + { name: "ID" }, + ] + }, + ] + }); + return checklists; + } +} diff --git a/countrydivisions1397 DONE.js b/countrydivisions1397 DONE.js new file mode 100644 index 0000000..4c591ba --- /dev/null +++ b/countrydivisions1397 DONE.js @@ -0,0 +1,123 @@ +import _sequelize from 'sequelize'; +const { Model, Sequelize } = _sequelize; + +export default class countrydivisions1397 extends Model { + static init(sequelize, DataTypes) { + super.init({ + ID: { + type: DataTypes.INTEGER, + allowNull: false, + primaryKey: true + }, + StatisticsOrgCode: { + type: DataTypes.STRING(20), + allowNull: false + }, + AreaTypeCode: { + type: DataTypes.STRING(10), + allowNull: false + }, + ParentID: { + type: DataTypes.INTEGER, + allowNull: false + }, + CountryCode: { + type: DataTypes.STRING(10), + allowNull: false + }, + ProvinceID: { + type: DataTypes.INTEGER, + allowNull: false + }, + ProvinceCode: { + type: DataTypes.STRING(10), + allowNull: false + }, + ProvinceName: { + type: DataTypes.STRING(20), + allowNull: false + }, + TownshipID: { + type: DataTypes.INTEGER, + allowNull: false + }, + TownshipCode: { + type: DataTypes.STRING(10), + allowNull: true + }, + TownshipName: { + type: DataTypes.STRING(20), + allowNull: true + }, + CountyID: { + type: DataTypes.INTEGER, + allowNull: false + }, + CountyCode: { + type: DataTypes.STRING(10), + allowNull: true + }, + CountyName: { + type: DataTypes.STRING(20), + allowNull: true + }, + CityID: { + type: DataTypes.INTEGER, + allowNull: false + }, + CityCode: { + type: DataTypes.STRING(10), + allowNull: true + }, + CityName: { + type: DataTypes.STRING(50), + allowNull: true + }, + RegionID: { + type: DataTypes.INTEGER, + allowNull: false + }, + RegionCount: { + type: DataTypes.TINYINT.UNSIGNED, + allowNull: true + }, + RegionCode: { + type: DataTypes.CHAR(10), + allowNull: true + }, + RegionName: { + type: DataTypes.STRING(2), + allowNull: true + }, + RuralDistinctID: { + type: DataTypes.INTEGER, + allowNull: false + }, + RuralDistinctCode: { + type: DataTypes.STRING(10), + allowNull: true + }, + RuralDistinctName: { + type: DataTypes.STRING(50), + allowNull: true + }, + VillageID: { + type: DataTypes.INTEGER, + allowNull: false + }, + VillageCode: { + type: DataTypes.STRING(10), + allowNull: true + }, + VillageName: { + type: DataTypes.STRING(100), + allowNull: true + } + }, { + sequelize, + tableName: 'countrydivisions1397', + timestamps: false + }); + return countrydivisions1397; + } +} diff --git a/educationlevel DONE.js b/educationlevel DONE.js new file mode 100644 index 0000000..f8b642c --- /dev/null +++ b/educationlevel DONE.js @@ -0,0 +1,27 @@ +import _sequelize from 'sequelize'; +const { Model, Sequelize } = _sequelize; + +export default class educationlevel extends Model { + static init(sequelize, DataTypes) { + super.init({ + ID: { + type: DataTypes.SMALLINT, + allowNull: true, + primaryKey: true + }, + Code: { + type: DataTypes.SMALLINT, + allowNull: true + }, + Value: { + type: DataTypes.STRING(100), + allowNull: true + } + }, { + sequelize, + tableName: 'educationlevel', + timestamps: false + }); + return educationlevel; + } +} diff --git a/employmenttypes DONE.js b/employmenttypes DONE.js new file mode 100644 index 0000000..5d2f4f7 --- /dev/null +++ b/employmenttypes DONE.js @@ -0,0 +1,27 @@ +import _sequelize from 'sequelize'; +const { Model, Sequelize } = _sequelize; + +export default class employmenttypes extends Model { + static init(sequelize, DataTypes) { + super.init({ + ID: { + type: DataTypes.SMALLINT, + allowNull: true, + primaryKey: true + }, + Code: { + type: DataTypes.SMALLINT, + allowNull: true + }, + Value: { + type: DataTypes.STRING(100), + allowNull: true + } + }, { + sequelize, + tableName: 'employmenttypes', + timestamps: false + }); + return employmenttypes; + } +} diff --git a/facilitypositions.js b/facilitypositions.js new file mode 100644 index 0000000..0674e4c --- /dev/null +++ b/facilitypositions.js @@ -0,0 +1,39 @@ +import _sequelize from 'sequelize'; +const { Model, Sequelize } = _sequelize; + +export default class facilitypositions extends Model { + static init(sequelize, DataTypes) { + super.init({ + ID: { + autoIncrement: true, + type: DataTypes.SMALLINT, + allowNull: false, + primaryKey: true + }, + FacilityTypeID: { + type: DataTypes.SMALLINT, + allowNull: false + }, + PositionTypeID: { + type: DataTypes.SMALLINT, + allowNull: false + } + }, { + sequelize, + tableName: 'facilitypositions', + hasTrigger: true, + timestamps: false, + indexes: [ + { + name: "PRIMARY", + unique: true, + using: "BTREE", + fields: [ + { name: "ID" }, + ] + }, + ] + }); + return facilitypositions; + } +} diff --git a/facilitytypes DONE.js b/facilitytypes DONE.js new file mode 100644 index 0000000..6c3b8e7 --- /dev/null +++ b/facilitytypes DONE.js @@ -0,0 +1,27 @@ +import _sequelize from 'sequelize'; +const { Model, Sequelize } = _sequelize; + +export default class facilitytypes extends Model { + static init(sequelize, DataTypes) { + super.init({ + ID: { + type: DataTypes.SMALLINT, + allowNull: false, + primaryKey: true + }, + Code: { + type: DataTypes.SMALLINT, + allowNull: true + }, + Value: { + type: DataTypes.STRING(100), + allowNull: true + } + }, { + sequelize, + tableName: 'facilitytypes', + timestamps: false + }); + return facilitytypes; + } +} diff --git a/foodunittypes DONE.js b/foodunittypes DONE.js new file mode 100644 index 0000000..4517e87 --- /dev/null +++ b/foodunittypes DONE.js @@ -0,0 +1,23 @@ +import _sequelize from 'sequelize'; +const { Model, Sequelize } = _sequelize; + +export default class foodunittypes extends Model { + static init(sequelize, DataTypes) { + super.init({ + ID: { + type: DataTypes.SMALLINT, + allowNull: false, + primaryKey: true + }, + Value: { + type: DataTypes.STRING(100), + allowNull: false + } + }, { + sequelize, + tableName: 'foodunittypes', + timestamps: false + }); + return foodunittypes; + } +} diff --git a/functions DONE.js b/functions DONE.js new file mode 100644 index 0000000..720c6e7 --- /dev/null +++ b/functions DONE.js @@ -0,0 +1,68 @@ +import _sequelize from 'sequelize'; +const { Model, Sequelize } = _sequelize; + +export default class functions extends Model { + static init(sequelize, DataTypes) { + super.init({ + ID: { + autoIncrement: true, + type: DataTypes.SMALLINT, + allowNull: false, + primaryKey: true + }, + Name: { + type: DataTypes.STRING(50), + allowNull: false + }, + Description: { + type: DataTypes.STRING(255), + allowNull: true + }, + Public: { + type: DataTypes.TINYINT, + allowNull: false, + defaultValue: 0 + }, + Menu: { + type: DataTypes.TINYINT, + allowNull: true, + defaultValue: 0 + }, + ParentMenuID: { + type: DataTypes.INTEGER, + allowNull: false, + defaultValue: 0 + }, + FunctionTypeID: { + type: DataTypes.INTEGER, + allowNull: false, + defaultValue: 0 + }, + Url: { + type: DataTypes.STRING(100), + allowNull: true + }, + OrderId: { + type: DataTypes.INTEGER, + allowNull: false, + defaultValue: 0 + } + }, { + sequelize, + tableName: 'functions', + hasTrigger: true, + timestamps: false, + indexes: [ + { + name: "PRIMARY", + unique: true, + using: "BTREE", + fields: [ + { name: "ID" }, + ] + }, + ] + }); + return functions; + } +} diff --git a/functiontypes DONE.js b/functiontypes DONE.js new file mode 100644 index 0000000..6143a49 --- /dev/null +++ b/functiontypes DONE.js @@ -0,0 +1,39 @@ +import _sequelize from 'sequelize'; +const { Model, Sequelize } = _sequelize; + +export default class functiontypes extends Model { + static init(sequelize, DataTypes) { + super.init({ + ID: { + autoIncrement: true, + type: DataTypes.SMALLINT, + allowNull: false, + primaryKey: true + }, + Value: { + type: DataTypes.STRING(100), + allowNull: false + }, + Name: { + type: DataTypes.STRING(100), + allowNull: false + } + }, { + sequelize, + tableName: 'functiontypes', + hasTrigger: true, + timestamps: false, + indexes: [ + { + name: "PRIMARY", + unique: true, + using: "BTREE", + fields: [ + { name: "ID" }, + ] + }, + ] + }); + return functiontypes; + } +} diff --git a/guildactivitytypes DONE.js b/guildactivitytypes DONE.js new file mode 100644 index 0000000..0279410 --- /dev/null +++ b/guildactivitytypes DONE.js @@ -0,0 +1,43 @@ +import _sequelize from 'sequelize'; +const { Model, Sequelize } = _sequelize; + +export default class guildactivitytypes extends Model { + static init(sequelize, DataTypes) { + super.init({ + ID: { + type: DataTypes.INTEGER, + allowNull: false, + primaryKey: true + }, + Code: { + type: DataTypes.STRING(10), + allowNull: false + }, + Value: { + type: DataTypes.TEXT, + allowNull: false + }, + CreationDate: { + type: DataTypes.DATE, + allowNull: false + }, + ModificationDate: { + type: DataTypes.DATE, + allowNull: true + }, + Version: { + type: DataTypes.DOUBLE, + allowNull: false + }, + Deleted: { + type: DataTypes.TINYINT, + allowNull: false + } + }, { + sequelize, + tableName: 'guildactivitytypes', + timestamps: false + }); + return guildactivitytypes; + } +} diff --git a/history.js b/history.js new file mode 100644 index 0000000..ea9ed61 --- /dev/null +++ b/history.js @@ -0,0 +1,68 @@ +import _sequelize from 'sequelize'; +const { Model, Sequelize } = _sequelize; + +export default class history extends Model { + static init(sequelize, DataTypes) { + super.init({ + ID: { + autoIncrement: true, + type: DataTypes.BIGINT, + allowNull: false, + primaryKey: true + }, + EventDate: { + type: DataTypes.DATE, + allowNull: false, + defaultValue: Sequelize.fn('current_timestamp') + }, + ChangeType: { + type: DataTypes.TINYINT.UNSIGNED, + allowNull: false + }, + UserID: { + type: DataTypes.INTEGER, + allowNull: false + }, + FullName: { + type: DataTypes.STRING(100), + allowNull: true + }, + IPAddress: { + type: DataTypes.STRING(100), + allowNull: false + }, + TableName: { + type: DataTypes.STRING(50), + allowNull: false + }, + RowID: { + type: DataTypes.BIGINT, + allowNull: false + }, + Data: { + type: DataTypes.TEXT, + allowNull: false + }, + Hash: { + type: DataTypes.STRING(64), + allowNull: false + } + }, { + sequelize, + tableName: 'history', + hasTrigger: true, + timestamps: false, + indexes: [ + { + name: "PRIMARY", + unique: true, + using: "BTREE", + fields: [ + { name: "ID" }, + ] + }, + ] + }); + return history; + } +} diff --git a/history_store.js b/history_store.js new file mode 100644 index 0000000..7dfe99d --- /dev/null +++ b/history_store.js @@ -0,0 +1,48 @@ +import _sequelize from 'sequelize'; +const { Model, Sequelize } = _sequelize; + +export default class history_store extends Model { + static init(sequelize, DataTypes) { + super.init({ + timemark: { + type: DataTypes.DATE, + allowNull: false, + defaultValue: Sequelize.fn('current_timestamp') + }, + table_name: { + type: DataTypes.TEXT, + allowNull: false, + primaryKey: true + }, + pk_date_src: { + type: DataTypes.TEXT, + allowNull: false + }, + pk_date_dest: { + type: DataTypes.TEXT, + allowNull: false, + primaryKey: true + }, + record_state: { + type: DataTypes.INTEGER, + allowNull: false + } + }, { + sequelize, + tableName: 'history_store', + timestamps: false, + indexes: [ + { + name: "PRIMARY", + unique: true, + using: "BTREE", + fields: [ + { name: "table_name", length: 85 }, + { name: "pk_date_dest", length: 85 }, + ] + }, + ] + }); + return history_store; + } +} diff --git a/inspection DONE.js b/inspection DONE.js new file mode 100644 index 0000000..c5ff5b4 --- /dev/null +++ b/inspection DONE.js @@ -0,0 +1,204 @@ +import _sequelize from 'sequelize'; +const { Model, Sequelize } = _sequelize; + +export default class inspection extends Model { + static init(sequelize, DataTypes) { + super.init({ + ID: { + autoIncrement: true, + type: DataTypes.INTEGER, + allowNull: false, + primaryKey: true + }, + UnitId: { + type: DataTypes.INTEGER, + allowNull: false + }, + InspectionType: { + type: DataTypes.TINYINT.UNSIGNED, + allowNull: true + }, + InspectionDomain: { + type: DataTypes.TINYINT.UNSIGNED, + allowNull: true + }, + InspectionKind: { + type: DataTypes.TINYINT.UNSIGNED, + allowNull: true + }, + InspectionDate: { + type: DataTypes.DATE, + allowNull: true + }, + InspectionEndDate: { + type: DataTypes.DATE, + allowNull: true + }, + InspectionStartTime: { + type: DataTypes.TIME, + allowNull: true + }, + InspectionEndTime: { + type: DataTypes.TIME, + allowNull: true + }, + StorageMode: { + type: DataTypes.INTEGER, + allowNull: true + }, + EnvironmentalRate: { + type: DataTypes.INTEGER, + allowNull: true + }, + ProfessionalRate: { + type: DataTypes.INTEGER, + allowNull: true + }, + HealthRank: { + type: DataTypes.INTEGER, + allowNull: true + }, + WorkerType: { + type: DataTypes.INTEGER, + allowNull: true + }, + ChecklistResult: { + type: DataTypes.STRING(50), + allowNull: true + }, + VisitResult: { + type: DataTypes.STRING(50), + allowNull: true + }, + Description: { + type: DataTypes.STRING(50), + allowNull: true + }, + LegalAction: { + type: DataTypes.STRING(50), + allowNull: true + }, + CreateDate: { + type: DataTypes.DATE, + allowNull: false, + defaultValue: Sequelize.fn('current_timestamp') + }, + InspectorID: { + type: DataTypes.INTEGER, + allowNull: true + }, + InspectorOrganization: { + type: DataTypes.INTEGER, + allowNull: true + }, + NewsId: { + type: DataTypes.STRING(50), + allowNull: true + }, + InspectionState: { + type: DataTypes.TINYINT.UNSIGNED, + allowNull: true + }, + IsApproved: { + type: DataTypes.TINYINT.UNSIGNED, + allowNull: true + }, + Index: { + type: DataTypes.TEXT, + allowNull: true + }, + OwnerPositionId: { + type: DataTypes.INTEGER, + allowNull: true + }, + OwnerNetworkStructureId: { + type: DataTypes.INTEGER, + allowNull: true + }, + L1ID: { + type: DataTypes.INTEGER, + allowNull: true + }, + L2ID: { + type: DataTypes.INTEGER, + allowNull: true + }, + L3ID: { + type: DataTypes.INTEGER, + allowNull: true + }, + L4ID: { + type: DataTypes.INTEGER, + allowNull: true + }, + L5ID: { + type: DataTypes.INTEGER, + allowNull: true + }, + L6ID: { + type: DataTypes.INTEGER, + allowNull: true + }, + L7ID: { + type: DataTypes.INTEGER, + allowNull: true + }, + L8ID: { + type: DataTypes.INTEGER, + allowNull: true + }, + L9ID: { + type: DataTypes.INTEGER, + allowNull: true + }, + InspectorName: { + type: DataTypes.STRING(100), + allowNull: true + }, + ApprovedDate: { + type: DataTypes.DATE, + allowNull: true + }, + ApprovedComment: { + type: DataTypes.TEXT, + allowNull: true + }, + HasLegalAction: { + type: DataTypes.TINYINT.UNSIGNED, + allowNull: true + }, + InspectorPositionID: { + type: DataTypes.INTEGER, + allowNull: true + }, + GIS_Long: { + type: DataTypes.DOUBLE, + allowNull: true + }, + GIS_Lat: { + type: DataTypes.DOUBLE, + allowNull: true + }, + Reason: { + type: DataTypes.TINYINT.UNSIGNED, + allowNull: true + } + }, { + sequelize, + tableName: 'inspection', + hasTrigger: true, + timestamps: false, + indexes: [ + { + name: "PRIMARY", + unique: true, + using: "BTREE", + fields: [ + { name: "ID" }, + ] + }, + ] + }); + return inspection; + } +} diff --git a/inspectionlegalactionitems DONE.js b/inspectionlegalactionitems DONE.js new file mode 100644 index 0000000..2fd7a6b --- /dev/null +++ b/inspectionlegalactionitems DONE.js @@ -0,0 +1,56 @@ +import _sequelize from 'sequelize'; +const { Model, Sequelize } = _sequelize; + +export default class inspectionlegalactionitems extends Model { + static init(sequelize, DataTypes) { + super.init({ + ID: { + autoIncrement: true, + type: DataTypes.INTEGER, + allowNull: false, + primaryKey: true + }, + InspectionId: { + type: DataTypes.INTEGER, + allowNull: true + }, + LegalActionId: { + type: DataTypes.INTEGER, + allowNull: true + }, + PropertyName: { + type: DataTypes.STRING(50), + allowNull: true + }, + Value: { + type: DataTypes.TEXT, + allowNull: true + }, + Archive: { + type: DataTypes.TINYINT, + allowNull: false, + defaultValue: 0 + }, + InsertDate: { + type: DataTypes.DATE, + allowNull: true + } + }, { + sequelize, + tableName: 'inspectionlegalactionitems', + hasTrigger: true, + timestamps: false, + indexes: [ + { + name: "PRIMARY", + unique: true, + using: "BTREE", + fields: [ + { name: "ID" }, + ] + }, + ] + }); + return inspectionlegalactionitems; + } +} diff --git a/inspectiontypes DONE.js b/inspectiontypes DONE.js new file mode 100644 index 0000000..e04dad7 --- /dev/null +++ b/inspectiontypes DONE.js @@ -0,0 +1,36 @@ +import _sequelize from 'sequelize'; +const { Model, Sequelize } = _sequelize; + +export default class inspectiontypes extends Model { + static init(sequelize, DataTypes) { + super.init({ + ID: { + type: DataTypes.SMALLINT, + allowNull: false, + primaryKey: true + }, + Code: { + type: DataTypes.SMALLINT, + allowNull: false + }, + Value: { + type: DataTypes.STRING(100), + allowNull: false + }, + Domain: { + type: DataTypes.TINYINT.UNSIGNED, + allowNull: true + }, + Deleted: { + type: DataTypes.TINYINT, + allowNull: true, + defaultValue: 0 + } + }, { + sequelize, + tableName: 'inspectiontypes', + timestamps: false + }); + return inspectiontypes; + } +} diff --git a/ipaddresslist DONE.js b/ipaddresslist DONE.js new file mode 100644 index 0000000..c76f8b6 --- /dev/null +++ b/ipaddresslist DONE.js @@ -0,0 +1,53 @@ +import _sequelize from 'sequelize'; +const { Model, Sequelize } = _sequelize; + +export default class ipaddresslist extends Model { + static init(sequelize, DataTypes) { + super.init({ + ID: { + autoIncrement: true, + type: DataTypes.INTEGER, + allowNull: false, + primaryKey: true + }, + IPAddressRange: { + type: DataTypes.STRING(255), + allowNull: false + }, + Type: { + type: DataTypes.TINYINT.UNSIGNED, + allowNull: false + }, + RelatedID: { + type: DataTypes.INTEGER, + allowNull: true + }, + Deleted: { + type: DataTypes.TINYINT, + allowNull: false, + defaultValue: 0 + }, + BlackList: { + type: DataTypes.TINYINT, + allowNull: false, + defaultValue: 0 + } + }, { + sequelize, + tableName: 'ipaddresslist', + hasTrigger: true, + timestamps: false, + indexes: [ + { + name: "PRIMARY", + unique: true, + using: "BTREE", + fields: [ + { name: "ID" }, + ] + }, + ] + }); + return ipaddresslist; + } +} diff --git a/isco-2008-fa DONE.js b/isco-2008-fa DONE.js new file mode 100644 index 0000000..21acc70 --- /dev/null +++ b/isco-2008-fa DONE.js @@ -0,0 +1,51 @@ +import _sequelize from 'sequelize'; +const { Model, Sequelize } = _sequelize; + +export default class isco-2008-fa extends Model { + static init(sequelize, DataTypes) { + super.init({ + ID: { + type: DataTypes.INTEGER, + allowNull: false, + primaryKey: true + }, + Code: { + type: DataTypes.STRING(10), + allowNull: false + }, + 'ISCO-2008Code': { + type: DataTypes.STRING(10), + allowNull: false + }, + Value: { + type: DataTypes.STRING(120), + allowNull: false + }, + IsMain: { + type: DataTypes.TINYINT, + allowNull: false + }, + CreationDate: { + type: DataTypes.DATE, + allowNull: false + }, + ModificationDate: { + type: DataTypes.DATE, + allowNull: true + }, + Version: { + type: DataTypes.DOUBLE, + allowNull: false + }, + Deleted: { + type: DataTypes.TINYINT, + allowNull: false + } + }, { + sequelize, + tableName: 'isco-2008-fa', + timestamps: false + }); + return isco-2008-fa; + } +} diff --git a/isic-4-fa DONE.js b/isic-4-fa DONE.js new file mode 100644 index 0000000..21cc7b0 --- /dev/null +++ b/isic-4-fa DONE.js @@ -0,0 +1,71 @@ +import _sequelize from 'sequelize'; +const { Model, Sequelize } = _sequelize; + +export default class isic-4-fa extends Model { + static init(sequelize, DataTypes) { + super.init({ + ID: { + type: DataTypes.SMALLINT, + allowNull: false, + primaryKey: true + }, + Code: { + type: DataTypes.STRING(10), + allowNull: false + }, + Value: { + type: DataTypes.STRING(120), + allowNull: false + }, + EnvironmentHealth: { + type: DataTypes.TINYINT, + allowNull: true + }, + OccupationalHealth: { + type: DataTypes.TINYINT, + allowNull: true + }, + CreationDate: { + type: DataTypes.DATE, + allowNull: false + }, + ModificationDate: { + type: DataTypes.DATE, + allowNull: true + }, + Version: { + type: DataTypes.DOUBLE, + allowNull: false + }, + Deleted: { + type: DataTypes.TINYINT, + allowNull: false + }, + ParentCode: { + type: DataTypes.STRING(10), + allowNull: true + }, + ParentID: { + type: DataTypes.SMALLINT, + allowNull: true + }, + BankCode: { + type: DataTypes.INTEGER, + allowNull: true + }, + NewCode: { + type: DataTypes.STRING(10), + allowNull: true + }, + IsDedicated: { + type: DataTypes.TINYINT, + allowNull: true + } + }, { + sequelize, + tableName: 'isic-4-fa', + timestamps: false + }); + return isic-4-fa; + } +} diff --git a/isic-4-facategories DONE.js b/isic-4-facategories DONE.js new file mode 100644 index 0000000..6c4b591 --- /dev/null +++ b/isic-4-facategories DONE.js @@ -0,0 +1,39 @@ +import _sequelize from 'sequelize'; +const { Model, Sequelize } = _sequelize; + +export default class isic-4-facategories extends Model { + static init(sequelize, DataTypes) { + super.init({ + ID: { + type: DataTypes.TINYINT.UNSIGNED, + allowNull: false, + primaryKey: true + }, + ISICID: { + type: DataTypes.STRING(5), + allowNull: true + }, + Code: { + type: DataTypes.STRING(5), + allowNull: true + }, + Value: { + type: DataTypes.STRING(255), + allowNull: true + }, + LowerLimit: { + type: DataTypes.STRING(2), + allowNull: true + }, + UpperLimit: { + type: DataTypes.STRING(2), + allowNull: true + } + }, { + sequelize, + tableName: 'isic-4-facategories', + timestamps: false + }); + return isic-4-facategories; + } +} diff --git a/isic-business DONE.js b/isic-business DONE.js new file mode 100644 index 0000000..26a6838 --- /dev/null +++ b/isic-business DONE.js @@ -0,0 +1,62 @@ +import _sequelize from 'sequelize'; +const { Model, Sequelize } = _sequelize; + +export default class isic-business extends Model { + static init(sequelize, DataTypes) { + super.init({ + ID: { + autoIncrement: true, + type: DataTypes.INTEGER, + allowNull: false, + primaryKey: true + }, + Code: { + type: DataTypes.STRING(10), + allowNull: false + }, + Value: { + type: DataTypes.STRING(200), + allowNull: false + }, + Type: { + type: DataTypes.STRING(20), + allowNull: false + }, + CreationDate: { + type: DataTypes.DATE, + allowNull: false, + defaultValue: Sequelize.fn('current_timestamp') + }, + ModificationDate: { + type: DataTypes.DATE, + allowNull: true + }, + Version: { + type: DataTypes.DOUBLE, + allowNull: false, + defaultValue: 1 + }, + Deleted: { + type: DataTypes.TINYINT, + allowNull: false, + defaultValue: 0 + } + }, { + sequelize, + tableName: 'isic-business', + hasTrigger: true, + timestamps: false, + indexes: [ + { + name: "PRIMARY", + unique: true, + using: "BTREE", + fields: [ + { name: "ID" }, + ] + }, + ] + }); + return isic-business; + } +} diff --git a/judiciarystructures DONE.js b/judiciarystructures DONE.js new file mode 100644 index 0000000..e10f325 --- /dev/null +++ b/judiciarystructures DONE.js @@ -0,0 +1,187 @@ +import _sequelize from 'sequelize'; +const { Model, Sequelize } = _sequelize; + +export default class judiciarystructures extends Model { + static init(sequelize, DataTypes) { + super.init({ + ID: { + autoIncrement: true, + type: DataTypes.INTEGER, + allowNull: false, + primaryKey: true + }, + UnitID: { + type: DataTypes.STRING(10), + allowNull: true + }, + ParentID: { + type: DataTypes.STRING(10), + allowNull: true + }, + Name: { + type: DataTypes.STRING(125), + allowNull: false + }, + Address: { + type: DataTypes.TEXT, + allowNull: true + }, + Level: { + type: DataTypes.TINYINT.UNSIGNED, + allowNull: false + }, + TypeName: { + type: DataTypes.STRING(50), + allowNull: true + }, + 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 + } + }, { + sequelize, + tableName: 'judiciarystructures', + hasTrigger: true, + timestamps: false, + indexes: [ + { + name: "PRIMARY", + unique: true, + using: "BTREE", + fields: [ + { name: "ID" }, + ] + }, + ] + }); + return judiciarystructures; + } +} diff --git a/legalactionitems DONE.js b/legalactionitems DONE.js new file mode 100644 index 0000000..391274e --- /dev/null +++ b/legalactionitems DONE.js @@ -0,0 +1,47 @@ +import _sequelize from 'sequelize'; +const { Model, Sequelize } = _sequelize; + +export default class legalactionitems extends Model { + static init(sequelize, DataTypes) { + super.init({ + ID: { + autoIncrement: true, + type: DataTypes.INTEGER, + allowNull: false, + primaryKey: true + }, + LegalActionId: { + type: DataTypes.INTEGER, + allowNull: true + }, + DataType: { + type: DataTypes.STRING(50), + allowNull: true + }, + Title: { + type: DataTypes.TEXT, + allowNull: true + }, + PropertyName: { + type: DataTypes.STRING(50), + allowNull: true + } + }, { + sequelize, + tableName: 'legalactionitems', + hasTrigger: true, + timestamps: false, + indexes: [ + { + name: "PRIMARY", + unique: true, + using: "BTREE", + fields: [ + { name: "ID" }, + ] + }, + ] + }); + return legalactionitems; + } +} diff --git a/legalactions DONE.js b/legalactions DONE.js new file mode 100644 index 0000000..9f36022 --- /dev/null +++ b/legalactions DONE.js @@ -0,0 +1,51 @@ +import _sequelize from 'sequelize'; +const { Model, Sequelize } = _sequelize; + +export default class legalactions extends Model { + static init(sequelize, DataTypes) { + super.init({ + ID: { + autoIncrement: true, + type: DataTypes.SMALLINT, + allowNull: false, + primaryKey: true + }, + Code: { + type: DataTypes.SMALLINT, + allowNull: true + }, + Value: { + type: DataTypes.STRING(200), + allowNull: true + }, + Title: { + type: DataTypes.STRING(200), + allowNull: true + }, + Type: { + type: DataTypes.TINYINT.UNSIGNED, + allowNull: true + }, + FileName: { + type: DataTypes.STRING(50), + allowNull: true + } + }, { + sequelize, + tableName: 'legalactions', + hasTrigger: true, + timestamps: false, + indexes: [ + { + name: "PRIMARY", + unique: true, + using: "BTREE", + fields: [ + { name: "ID" }, + ] + }, + ] + }); + return legalactions; + } +} diff --git a/menus DONE.js b/menus DONE.js new file mode 100644 index 0000000..10dc580 --- /dev/null +++ b/menus DONE.js @@ -0,0 +1,80 @@ +import _sequelize from 'sequelize'; +const { Model, Sequelize } = _sequelize; + +export default class menus extends Model { + static init(sequelize, DataTypes) { + super.init({ + ID: { + type: DataTypes.INTEGER, + allowNull: false, + primaryKey: true + }, + Order: { + type: DataTypes.TINYINT.UNSIGNED, + allowNull: true + }, + Title: { + type: DataTypes.STRING(50), + allowNull: true + }, + Controller: { + type: DataTypes.STRING(50), + allowNull: true + }, + Action: { + type: DataTypes.STRING(50), + allowNull: true + }, + Parameters: { + type: DataTypes.STRING(50), + allowNull: true + }, + ParentId: { + type: DataTypes.INTEGER, + allowNull: true + }, + IconClass: { + type: DataTypes.STRING(50), + allowNull: true + }, + InsertDateTime: { + type: DataTypes.DATE, + allowNull: true, + defaultValue: Sequelize.fn('current_timestamp') + }, + UpdateDateTime: { + type: DataTypes.DATE, + allowNull: true + }, + DeleteDateTime: { + type: DataTypes.DATE, + allowNull: true + }, + Status: { + type: DataTypes.TINYINT, + allowNull: false, + defaultValue: 1 + }, + Comment: { + type: DataTypes.TEXT, + allowNull: true + } + }, { + sequelize, + tableName: 'menus', + hasTrigger: true, + timestamps: false, + indexes: [ + { + name: "PRIMARY", + unique: true, + using: "BTREE", + fields: [ + { name: "ID" }, + ] + }, + ] + }); + return menus; + } +} diff --git a/messages.js b/messages.js new file mode 100644 index 0000000..52360b0 --- /dev/null +++ b/messages.js @@ -0,0 +1,23 @@ +import _sequelize from 'sequelize'; +const { Model, Sequelize } = _sequelize; + +export default class messages extends Model { + static init(sequelize, DataTypes) { + super.init({ + ID: { + type: DataTypes.SMALLINT, + allowNull: true, + primaryKey: true + }, + MessageText: { + type: DataTypes.TEXT, + allowNull: true + } + }, { + sequelize, + tableName: 'messages', + timestamps: false + }); + return messages; + } +} diff --git a/networkstructure DONE.js b/networkstructure DONE.js new file mode 100644 index 0000000..af493e5 --- /dev/null +++ b/networkstructure DONE.js @@ -0,0 +1,187 @@ +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; + } +} diff --git a/noevahed DONE.js b/noevahed DONE.js new file mode 100644 index 0000000..f636fb4 --- /dev/null +++ b/noevahed DONE.js @@ -0,0 +1,34 @@ +import _sequelize from 'sequelize'; +const { Model, Sequelize } = _sequelize; + +export default class noevahed extends Model { + static init(sequelize, DataTypes) { + super.init({ + NoeVahedName: { + type: DataTypes.STRING(255), + allowNull: false + }, + Count: { + type: DataTypes.INTEGER, + allowNull: false + }, + ISICBusinessCode: { + type: DataTypes.STRING(10), + allowNull: true + }, + MainGroupCode: { + type: DataTypes.STRING(10), + allowNull: true + }, + AncillaryGroupCode: { + type: DataTypes.STRING(10), + allowNull: true + } + }, { + sequelize, + tableName: 'noevahed', + timestamps: false + }); + return noevahed; + } +} diff --git a/positionrelations DONE.js b/positionrelations DONE.js new file mode 100644 index 0000000..00c046c --- /dev/null +++ b/positionrelations DONE.js @@ -0,0 +1,83 @@ +import _sequelize from 'sequelize'; +const { Model, Sequelize } = _sequelize; + +export default class positionrelations extends Model { + static init(sequelize, DataTypes) { + super.init({ + Id: { + autoIncrement: true, + type: DataTypes.INTEGER, + allowNull: false, + primaryKey: true + }, + UserID: { + type: DataTypes.INTEGER, + allowNull: true + }, + PositionId: { + type: DataTypes.INTEGER, + allowNull: true + }, + L1Id: { + type: DataTypes.INTEGER, + allowNull: true + }, + L2Id: { + type: DataTypes.INTEGER, + allowNull: true + }, + L3Id: { + type: DataTypes.INTEGER, + allowNull: true + }, + L4Id: { + type: DataTypes.INTEGER, + allowNull: true + }, + L5Id: { + type: DataTypes.INTEGER, + allowNull: true + }, + L6Id: { + type: DataTypes.INTEGER, + allowNull: true + }, + L7Id: { + type: DataTypes.INTEGER, + allowNull: true + }, + L8Id: { + type: DataTypes.INTEGER, + allowNull: true + }, + L9Id: { + type: DataTypes.INTEGER, + allowNull: true + }, + ParentId: { + type: DataTypes.INTEGER, + allowNull: true + }, + ParentPositionId: { + type: DataTypes.INTEGER, + allowNull: true + } + }, { + sequelize, + tableName: 'positionrelations', + hasTrigger: true, + timestamps: false, + indexes: [ + { + name: "PRIMARY", + unique: true, + using: "BTREE", + fields: [ + { name: "Id" }, + ] + }, + ] + }); + return positionrelations; + } +} diff --git a/positions DONE.js b/positions DONE.js new file mode 100644 index 0000000..d68c602 --- /dev/null +++ b/positions DONE.js @@ -0,0 +1,57 @@ +import _sequelize from 'sequelize'; +const { Model, Sequelize } = _sequelize; + +export default class positions extends Model { + static init(sequelize, DataTypes) { + super.init({ + ID: { + autoIncrement: true, + type: DataTypes.INTEGER, + allowNull: false, + primaryKey: true + }, + NetworkStructureID: { + type: DataTypes.INTEGER, + allowNull: false + }, + PositionTypeID: { + type: DataTypes.SMALLINT, + allowNull: false + }, + DisplayName: { + type: DataTypes.STRING(100), + allowNull: false + }, + Status: { + type: DataTypes.TINYINT, + allowNull: false + }, + Deleted: { + type: DataTypes.TINYINT, + allowNull: false, + defaultValue: 0 + }, + Selected: { + type: DataTypes.TINYINT, + allowNull: true, + defaultValue: 0 + } + }, { + sequelize, + tableName: 'positions', + hasTrigger: true, + timestamps: false, + indexes: [ + { + name: "PRIMARY", + unique: true, + using: "BTREE", + fields: [ + { name: "ID" }, + ] + }, + ] + }); + return positions; + } +} diff --git a/positiontypes DONE.js b/positiontypes DONE.js new file mode 100644 index 0000000..7ef6131 --- /dev/null +++ b/positiontypes DONE.js @@ -0,0 +1,43 @@ +import _sequelize from 'sequelize'; +const { Model, Sequelize } = _sequelize; + +export default class positiontypes extends Model { + static init(sequelize, DataTypes) { + super.init({ + ID: { + autoIncrement: true, + type: DataTypes.SMALLINT, + allowNull: false, + primaryKey: true + }, + Code: { + type: DataTypes.SMALLINT, + allowNull: false + }, + Value: { + type: DataTypes.STRING(100), + allowNull: false + }, + Unique: { + type: DataTypes.TINYINT, + allowNull: false + } + }, { + sequelize, + tableName: 'positiontypes', + hasTrigger: true, + timestamps: false, + indexes: [ + { + name: "PRIMARY", + unique: true, + using: "BTREE", + fields: [ + { name: "ID" }, + ] + }, + ] + }); + return positiontypes; + } +} diff --git a/questioncategories DONE.js b/questioncategories DONE.js new file mode 100644 index 0000000..e20fd98 --- /dev/null +++ b/questioncategories DONE.js @@ -0,0 +1,27 @@ +import _sequelize from 'sequelize'; +const { Model, Sequelize } = _sequelize; + +export default class questioncategories extends Model { + static init(sequelize, DataTypes) { + super.init({ + ID: { + type: DataTypes.SMALLINT, + allowNull: true, + primaryKey: true + }, + Code: { + type: DataTypes.SMALLINT, + allowNull: true + }, + Value: { + type: DataTypes.STRING(100), + allowNull: true + } + }, { + sequelize, + tableName: 'questioncategories', + timestamps: false + }); + return questioncategories; + } +} diff --git a/questions DONE.js b/questions DONE.js new file mode 100644 index 0000000..a9d01a7 --- /dev/null +++ b/questions DONE.js @@ -0,0 +1,87 @@ +import _sequelize from 'sequelize'; +const { Model, Sequelize } = _sequelize; + +export default class questions extends Model { + static init(sequelize, DataTypes) { + super.init({ + ID: { + type: DataTypes.INTEGER, + allowNull: false, + primaryKey: true + }, + Title: { + type: DataTypes.TEXT, + allowNull: true + }, + DefectText: { + type: DataTypes.TEXT, + allowNull: true + }, + DataType: { + type: DataTypes.STRING(100), + allowNull: true + }, + Response: { + type: DataTypes.STRING(100), + allowNull: true + }, + CategoryID: { + type: DataTypes.INTEGER, + allowNull: true + }, + Critical: { + type: DataTypes.TINYINT.UNSIGNED, + allowNull: true + }, + InsertDateTime: { + type: DataTypes.DATE, + allowNull: true + }, + UpdateDateTime: { + type: DataTypes.DATE, + allowNull: true + }, + DeleteDateTime: { + type: DataTypes.DATE, + allowNull: true + }, + Status: { + type: DataTypes.TINYINT, + allowNull: true, + defaultValue: 1 + }, + Comment: { + type: DataTypes.STRING(255), + allowNull: true + }, + Pattern: { + type: DataTypes.STRING(100), + allowNull: true + }, + Action: { + type: DataTypes.STRING(100), + allowNull: true + }, + Quide: { + type: DataTypes.TEXT, + allowNull: true + } + }, { + sequelize, + tableName: 'questions', + hasTrigger: true, + timestamps: false, + indexes: [ + { + name: "PRIMARY", + unique: true, + using: "BTREE", + fields: [ + { name: "ID" }, + ] + }, + ] + }); + return questions; + } +} diff --git a/rolefunctions DONE.js b/rolefunctions DONE.js new file mode 100644 index 0000000..f0019fd --- /dev/null +++ b/rolefunctions DONE.js @@ -0,0 +1,48 @@ +import _sequelize from 'sequelize'; +const { Model, Sequelize } = _sequelize; + +export default class rolefunctions extends Model { + static init(sequelize, DataTypes) { + super.init({ + ID: { + autoIncrement: true, + type: DataTypes.INTEGER, + allowNull: false, + primaryKey: true + }, + RoleID: { + type: DataTypes.INTEGER, + allowNull: false + }, + FunctionName: { + type: DataTypes.STRING(50), + allowNull: false + }, + Permission: { + type: DataTypes.TINYINT, + allowNull: false, + defaultValue: 0 + }, + Credit: { + type: DataTypes.DOUBLE, + allowNull: true + } + }, { + sequelize, + tableName: 'rolefunctions', + hasTrigger: true, + timestamps: false, + indexes: [ + { + name: "PRIMARY", + unique: true, + using: "BTREE", + fields: [ + { name: "ID" }, + ] + }, + ] + }); + return rolefunctions; + } +} diff --git a/roles DONE.js b/roles DONE.js new file mode 100644 index 0000000..5d5fc64 --- /dev/null +++ b/roles DONE.js @@ -0,0 +1,74 @@ +import _sequelize from 'sequelize'; +const { Model, Sequelize } = _sequelize; + +export default class roles extends Model { + static init(sequelize, DataTypes) { + super.init({ + ID: { + autoIncrement: true, + type: DataTypes.INTEGER, + allowNull: false, + primaryKey: true + }, + Name: { + type: DataTypes.STRING(50), + allowNull: true + }, + Title: { + type: DataTypes.STRING(50), + allowNull: true + }, + InsertDateTime: { + type: DataTypes.DATE, + allowNull: true + }, + UpdateDateTime: { + type: DataTypes.DATE, + allowNull: true + }, + DeleteDateTime: { + type: DataTypes.DATE, + allowNull: true + }, + Status: { + type: DataTypes.TINYINT, + allowNull: false + }, + Comment: { + type: DataTypes.STRING(255), + allowNull: true + }, + MaxRequestsPerMinute: { + type: DataTypes.INTEGER, + allowNull: true, + defaultValue: 100 + }, + MaxRequestsPerHour: { + type: DataTypes.INTEGER, + allowNull: true, + defaultValue: 1000 + }, + MaxRequestsPerDay: { + type: DataTypes.INTEGER, + allowNull: true, + defaultValue: 5000 + } + }, { + sequelize, + tableName: 'roles', + hasTrigger: true, + timestamps: false, + indexes: [ + { + name: "PRIMARY", + unique: true, + using: "BTREE", + fields: [ + { name: "ID" }, + ] + }, + ] + }); + return roles; + } +} diff --git a/system.js b/system.js new file mode 100644 index 0000000..6123a72 --- /dev/null +++ b/system.js @@ -0,0 +1,52 @@ +import _sequelize from 'sequelize'; +const { Model, Sequelize } = _sequelize; + +export default class system extends Model { + static init(sequelize, DataTypes) { + super.init({ + ID: { + autoIncrement: true, + type: DataTypes.BIGINT, + allowNull: false, + primaryKey: true + }, + EventDate: { + type: DataTypes.DATE, + allowNull: false, + defaultValue: Sequelize.fn('current_timestamp') + }, + MessageID: { + type: DataTypes.SMALLINT, + allowNull: false + }, + Data: { + type: DataTypes.TEXT, + allowNull: true + }, + Severity: { + type: DataTypes.TINYINT.UNSIGNED, + allowNull: false + }, + Duration: { + type: DataTypes.BIGINT, + allowNull: false + } + }, { + sequelize, + tableName: 'system', + hasTrigger: true, + timestamps: false, + indexes: [ + { + name: "PRIMARY", + unique: true, + using: "BTREE", + fields: [ + { name: "ID" }, + ] + }, + ] + }); + return system; + } +} diff --git a/temphistory DONE.js b/temphistory DONE.js new file mode 100644 index 0000000..4082fba --- /dev/null +++ b/temphistory DONE.js @@ -0,0 +1,68 @@ +import _sequelize from 'sequelize'; +const { Model, Sequelize } = _sequelize; + +export default class temphistory extends Model { + static init(sequelize, DataTypes) { + super.init({ + ID: { + autoIncrement: true, + type: DataTypes.BIGINT, + allowNull: false, + primaryKey: true + }, + EventDate: { + type: DataTypes.DATE, + allowNull: false, + defaultValue: Sequelize.fn('current_timestamp') + }, + ChangeType: { + type: DataTypes.TINYINT.UNSIGNED, + allowNull: false + }, + UserID: { + type: DataTypes.INTEGER, + allowNull: false + }, + FullName: { + type: DataTypes.STRING(100), + allowNull: true + }, + IPAddress: { + type: DataTypes.STRING(100), + allowNull: false + }, + TableName: { + type: DataTypes.STRING(50), + allowNull: false + }, + RowID: { + type: DataTypes.BIGINT, + allowNull: false + }, + Data: { + type: DataTypes.TEXT, + allowNull: false + }, + Hash: { + type: DataTypes.STRING(64), + allowNull: false + } + }, { + sequelize, + tableName: 'temphistory', + hasTrigger: true, + timestamps: false, + indexes: [ + { + name: "PRIMARY", + unique: true, + using: "BTREE", + fields: [ + { name: "ID" }, + ] + }, + ] + }); + return temphistory; + } +} diff --git a/temptableinmemory DONE.js b/temptableinmemory DONE.js new file mode 100644 index 0000000..62f9535 --- /dev/null +++ b/temptableinmemory DONE.js @@ -0,0 +1,34 @@ +import _sequelize from 'sequelize'; +const { Model, Sequelize } = _sequelize; + +export default class temptableinmemory extends Model { + static init(sequelize, DataTypes) { + super.init({ + ID: { + type: DataTypes.TINYINT.UNSIGNED, + allowNull: false, + primaryKey: true + }, + DebugMode: { + type: DataTypes.TINYINT, + allowNull: false + } + }, { + sequelize, + tableName: 'temptableinmemory', + hasTrigger: true, + timestamps: false, + indexes: [ + { + name: "PRIMARY", + unique: true, + using: "BTREE", + fields: [ + { name: "ID" }, + ] + }, + ] + }); + return temptableinmemory; + } +} diff --git a/testcategories DONE.js b/testcategories DONE.js new file mode 100644 index 0000000..381425b --- /dev/null +++ b/testcategories DONE.js @@ -0,0 +1,27 @@ +import _sequelize from 'sequelize'; +const { Model, Sequelize } = _sequelize; + +export default class testcategories extends Model { + static init(sequelize, DataTypes) { + super.init({ + ID: { + type: DataTypes.SMALLINT, + allowNull: true, + primaryKey: true + }, + Code: { + type: DataTypes.SMALLINT, + allowNull: true + }, + Value: { + type: DataTypes.STRING(100), + allowNull: true + } + }, { + sequelize, + tableName: 'testcategories', + timestamps: false + }); + return testcategories; + } +} diff --git a/testresultcategories DONE.js b/testresultcategories DONE.js new file mode 100644 index 0000000..b1cea3f --- /dev/null +++ b/testresultcategories DONE.js @@ -0,0 +1,27 @@ +import _sequelize from 'sequelize'; +const { Model, Sequelize } = _sequelize; + +export default class testresultcategories extends Model { + static init(sequelize, DataTypes) { + super.init({ + ID: { + type: DataTypes.SMALLINT, + allowNull: true, + primaryKey: true + }, + Code: { + type: DataTypes.SMALLINT, + allowNull: true + }, + Value: { + type: DataTypes.STRING(100), + allowNull: true + } + }, { + sequelize, + tableName: 'testresultcategories', + timestamps: false + }); + return testresultcategories; + } +} diff --git a/unitdedicated DONE.js b/unitdedicated DONE.js new file mode 100644 index 0000000..02196ed --- /dev/null +++ b/unitdedicated DONE.js @@ -0,0 +1,52 @@ +import _sequelize from 'sequelize'; +const { Model, Sequelize } = _sequelize; + +export default class unitdedicated extends Model { + static init(sequelize, DataTypes) { + super.init({ + ID: { + autoIncrement: true, + type: DataTypes.INTEGER, + allowNull: false, + primaryKey: true + }, + UnitID: { + type: DataTypes.INTEGER, + allowNull: true + }, + ApprovedBed: { + type: DataTypes.INTEGER, + allowNull: true + }, + ActiveBed: { + type: DataTypes.INTEGER, + allowNull: true + }, + HospitalType: { + type: DataTypes.TINYINT.UNSIGNED, + allowNull: true + }, + InsertDate: { + type: DataTypes.DATE, + allowNull: true, + defaultValue: Sequelize.fn('current_timestamp') + } + }, { + sequelize, + tableName: 'unitdedicated', + hasTrigger: true, + timestamps: false, + indexes: [ + { + name: "PRIMARY", + unique: true, + using: "BTREE", + fields: [ + { name: "ID" }, + ] + }, + ] + }); + return unitdedicated; + } +} diff --git a/units DONE.js b/units DONE.js new file mode 100644 index 0000000..6d26d0c --- /dev/null +++ b/units DONE.js @@ -0,0 +1,416 @@ +import _sequelize from 'sequelize'; +const { Model, Sequelize } = _sequelize; + +export default class units extends Model { + static init(sequelize, DataTypes) { + super.init({ + ID: { + autoIncrement: true, + type: DataTypes.INTEGER, + allowNull: false, + primaryKey: true + }, + JameCodeVahed: { + type: DataTypes.STRING(15), + allowNull: false + }, + JameNoeVahedID: { + type: DataTypes.STRING(5), + allowNull: true + }, + JameNoeVahedName: { + type: DataTypes.STRING(200), + allowNull: true + }, + JameNameVahed: { + type: DataTypes.STRING(255), + allowNull: true + }, + JameDaneshgahID: { + type: DataTypes.STRING(5), + allowNull: true + }, + JameDaneshgahName: { + type: DataTypes.STRING(200), + allowNull: true + }, + JameShabakeName: { + type: DataTypes.STRING(200), + allowNull: true + }, + JameMarkazeBehdashtName: { + type: DataTypes.STRING(200), + allowNull: true + }, + JameKhaneBehdashtName: { + type: DataTypes.STRING(200), + allowNull: true + }, + JameVaziyatID: { + type: DataTypes.STRING(1), + allowNull: true + }, + JameVaziyatName: { + type: DataTypes.STRING(20), + allowNull: true + }, + JameMotasadiCodeMeli: { + type: DataTypes.STRING(12), + allowNull: true + }, + JameMotasadiFirstName: { + type: DataTypes.STRING(100), + allowNull: true + }, + JameMotasadiLastName: { + type: DataTypes.STRING(100), + allowNull: true + }, + JameMotasadiFatherName: { + type: DataTypes.STRING(100), + allowNull: true + }, + JameMobile: { + type: DataTypes.STRING(20), + allowNull: true + }, + JameTel: { + type: DataTypes.STRING(40), + allowNull: true + }, + JameAddress: { + type: DataTypes.STRING(255), + allowNull: true + }, + JameGIS_Long: { + type: DataTypes.DOUBLE, + allowNull: true + }, + JameGIS_Lat: { + type: DataTypes.DOUBLE, + allowNull: true + }, + L1ID: { + type: DataTypes.INTEGER, + allowNull: true + }, + L2ID: { + type: DataTypes.INTEGER, + allowNull: true + }, + L3ID: { + type: DataTypes.INTEGER, + allowNull: true + }, + L4ID: { + type: DataTypes.INTEGER, + allowNull: true + }, + L5ID: { + type: DataTypes.INTEGER, + allowNull: true + }, + L6ID: { + type: DataTypes.INTEGER, + allowNull: true + }, + L7ID: { + type: DataTypes.INTEGER, + allowNull: true + }, + L8ID: { + type: DataTypes.INTEGER, + allowNull: true + }, + L9ID: { + type: DataTypes.INTEGER, + allowNull: true + }, + DelegatedPositionID: { + type: DataTypes.INTEGER, + allowNull: true + }, + DelegationExpirationDate: { + type: DataTypes.DATE, + allowNull: true + }, + ProvinceCode: { + type: DataTypes.STRING(10), + allowNull: true + }, + TownshipCode: { + type: DataTypes.STRING(10), + allowNull: true + }, + CountyCode: { + type: DataTypes.STRING(10), + allowNull: true + }, + CityCode: { + type: DataTypes.STRING(10), + allowNull: true + }, + RegionCode: { + type: DataTypes.CHAR(10), + allowNull: true + }, + RuralDistinctCode: { + type: DataTypes.STRING(10), + allowNull: true + }, + VillageCode: { + type: DataTypes.STRING(10), + allowNull: true + }, + ManagerNationalCode: { + type: DataTypes.STRING(15), + allowNull: true + }, + ManagerFirstName: { + type: DataTypes.STRING(50), + allowNull: true + }, + ManagerLastName: { + type: DataTypes.STRING(50), + allowNull: true + }, + ManagerMobile: { + type: DataTypes.STRING(15), + allowNull: true + }, + GuildActivityTypeID: { + type: DataTypes.TINYINT.UNSIGNED, + allowNull: true + }, + CertificationID: { + type: DataTypes.STRING(15), + allowNull: true + }, + ISICCode: { + type: DataTypes.STRING(10), + allowNull: true + }, + ISICValue: { + type: DataTypes.STRING(200), + allowNull: true + }, + TableauTitle: { + type: DataTypes.STRING(255), + allowNull: true + }, + Telephone: { + type: DataTypes.STRING(25), + allowNull: true + }, + PostalCode: { + type: DataTypes.STRING(12), + allowNull: true + }, + HasSubunit: { + type: DataTypes.TINYINT, + allowNull: true + }, + ParentID: { + type: DataTypes.INTEGER, + allowNull: true + }, + ChainID: { + type: DataTypes.SMALLINT, + allowNull: true + }, + Source: { + type: DataTypes.TINYINT.UNSIGNED, + allowNull: true + }, + Index: { + type: DataTypes.TEXT, + allowNull: true + }, + IsApproved: { + type: DataTypes.TINYINT, + allowNull: true + }, + ApprovedPersonID: { + type: DataTypes.INTEGER, + allowNull: true + }, + CoveredByOffice: { + type: DataTypes.TINYINT, + allowNull: true + }, + Status: { + type: DataTypes.TINYINT.UNSIGNED, + allowNull: true, + defaultValue: 1 + }, + EstablishDate: { + type: DataTypes.DATE, + allowNull: true + }, + HasBusinessLicense: { + type: DataTypes.TINYINT, + allowNull: true + }, + BusinessLicense: { + type: DataTypes.STRING(10), + allowNull: true + }, + BusinessLicenseDate: { + type: DataTypes.DATE, + allowNull: true + }, + BusinessLicenseExporter: { + type: DataTypes.STRING(50), + allowNull: true + }, + ISICBusiness: { + type: DataTypes.STRING(50), + allowNull: true + }, + StaffCount: { + type: DataTypes.INTEGER, + allowNull: true + }, + Area: { + type: DataTypes.STRING(50), + allowNull: true + }, + AreaArse: { + type: DataTypes.STRING(50), + allowNull: true + }, + IsOnTheWay: { + type: DataTypes.TINYINT, + allowNull: true + }, + CountryDivisionID: { + type: DataTypes.INTEGER, + allowNull: true + }, + HasIndependentManager: { + type: DataTypes.TINYINT, + allowNull: true + }, + InsertDate: { + type: DataTypes.DATE, + allowNull: true + }, + AncillaryID: { + type: DataTypes.INTEGER, + allowNull: true + }, + DeleteReason: { + type: DataTypes.TEXT, + allowNull: true + }, + UniqueOperator: { + type: DataTypes.TINYINT, + allowNull: true + }, + OperatorNationalCode: { + type: DataTypes.BIGINT, + allowNull: true + }, + HealthRank: { + type: DataTypes.INTEGER, + allowNull: true + }, + ProfessionalRate: { + type: DataTypes.INTEGER, + allowNull: true + }, + EnvironmentalRate: { + type: DataTypes.INTEGER, + allowNull: true + }, + NetworkStractureID: { + type: DataTypes.INTEGER, + allowNull: true + }, + AncillaryCode: { + type: DataTypes.STRING(50), + allowNull: true + }, + OwnerType: { + type: DataTypes.TINYINT.UNSIGNED, + allowNull: true + }, + LicenseType: { + type: DataTypes.TINYINT.UNSIGNED, + allowNull: true + }, + MardNobatKar: { + type: DataTypes.INTEGER, + allowNull: true + }, + MardGheyrNobatKar: { + type: DataTypes.INTEGER, + allowNull: true + }, + ZanNobatKar: { + type: DataTypes.INTEGER, + allowNull: true + }, + ZanGheyrNobatKar: { + type: DataTypes.INTEGER, + allowNull: true + }, + WorkType: { + type: DataTypes.TINYINT.UNSIGNED, + allowNull: true + }, + HasChain: { + type: DataTypes.TINYINT, + allowNull: true + }, + WorkStateFasli: { + type: DataTypes.TINYINT.UNSIGNED, + allowNull: true + }, + WorkStateKhanegi: { + type: DataTypes.TINYINT.UNSIGNED, + allowNull: true + }, + TaminAb: { + type: DataTypes.TINYINT.UNSIGNED, + allowNull: true + }, + Fazelab: { + type: DataTypes.TINYINT.UNSIGNED, + allowNull: true + }, + Pasmand: { + type: DataTypes.STRING(50), + allowNull: true + }, + TashkilatBehdashti: { + type: DataTypes.TINYINT.UNSIGNED, + allowNull: true + }, + PersonOneType: { + type: DataTypes.TINYINT.UNSIGNED, + allowNull: true + }, + PersonTwoType: { + type: DataTypes.TINYINT.UNSIGNED, + allowNull: true + } + }, { + sequelize, + tableName: 'units', + hasTrigger: true, + timestamps: false, + indexes: [ + { + name: "PRIMARY", + unique: true, + using: "BTREE", + fields: [ + { name: "ID" }, + ] + }, + ] + }); + return units; + } +} diff --git a/user DONE.js b/user DONE.js new file mode 100644 index 0000000..3b97115 --- /dev/null +++ b/user DONE.js @@ -0,0 +1,65 @@ +import _sequelize from 'sequelize'; +const { Model, Sequelize } = _sequelize; + +export default class user extends Model { + static init(sequelize, DataTypes) { + super.init({ + ID: { + autoIncrement: true, + type: DataTypes.BIGINT, + allowNull: false, + primaryKey: true + }, + UserID: { + type: DataTypes.INTEGER, + allowNull: true + }, + IPAddress: { + type: DataTypes.STRING(100), + allowNull: false + }, + EventDate: { + type: DataTypes.DATE, + allowNull: false, + defaultValue: Sequelize.fn('current_timestamp') + }, + MessageID: { + type: DataTypes.SMALLINT, + allowNull: false + }, + Data: { + type: DataTypes.TEXT, + allowNull: true + }, + Severity: { + type: DataTypes.TINYINT.UNSIGNED, + allowNull: false + }, + Succeeded: { + type: DataTypes.TINYINT, + allowNull: false, + defaultValue: 1 + }, + Duration: { + type: DataTypes.BIGINT, + allowNull: false + } + }, { + sequelize, + tableName: 'user', + hasTrigger: true, + timestamps: false, + indexes: [ + { + name: "PRIMARY", + unique: true, + using: "BTREE", + fields: [ + { name: "ID" }, + ] + }, + ] + }); + return user; + } +} diff --git a/userpositions DONE.js b/userpositions DONE.js new file mode 100644 index 0000000..a5db54c --- /dev/null +++ b/userpositions DONE.js @@ -0,0 +1,52 @@ +import _sequelize from 'sequelize'; +const { Model, Sequelize } = _sequelize; + +export default class userpositions extends Model { + static init(sequelize, DataTypes) { + super.init({ + ID: { + autoIncrement: true, + type: DataTypes.INTEGER, + allowNull: false, + primaryKey: true + }, + UserID: { + type: DataTypes.INTEGER, + allowNull: false + }, + PositionID: { + type: DataTypes.INTEGER, + allowNull: true + }, + RoleID: { + type: DataTypes.INTEGER, + allowNull: false + }, + NetworkAccessID: { + type: DataTypes.INTEGER, + allowNull: true + }, + Status: { + type: DataTypes.TINYINT.UNSIGNED, + allowNull: true, + defaultValue: 1 + } + }, { + sequelize, + tableName: 'userpositions', + hasTrigger: true, + timestamps: false, + indexes: [ + { + name: "PRIMARY", + unique: true, + using: "BTREE", + fields: [ + { name: "ID" }, + ] + }, + ] + }); + return userpositions; + } +} diff --git a/users DONE.js b/users DONE.js new file mode 100644 index 0000000..3931540 --- /dev/null +++ b/users DONE.js @@ -0,0 +1,166 @@ +import _sequelize from 'sequelize'; +const { Model, Sequelize } = _sequelize; + +export default class users extends Model { + static init(sequelize, DataTypes) { + super.init({ + ID: { + autoIncrement: true, + type: DataTypes.INTEGER, + allowNull: false, + primaryKey: true + }, + Username: { + type: DataTypes.STRING(50), + allowNull: true + }, + Password: { + type: DataTypes.TEXT, + allowNull: true + }, + Salt: { + type: DataTypes.STRING(10), + allowNull: true + }, + FirstName: { + type: DataTypes.STRING(50), + allowNull: true + }, + LastName: { + type: DataTypes.STRING(50), + allowNull: false + }, + DisplayName: { + type: DataTypes.STRING(100), + allowNull: true + }, + NationalCode: { + type: DataTypes.BIGINT, + allowNull: false + }, + MobileNo: { + type: DataTypes.STRING(15), + allowNull: false + }, + Email: { + type: DataTypes.STRING(50), + allowNull: true + }, + SuperUser: { + type: DataTypes.TINYINT, + allowNull: true, + defaultValue: 0 + }, + PasswordMustBeChanged: { + type: DataTypes.TINYINT, + allowNull: true, + defaultValue: 0 + }, + ExpirationDate: { + type: DataTypes.DATE, + allowNull: true, + defaultValue: "1753-01-01 00:00:00" + }, + DefaultPositionID: { + type: DataTypes.INTEGER, + allowNull: true + }, + Index: { + type: DataTypes.TEXT, + allowNull: true + }, + Status: { + type: DataTypes.TINYINT.UNSIGNED, + allowNull: true, + defaultValue: 1 + }, + RelationEmp: { + type: DataTypes.TINYINT.UNSIGNED, + allowNull: true + }, + NetworkStructureID: { + type: DataTypes.INTEGER, + allowNull: true + }, + CountryDivisionsID: { + type: DataTypes.INTEGER, + allowNull: true, + defaultValue: 0 + }, + Phone: { + type: DataTypes.CHAR(8), + allowNull: true + }, + CityCode: { + type: DataTypes.CHAR(3), + allowNull: true + }, + CreatorUserID: { + type: DataTypes.INTEGER, + allowNull: true + }, + CreateData: { + type: DataTypes.DATE, + allowNull: true, + defaultValue: Sequelize.fn('current_timestamp') + }, + L1ID: { + type: DataTypes.INTEGER, + allowNull: false, + defaultValue: 1 + }, + L2ID: { + type: DataTypes.INTEGER, + allowNull: true + }, + L3ID: { + type: DataTypes.INTEGER, + allowNull: true + }, + L4ID: { + type: DataTypes.INTEGER, + allowNull: true + }, + L5ID: { + type: DataTypes.INTEGER, + allowNull: true + }, + L6ID: { + type: DataTypes.INTEGER, + allowNull: true + }, + L7ID: { + type: DataTypes.INTEGER, + allowNull: true + }, + L8ID: { + type: DataTypes.INTEGER, + allowNull: true + }, + L9ID: { + type: DataTypes.INTEGER, + allowNull: true + }, + JobTitle: { + type: DataTypes.STRING(50), + allowNull: true + } + }, { + sequelize, + tableName: 'users', + hasTrigger: true, + timestamps: false, + indexes: [ + { + name: "PRIMARY", + unique: true, + using: "BTREE", + fields: [ + { name: "ID" }, + ] + }, + ] + }); + return users; + } +} diff --git a/workflowsprocesses.js b/workflowsprocesses.js new file mode 100644 index 0000000..3f970fa --- /dev/null +++ b/workflowsprocesses.js @@ -0,0 +1,75 @@ +import _sequelize from 'sequelize'; +const { Model, Sequelize } = _sequelize; + +export default class workflowsprocesses extends Model { + static init(sequelize, DataTypes) { + super.init({ + IntID: { + autoIncrement: true, + type: DataTypes.BIGINT, + allowNull: false, + primaryKey: true + }, + WorkflowID: { + type: DataTypes.BIGINT, + allowNull: false + }, + WorkTypeID: { + type: DataTypes.SMALLINT, + allowNull: false + }, + StateTypeID: { + type: DataTypes.SMALLINT, + allowNull: false + }, + UserID: { + type: DataTypes.INTEGER, + allowNull: false + }, + UserFirstName: { + type: DataTypes.STRING(50), + allowNull: false + }, + UserLastName: { + type: DataTypes.STRING(50), + allowNull: false + }, + StartTime: { + type: DataTypes.DATE, + allowNull: false + }, + ExpirationTime: { + type: DataTypes.DATE, + allowNull: true + }, + Duration: { + type: DataTypes.BIGINT, + allowNull: true + }, + PreviousID: { + type: DataTypes.BIGINT, + allowNull: true + }, + Comment: { + type: DataTypes.STRING(255), + allowNull: true + } + }, { + sequelize, + tableName: 'workflowsprocesses', + hasTrigger: true, + timestamps: false, + indexes: [ + { + name: "PRIMARY", + unique: true, + using: "BTREE", + fields: [ + { name: "IntID" }, + ] + }, + ] + }); + return workflowsprocesses; + } +} diff --git a/workflowstatetypes DONE.js b/workflowstatetypes DONE.js new file mode 100644 index 0000000..25afe91 --- /dev/null +++ b/workflowstatetypes DONE.js @@ -0,0 +1,43 @@ +import _sequelize from 'sequelize'; +const { Model, Sequelize } = _sequelize; + +export default class workflowstatetypes extends Model { + static init(sequelize, DataTypes) { + super.init({ + ID: { + autoIncrement: true, + type: DataTypes.SMALLINT, + allowNull: false, + primaryKey: true + }, + WorkTypeID: { + type: DataTypes.SMALLINT, + allowNull: true + }, + StateID: { + type: DataTypes.SMALLINT, + allowNull: true + }, + Name: { + type: DataTypes.STRING(255), + allowNull: true + } + }, { + sequelize, + tableName: 'workflowstatetypes', + hasTrigger: true, + timestamps: false, + indexes: [ + { + name: "PRIMARY", + unique: true, + using: "BTREE", + fields: [ + { name: "ID" }, + ] + }, + ] + }); + return workflowstatetypes; + } +} diff --git a/worktypes DONE.js b/worktypes DONE.js new file mode 100644 index 0000000..62ae036 --- /dev/null +++ b/worktypes DONE.js @@ -0,0 +1,27 @@ +import _sequelize from 'sequelize'; +const { Model, Sequelize } = _sequelize; + +export default class worktypes extends Model { + static init(sequelize, DataTypes) { + super.init({ + ID: { + type: DataTypes.SMALLINT, + allowNull: true, + primaryKey: true + }, + Code: { + type: DataTypes.SMALLINT, + allowNull: true + }, + Value: { + type: DataTypes.STRING(100), + allowNull: true + } + }, { + sequelize, + tableName: 'worktypes', + timestamps: false + }); + return worktypes; + } +}