You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
416 lines
8.4 KiB
416 lines
8.4 KiB
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; |
|
} |
|
}
|
|
|