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.
 

187 lines
3.7 KiB

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;
}
}