Browse Source

数据表模型

release_0.0.1
巴林闲侠 2 years ago
parent
commit
3f55d3cd8a
  1. 1
      api/app/lib/index.js
  2. 94
      api/app/lib/models/department.js
  3. 922
      api/app/lib/models/road.js
  4. 202
      api/app/lib/models/user.js
  5. 2
      api/app/lib/models/user_token.js
  6. 234
      api/log/development.log

1
api/app/lib/index.js

@ -23,6 +23,7 @@ module.exports.entry = function (app, router, opts) {
module.exports.models = function (dc) { // dc = { orm: Sequelize对象, ORM: Sequelize, models: {} }
fs.readdirSync(path.join(__dirname, '/models')).forEach((filename) => {
console.log(filename);
require(`./models/${filename}`)(dc)
});

94
api/app/lib/models/department.js

@ -2,51 +2,51 @@
'use strict';
module.exports = dc => {
const DataTypes = dc.ORM;
const sequelize = dc.orm;
const Department = sequelize.define("department", {
id: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: "nextval(department_id_seq1::regclass)",
comment: null,
primaryKey: true,
field: "id",
autoIncrement: false,
unique: "department_id_uindex"
},
name: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "name",
autoIncrement: false
},
dependence: {
type: DataTypes.INTEGER,
allowNull: true,
defaultValue: null,
comment: null,
primaryKey: false,
field: "dependence",
autoIncrement: false
},
delete: {
type: DataTypes.BOOLEAN,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "delete",
autoIncrement: false
}
}, {
tableName: "department",
comment: "",
indexes: []
});
dc.models.Department = Department;
return Department;
const DataTypes = dc.ORM;
const sequelize = dc.orm;
const Department = sequelize.define("department", {
id: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: "nextval(department_id_seq1::regclass)",
comment: null,
primaryKey: true,
field: "id",
autoIncrement: false,
unique: "department_id_uindex"
},
name: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "name",
autoIncrement: false
},
dependence: {
type: DataTypes.INTEGER,
allowNull: true,
defaultValue: null,
comment: null,
primaryKey: false,
field: "dependence",
autoIncrement: false
},
delete: {
type: DataTypes.BOOLEAN,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "delete",
autoIncrement: false
}
}, {
tableName: "department",
comment: "",
indexes: []
});
dc.models.Department = Department;
return Department;
};

922
api/app/lib/models/road.js

@ -2,465 +2,465 @@
'use strict';
module.exports = dc => {
const DataTypes = dc.ORM;
const sequelize = dc.orm;
const Road = sequelize.define("road", {
id: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: true,
field: "id",
autoIncrement: true,
unique: "road_id_uindex"
},
routeName: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "路线名称",
primaryKey: false,
field: "route_name",
autoIncrement: false
},
routeCode: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "路线代码",
primaryKey: false,
field: "route_code",
autoIncrement: false
},
sectionNo: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "路段序号",
primaryKey: false,
field: "section_no",
autoIncrement: false
},
townshipCode: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "乡镇编码",
primaryKey: false,
field: "township_code",
autoIncrement: false
},
startingPlaceName: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "起点地名",
primaryKey: false,
field: "starting_place_name",
autoIncrement: false
},
startStation: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "起点桩号",
primaryKey: false,
field: "start_station",
autoIncrement: false
},
categoryOfStartingPointAndDividingPoint: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "起点分界点类别",
primaryKey: false,
field: "category_of_starting_point_and_dividing_point",
autoIncrement: false
},
stopPlaceName: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "止点地名",
primaryKey: false,
field: "stop_place_name",
autoIncrement: false
},
categoryOfDeadCenterAndDividingPoint: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "止点分界点类别",
primaryKey: false,
field: "category_of_dead_center_and_dividing_point",
autoIncrement: false
},
stopStation: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "止点桩号",
primaryKey: false,
field: "stop_station",
autoIncrement: false
},
sectionType: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "路段类型",
primaryKey: false,
field: "section_type",
autoIncrement: false
},
natureOfRoadSection: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "路段性质",
primaryKey: false,
field: "nature_of_road_section",
autoIncrement: false
},
completionTime: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "建成时间",
primaryKey: false,
field: "completion_time",
autoIncrement: false
},
gbmAndCivilizedModelRoad: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "GBM及文明样板路",
primaryKey: false,
field: "gbm_and_civilized_model_road",
autoIncrement: false
},
landforms: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "地貌",
primaryKey: false,
field: "landforms",
autoIncrement: false
},
natureOfCharges: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "收费性质",
primaryKey: false,
field: "nature_of_charges",
autoIncrement: false
},
numberOfCulverts: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "涵洞数量",
primaryKey: false,
field: "number_of_culverts",
autoIncrement: false
},
technicalLevel: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "技术等级",
primaryKey: false,
field: "technical_level",
autoIncrement: false
},
pavementType: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "路面类型",
primaryKey: false,
field: "pavement_type",
autoIncrement: false
},
pavementWidth: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "路面宽度",
primaryKey: false,
field: "pavement_width",
autoIncrement: false
},
subgradeWidth: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "路基宽度",
primaryKey: false,
field: "subgrade_width",
autoIncrement: false
},
laneCharacteristics: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "车道特征",
primaryKey: false,
field: "lane_characteristics",
autoIncrement: false
},
whetherItIsOpenToTrafficInSunnyOrRainyDays: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "是否晴雨通车",
primaryKey: false,
field: "whether_it_is_open_to_traffic_in_sunny_or_rainy_days",
autoIncrement: false
},
designSpeedPerHour: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "设计时速",
primaryKey: false,
field: "design_speed_per_hour",
autoIncrement: false
},
urbanManagementSectionOrNot: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "是否城管路段",
primaryKey: false,
field: "urban_management_section_or_not",
autoIncrement: false
},
managementAndMaintenanceUnit: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "管养单位",
primaryKey: false,
field: "management_and_maintenance_unit",
autoIncrement: false
},
roadAdministrationUnit: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "路政管理单位",
primaryKey: false,
field: "road_administration_unit",
autoIncrement: false
},
alimentation: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "列养情况",
primaryKey: false,
field: "alimentation",
autoIncrement: false
},
sourceOfListedMaintenanceFunds: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "列养资金来源",
primaryKey: false,
field: "source_of_listed_maintenance_funds",
autoIncrement: false
},
curingTime: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "养护时间",
primaryKey: false,
field: "curing_time_",
autoIncrement: false
},
greeningMileage: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "可绿化里程",
primaryKey: false,
field: "greening_mileage",
autoIncrement: false
},
greeningMileaged: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "已绿化里程",
primaryKey: false,
field: "greening_mileaged",
autoIncrement: false
},
typeOfRepeatedRoadSection: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "重复道路路段类型",
primaryKey: false,
field: "type_of_repeated_road_section",
autoIncrement: false
},
serialNumberOfRepeatedSection: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "重复路段序号",
primaryKey: false,
field: "serial_number_of_repeated_section",
autoIncrement: false
},
repeatedSectionRouteCode: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "重复路段路线编码",
primaryKey: false,
field: "repeated_section_route_code",
autoIncrement: false
},
reportingUnit: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "填报单位",
primaryKey: false,
field: "reporting_unit",
autoIncrement: false
},
reasonForChange: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "变更原因",
primaryKey: false,
field: "reason_for_change",
autoIncrement: false
},
changeTime: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "变更时间",
primaryKey: false,
field: "change_time",
autoIncrement: false
},
whetherMaintenanceManagedHighway: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "是否按干线公路管理接养",
primaryKey: false,
field: "whether_maintenance_managed_highway",
autoIncrement: false
},
remarks: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "备注",
primaryKey: false,
field: "remarks",
autoIncrement: false
},
routeCodeOfLastYear: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "上年路线编码",
primaryKey: false,
field: "route_code_of_last_year",
autoIncrement: false
},
routeNameOfLastYear: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "上年路线名称",
primaryKey: false,
field: "route_name_of_last_year",
autoIncrement: false
},
startingStationOfLastYear: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "上年起点桩号",
primaryKey: false,
field: "starting_station_of_last_year",
autoIncrement: false
},
lastYearsEndingPointStakeNumber: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "上年止点桩号",
primaryKey: false,
field: "last_years_ending_point_stake_number",
autoIncrement: false
},
graphicMileage: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "图形里程",
primaryKey: false,
field: "graphic_mileage",
autoIncrement: false
},
chainageMileage: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "桩号里程",
primaryKey: false,
field: "chainage_mileage",
autoIncrement: false
},
districtcounty: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "所在区县",
primaryKey: false,
field: "districtcounty",
autoIncrement: false
},
locationCity: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "所在地市",
primaryKey: false,
field: "location_city",
autoIncrement: false
},
level: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "县 / 乡 / 村",
primaryKey: false,
field: "level",
autoIncrement: false
}
}, {
tableName: "road",
comment: "",
indexes: []
});
dc.models.Road = Road;
return Road;
const DataTypes = dc.ORM;
const sequelize = dc.orm;
const Road = sequelize.define("road", {
id: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: true,
field: "id",
autoIncrement: true,
unique: "road_id_uindex"
},
routeName: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "路线名称",
primaryKey: false,
field: "route_name",
autoIncrement: false
},
routeCode: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "路线代码",
primaryKey: false,
field: "route_code",
autoIncrement: false
},
sectionNo: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "路段序号",
primaryKey: false,
field: "section_no",
autoIncrement: false
},
townshipCode: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "乡镇编码",
primaryKey: false,
field: "township_code",
autoIncrement: false
},
startingPlaceName: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "起点地名",
primaryKey: false,
field: "starting_place_name",
autoIncrement: false
},
startStation: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "起点桩号",
primaryKey: false,
field: "start_station",
autoIncrement: false
},
categoryOfStartingPointAndDividingPoint: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "起点分界点类别",
primaryKey: false,
field: "category_of_starting_point_and_dividing_point",
autoIncrement: false
},
stopPlaceName: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "止点地名",
primaryKey: false,
field: "stop_place_name",
autoIncrement: false
},
categoryOfDeadCenterAndDividingPoint: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "止点分界点类别",
primaryKey: false,
field: "category_of_dead_center_and_dividing_point",
autoIncrement: false
},
stopStation: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "止点桩号",
primaryKey: false,
field: "stop_station",
autoIncrement: false
},
sectionType: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "路段类型",
primaryKey: false,
field: "section_type",
autoIncrement: false
},
natureOfRoadSection: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "路段性质",
primaryKey: false,
field: "nature_of_road_section",
autoIncrement: false
},
completionTime: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "建成时间",
primaryKey: false,
field: "completion_time",
autoIncrement: false
},
gbmAndCivilizedModelRoad: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "GBM及文明样板路",
primaryKey: false,
field: "gbm_and_civilized_model_road",
autoIncrement: false
},
landforms: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "地貌",
primaryKey: false,
field: "landforms",
autoIncrement: false
},
natureOfCharges: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "收费性质",
primaryKey: false,
field: "nature_of_charges",
autoIncrement: false
},
numberOfCulverts: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "涵洞数量",
primaryKey: false,
field: "number_of_culverts",
autoIncrement: false
},
technicalLevel: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "技术等级",
primaryKey: false,
field: "technical_level",
autoIncrement: false
},
pavementType: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "路面类型",
primaryKey: false,
field: "pavement_type",
autoIncrement: false
},
pavementWidth: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "路面宽度",
primaryKey: false,
field: "pavement_width",
autoIncrement: false
},
subgradeWidth: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "路基宽度",
primaryKey: false,
field: "subgrade_width",
autoIncrement: false
},
laneCharacteristics: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "车道特征",
primaryKey: false,
field: "lane_characteristics",
autoIncrement: false
},
whetherItIsOpenToTrafficInSunnyOrRainyDays: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "是否晴雨通车",
primaryKey: false,
field: "whether_it_is_open_to_traffic_in_sunny_or_rainy_days",
autoIncrement: false
},
designSpeedPerHour: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "设计时速",
primaryKey: false,
field: "design_speed_per_hour",
autoIncrement: false
},
urbanManagementSectionOrNot: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "是否城管路段",
primaryKey: false,
field: "urban_management_section_or_not",
autoIncrement: false
},
managementAndMaintenanceUnit: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "管养单位",
primaryKey: false,
field: "management_and_maintenance_unit",
autoIncrement: false
},
roadAdministrationUnit: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "路政管理单位",
primaryKey: false,
field: "road_administration_unit",
autoIncrement: false
},
alimentation: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "列养情况",
primaryKey: false,
field: "alimentation",
autoIncrement: false
},
sourceOfListedMaintenanceFunds: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "列养资金来源",
primaryKey: false,
field: "source_of_listed_maintenance_funds",
autoIncrement: false
},
curingTime: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "养护时间",
primaryKey: false,
field: "curing_time_",
autoIncrement: false
},
greeningMileage: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "可绿化里程",
primaryKey: false,
field: "greening_mileage",
autoIncrement: false
},
greeningMileaged: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "已绿化里程",
primaryKey: false,
field: "greening_mileaged",
autoIncrement: false
},
typeOfRepeatedRoadSection: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "重复道路路段类型",
primaryKey: false,
field: "type_of_repeated_road_section",
autoIncrement: false
},
serialNumberOfRepeatedSection: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "重复路段序号",
primaryKey: false,
field: "serial_number_of_repeated_section",
autoIncrement: false
},
repeatedSectionRouteCode: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "重复路段路线编码",
primaryKey: false,
field: "repeated_section_route_code",
autoIncrement: false
},
reportingUnit: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "填报单位",
primaryKey: false,
field: "reporting_unit",
autoIncrement: false
},
reasonForChange: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "变更原因",
primaryKey: false,
field: "reason_for_change",
autoIncrement: false
},
changeTime: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "变更时间",
primaryKey: false,
field: "change_time",
autoIncrement: false
},
whetherMaintenanceManagedHighway: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "是否按干线公路管理接养",
primaryKey: false,
field: "whether_maintenance_managed_highway",
autoIncrement: false
},
remarks: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "备注",
primaryKey: false,
field: "remarks",
autoIncrement: false
},
routeCodeOfLastYear: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "上年路线编码",
primaryKey: false,
field: "route_code_of_last_year",
autoIncrement: false
},
routeNameOfLastYear: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "上年路线名称",
primaryKey: false,
field: "route_name_of_last_year",
autoIncrement: false
},
startingStationOfLastYear: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "上年起点桩号",
primaryKey: false,
field: "starting_station_of_last_year",
autoIncrement: false
},
lastYearsEndingPointStakeNumber: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "上年止点桩号",
primaryKey: false,
field: "last_years_ending_point_stake_number",
autoIncrement: false
},
graphicMileage: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "图形里程",
primaryKey: false,
field: "graphic_mileage",
autoIncrement: false
},
chainageMileage: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "桩号里程",
primaryKey: false,
field: "chainage_mileage",
autoIncrement: false
},
districtcounty: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "所在区县",
primaryKey: false,
field: "districtcounty",
autoIncrement: false
},
locationCity: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "所在地市",
primaryKey: false,
field: "location_city",
autoIncrement: false
},
level: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "县 / 乡 / 村",
primaryKey: false,
field: "level",
autoIncrement: false
}
}, {
tableName: "road",
comment: "",
indexes: []
});
dc.models.Road = Road;
return Road;
};

202
api/app/lib/models/user.js

@ -2,105 +2,105 @@
'use strict';
module.exports = dc => {
const DataTypes = dc.ORM;
const sequelize = dc.orm;
const User = sequelize.define("user", {
id: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: "nextval(user_id_seq1::regclass)",
comment: null,
primaryKey: true,
field: "id",
autoIncrement: false,
unique: "user_id_uindex"
},
name: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "name",
autoIncrement: false
},
username: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "username",
autoIncrement: false
},
password: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "password",
autoIncrement: false
},
departmentId: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "department_id",
autoIncrement: false
},
delete: {
type: DataTypes.BOOLEAN,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "delete",
autoIncrement: false
},
remark: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: "th",
comment: null,
primaryKey: false,
field: "remark",
autoIncrement: false
},
phone: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: null,
primaryKey: false,
field: "phone",
autoIncrement: false
},
email: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: null,
primaryKey: false,
field: "email",
autoIncrement: false
},
enable: {
type: DataTypes.BOOLEAN,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "enable",
autoIncrement: false
}
}, {
tableName: "user",
comment: "",
indexes: []
});
dc.models.User = User;
return User;
const DataTypes = dc.ORM;
const sequelize = dc.orm;
const User = sequelize.define("user", {
id: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: "nextval(user_id_seq1::regclass)",
comment: null,
primaryKey: true,
field: "id",
autoIncrement: false,
unique: "user_id_uindex"
},
name: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "name",
autoIncrement: false
},
username: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "username",
autoIncrement: false
},
password: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "password",
autoIncrement: false
},
departmentId: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "department_id",
autoIncrement: false
},
delete: {
type: DataTypes.BOOLEAN,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "delete",
autoIncrement: false
},
remark: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: "th",
comment: null,
primaryKey: false,
field: "remark",
autoIncrement: false
},
phone: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: null,
primaryKey: false,
field: "phone",
autoIncrement: false
},
email: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: null,
primaryKey: false,
field: "email",
autoIncrement: false
},
enable: {
type: DataTypes.BOOLEAN,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "enable",
autoIncrement: false
}
}, {
tableName: "user",
comment: "",
indexes: []
});
dc.models.User = User;
return User;
};

2
api/app/lib/models/user_token.js

@ -10,7 +10,7 @@ module.exports = dc => {
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
primaryKey: true,
field: "token",
autoIncrement: false
},

234
api/log/development.log

@ -6717,3 +6717,237 @@
2022-07-20 20:45:25.022 - debug: [FS-LOGGER] Init.
2022-07-20 20:45:25.106 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-20 20:45:25.106 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-20 20:45:56.444 - debug: [FS-LOGGER] Init.
2022-07-20 20:45:56.515 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-20 20:45:56.515 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-20 20:47:15.777 - error: path: /login, error: SequelizeDatabaseError: 关系 "user_token" 的 "id" 字段不存在
2022-07-20 20:47:17.648 - error: [FS-ERRHD]
{
message: 'read ECONNRESET',
stack: 'SequelizeConnectionError: read ECONNRESET\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\sequelize\\lib\\dialects\\postgres\\connection-manager.js:154:24\n' +
' at Connection.connectingErrorHandler (c:\\_WorkCode\\四好公路\\api\\node_modules\\pg\\lib\\client.js:194:14)\n' +
' at Connection.emit (events.js:314:20)\n' +
' at Socket.reportStreamError (c:\\_WorkCode\\四好公路\\api\\node_modules\\pg\\lib\\connection.js:73:10)\n' +
' at Socket.emit (events.js:314:20)\n' +
' at emitErrorNT (internal/streams/destroy.js:92:8)\n' +
' at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)\n' +
' at processTicksAndRejections (internal/process/task_queues.js:84:21)\n' +
'From previous event:\n' +
' at ConnectionManager.connect (c:\\_WorkCode\\四好公路\\api\\node_modules\\sequelize\\lib\\dialects\\postgres\\connection-manager.js:107:12)\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\sequelize\\lib\\dialects\\abstract\\connection-manager.js:338:50\n' +
'From previous event:\n' +
' at ConnectionManager._connect (c:\\_WorkCode\\四好公路\\api\\node_modules\\sequelize\\lib\\dialects\\abstract\\connection-manager.js:338:8)\n' +
' at Object.create (c:\\_WorkCode\\四好公路\\api\\node_modules\\sequelize\\lib\\dialects\\abstract\\connection-manager.js:101:28)\n' +
' at Pool._createResource (c:\\_WorkCode\\四好公路\\api\\node_modules\\generic-pool\\lib\\Pool.js:308:42)\n' +
' at Pool._ensureMinimum (c:\\_WorkCode\\四好公路\\api\\node_modules\\generic-pool\\lib\\Pool.js:338:12)\n' +
' at Pool.start (c:\\_WorkCode\\四好公路\\api\\node_modules\\generic-pool\\lib\\Pool.js:412:10)\n' +
' at Pool.acquire (c:\\_WorkCode\\四好公路\\api\\node_modules\\generic-pool\\lib\\Pool.js:429:12)\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\sequelize\\lib\\dialects\\abstract\\connection-manager.js:292:24\n' +
' at processImmediate (internal/timers.js:461:21)\n' +
' at process.callbackTrampoline (internal/async_hooks.js:126:14)\n' +
'From previous event:\n' +
' at ConnectionManager.getConnection (c:\\_WorkCode\\四好公路\\api\\node_modules\\sequelize\\lib\\dialects\\abstract\\connection-manager.js:291:20)\n' +
' at Transaction.prepareEnvironment (c:\\_WorkCode\\四好公路\\api\\node_modules\\sequelize\\lib\\transaction.js:125:60)\n' +
' at Sequelize.transaction (c:\\_WorkCode\\四好公路\\api\\node_modules\\sequelize\\lib\\sequelize.js:996:43)\n' +
' at login (c:\\_WorkCode\\四好公路\\api\\app\\lib\\controllers\\auth\\index.js:8:45)\n' +
' at dispatch (c:\\_WorkCode\\四好公路\\api\\node_modules\\koa-compose\\index.js:44:32)\n' +
' at next (c:\\_WorkCode\\四好公路\\api\\node_modules\\koa-compose\\index.js:45:18)\n' +
' at c:\\_WorkCode\\四好公路\\api\\app\\lib\\middlewares\\business-rest.js:45:16\n' +
' at dispatch (c:\\_WorkCode\\四好公路\\api\\node_modules\\koa-compose\\index.js:44:32)\n' +
' at next (c:\\_WorkCode\\四好公路\\api\\node_modules\\koa-compose\\index.js:45:18)\n' +
' at auth (c:\\_WorkCode\\四好公路\\api\\app\\lib\\middlewares\\authenticator.js:145:19)\n' +
' at dispatch (c:\\_WorkCode\\四好公路\\api\\node_modules\\koa-compose\\index.js:44:32)\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\koa-compose\\index.js:36:12\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\koa-66\\index.js:209:56\n' +
' at dispatch (c:\\_WorkCode\\四好公路\\api\\node_modules\\koa\\node_modules\\koa-compose\\index.js:42:32)\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\fs-dc\\lib\\dc.js:35:15\n' +
' at Generator.next (<anonymous>)\n' +
' at onFulfilled (c:\\_WorkCode\\四好公路\\api\\node_modules\\co\\index.js:65:19)\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\co\\index.js:54:5\n' +
' at new Promise (<anonymous>)\n' +
' at co (c:\\_WorkCode\\四好公路\\api\\node_modules\\co\\index.js:50:10)\n' +
' at createPromise (c:\\_WorkCode\\四好公路\\api\\node_modules\\co\\index.js:30:15)\n' +
' at dispatch (c:\\_WorkCode\\四好公路\\api\\node_modules\\koa\\node_modules\\koa-compose\\index.js:42:32)\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\fs-logger\\lib\\logger.js:48:15\n' +
' at Generator.next (<anonymous>)\n' +
' at onFulfilled (c:\\_WorkCode\\四好公路\\api\\node_modules\\co\\index.js:65:19)',
name: 'SequelizeConnectionError',
parent: { errno: 'ECONNRESET', code: 'ECONNRESET', syscall: 'read' },
original: { '$ref': '$["parent"]' },
__stackCleaned__: true
}
2022-07-20 20:47:19.778 - error: [FS-ERRHD]
{
message: 'read ECONNRESET',
stack: 'SequelizeConnectionError: read ECONNRESET\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\sequelize\\lib\\dialects\\postgres\\connection-manager.js:154:24\n' +
' at Connection.connectingErrorHandler (c:\\_WorkCode\\四好公路\\api\\node_modules\\pg\\lib\\client.js:194:14)\n' +
' at Connection.emit (events.js:314:20)\n' +
' at Socket.reportStreamError (c:\\_WorkCode\\四好公路\\api\\node_modules\\pg\\lib\\connection.js:73:10)\n' +
' at Socket.emit (events.js:314:20)\n' +
' at emitErrorNT (internal/streams/destroy.js:92:8)\n' +
' at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)\n' +
' at processTicksAndRejections (internal/process/task_queues.js:84:21)\n' +
'From previous event:\n' +
' at ConnectionManager.connect (c:\\_WorkCode\\四好公路\\api\\node_modules\\sequelize\\lib\\dialects\\postgres\\connection-manager.js:107:12)\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\sequelize\\lib\\dialects\\abstract\\connection-manager.js:338:50\n' +
'From previous event:\n' +
' at ConnectionManager._connect (c:\\_WorkCode\\四好公路\\api\\node_modules\\sequelize\\lib\\dialects\\abstract\\connection-manager.js:338:8)\n' +
' at Object.create (c:\\_WorkCode\\四好公路\\api\\node_modules\\sequelize\\lib\\dialects\\abstract\\connection-manager.js:101:28)\n' +
' at Pool._createResource (c:\\_WorkCode\\四好公路\\api\\node_modules\\generic-pool\\lib\\Pool.js:308:42)\n' +
' at Pool._ensureMinimum (c:\\_WorkCode\\四好公路\\api\\node_modules\\generic-pool\\lib\\Pool.js:338:12)\n' +
' at Pool.start (c:\\_WorkCode\\四好公路\\api\\node_modules\\generic-pool\\lib\\Pool.js:412:10)\n' +
' at Pool.acquire (c:\\_WorkCode\\四好公路\\api\\node_modules\\generic-pool\\lib\\Pool.js:429:12)\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\sequelize\\lib\\dialects\\abstract\\connection-manager.js:292:24\n' +
' at processImmediate (internal/timers.js:461:21)\n' +
' at process.callbackTrampoline (internal/async_hooks.js:126:14)\n' +
'From previous event:\n' +
' at ConnectionManager.getConnection (c:\\_WorkCode\\四好公路\\api\\node_modules\\sequelize\\lib\\dialects\\abstract\\connection-manager.js:291:20)\n' +
' at Transaction.prepareEnvironment (c:\\_WorkCode\\四好公路\\api\\node_modules\\sequelize\\lib\\transaction.js:125:60)\n' +
' at Sequelize.transaction (c:\\_WorkCode\\四好公路\\api\\node_modules\\sequelize\\lib\\sequelize.js:996:43)\n' +
' at login (c:\\_WorkCode\\四好公路\\api\\app\\lib\\controllers\\auth\\index.js:8:45)\n' +
' at dispatch (c:\\_WorkCode\\四好公路\\api\\node_modules\\koa-compose\\index.js:44:32)\n' +
' at next (c:\\_WorkCode\\四好公路\\api\\node_modules\\koa-compose\\index.js:45:18)\n' +
' at c:\\_WorkCode\\四好公路\\api\\app\\lib\\middlewares\\business-rest.js:45:16\n' +
' at dispatch (c:\\_WorkCode\\四好公路\\api\\node_modules\\koa-compose\\index.js:44:32)\n' +
' at next (c:\\_WorkCode\\四好公路\\api\\node_modules\\koa-compose\\index.js:45:18)\n' +
' at auth (c:\\_WorkCode\\四好公路\\api\\app\\lib\\middlewares\\authenticator.js:145:19)\n' +
' at dispatch (c:\\_WorkCode\\四好公路\\api\\node_modules\\koa-compose\\index.js:44:32)\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\koa-compose\\index.js:36:12\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\koa-66\\index.js:209:56\n' +
' at dispatch (c:\\_WorkCode\\四好公路\\api\\node_modules\\koa\\node_modules\\koa-compose\\index.js:42:32)\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\fs-dc\\lib\\dc.js:35:15\n' +
' at Generator.next (<anonymous>)\n' +
' at onFulfilled (c:\\_WorkCode\\四好公路\\api\\node_modules\\co\\index.js:65:19)\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\co\\index.js:54:5\n' +
' at new Promise (<anonymous>)\n' +
' at co (c:\\_WorkCode\\四好公路\\api\\node_modules\\co\\index.js:50:10)\n' +
' at createPromise (c:\\_WorkCode\\四好公路\\api\\node_modules\\co\\index.js:30:15)\n' +
' at dispatch (c:\\_WorkCode\\四好公路\\api\\node_modules\\koa\\node_modules\\koa-compose\\index.js:42:32)\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\fs-logger\\lib\\logger.js:48:15\n' +
' at Generator.next (<anonymous>)\n' +
' at onFulfilled (c:\\_WorkCode\\四好公路\\api\\node_modules\\co\\index.js:65:19)',
name: 'SequelizeConnectionError',
parent: { errno: 'ECONNRESET', code: 'ECONNRESET', syscall: 'read' },
original: { '$ref': '$["parent"]' },
__stackCleaned__: true
}
2022-07-20 20:47:21.058 - error: [FS-ERRHD]
{
message: 'read ECONNRESET',
stack: 'SequelizeConnectionError: read ECONNRESET\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\sequelize\\lib\\dialects\\postgres\\connection-manager.js:154:24\n' +
' at Connection.connectingErrorHandler (c:\\_WorkCode\\四好公路\\api\\node_modules\\pg\\lib\\client.js:194:14)\n' +
' at Connection.emit (events.js:314:20)\n' +
' at Socket.reportStreamError (c:\\_WorkCode\\四好公路\\api\\node_modules\\pg\\lib\\connection.js:73:10)\n' +
' at Socket.emit (events.js:314:20)\n' +
' at emitErrorNT (internal/streams/destroy.js:92:8)\n' +
' at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)\n' +
' at processTicksAndRejections (internal/process/task_queues.js:84:21)\n' +
'From previous event:\n' +
' at ConnectionManager.connect (c:\\_WorkCode\\四好公路\\api\\node_modules\\sequelize\\lib\\dialects\\postgres\\connection-manager.js:107:12)\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\sequelize\\lib\\dialects\\abstract\\connection-manager.js:338:50\n' +
'From previous event:\n' +
' at ConnectionManager._connect (c:\\_WorkCode\\四好公路\\api\\node_modules\\sequelize\\lib\\dialects\\abstract\\connection-manager.js:338:8)\n' +
' at Object.create (c:\\_WorkCode\\四好公路\\api\\node_modules\\sequelize\\lib\\dialects\\abstract\\connection-manager.js:101:28)\n' +
' at Pool._createResource (c:\\_WorkCode\\四好公路\\api\\node_modules\\generic-pool\\lib\\Pool.js:308:42)\n' +
' at Pool._ensureMinimum (c:\\_WorkCode\\四好公路\\api\\node_modules\\generic-pool\\lib\\Pool.js:338:12)\n' +
' at Pool.start (c:\\_WorkCode\\四好公路\\api\\node_modules\\generic-pool\\lib\\Pool.js:412:10)\n' +
' at Pool.acquire (c:\\_WorkCode\\四好公路\\api\\node_modules\\generic-pool\\lib\\Pool.js:429:12)\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\sequelize\\lib\\dialects\\abstract\\connection-manager.js:292:24\n' +
' at processImmediate (internal/timers.js:461:21)\n' +
' at process.callbackTrampoline (internal/async_hooks.js:126:14)\n' +
'From previous event:\n' +
' at ConnectionManager.getConnection (c:\\_WorkCode\\四好公路\\api\\node_modules\\sequelize\\lib\\dialects\\abstract\\connection-manager.js:291:20)\n' +
' at Transaction.prepareEnvironment (c:\\_WorkCode\\四好公路\\api\\node_modules\\sequelize\\lib\\transaction.js:125:60)\n' +
' at Sequelize.transaction (c:\\_WorkCode\\四好公路\\api\\node_modules\\sequelize\\lib\\sequelize.js:996:43)\n' +
' at login (c:\\_WorkCode\\四好公路\\api\\app\\lib\\controllers\\auth\\index.js:8:45)\n' +
' at dispatch (c:\\_WorkCode\\四好公路\\api\\node_modules\\koa-compose\\index.js:44:32)\n' +
' at next (c:\\_WorkCode\\四好公路\\api\\node_modules\\koa-compose\\index.js:45:18)\n' +
' at c:\\_WorkCode\\四好公路\\api\\app\\lib\\middlewares\\business-rest.js:45:16\n' +
' at dispatch (c:\\_WorkCode\\四好公路\\api\\node_modules\\koa-compose\\index.js:44:32)\n' +
' at next (c:\\_WorkCode\\四好公路\\api\\node_modules\\koa-compose\\index.js:45:18)\n' +
' at auth (c:\\_WorkCode\\四好公路\\api\\app\\lib\\middlewares\\authenticator.js:145:19)\n' +
' at dispatch (c:\\_WorkCode\\四好公路\\api\\node_modules\\koa-compose\\index.js:44:32)\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\koa-compose\\index.js:36:12\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\koa-66\\index.js:209:56\n' +
' at dispatch (c:\\_WorkCode\\四好公路\\api\\node_modules\\koa\\node_modules\\koa-compose\\index.js:42:32)\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\fs-dc\\lib\\dc.js:35:15\n' +
' at Generator.next (<anonymous>)\n' +
' at onFulfilled (c:\\_WorkCode\\四好公路\\api\\node_modules\\co\\index.js:65:19)\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\co\\index.js:54:5\n' +
' at new Promise (<anonymous>)\n' +
' at co (c:\\_WorkCode\\四好公路\\api\\node_modules\\co\\index.js:50:10)\n' +
' at createPromise (c:\\_WorkCode\\四好公路\\api\\node_modules\\co\\index.js:30:15)\n' +
' at dispatch (c:\\_WorkCode\\四好公路\\api\\node_modules\\koa\\node_modules\\koa-compose\\index.js:42:32)\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\fs-logger\\lib\\logger.js:48:15\n' +
' at Generator.next (<anonymous>)\n' +
' at onFulfilled (c:\\_WorkCode\\四好公路\\api\\node_modules\\co\\index.js:65:19)',
name: 'SequelizeConnectionError',
parent: { errno: 'ECONNRESET', code: 'ECONNRESET', syscall: 'read' },
original: { '$ref': '$["parent"]' },
__stackCleaned__: true
}
2022-07-20 20:47:22.122 - error: [FS-ERRHD]
{
message: 'read ECONNRESET',
stack: 'SequelizeConnectionError: read ECONNRESET\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\sequelize\\lib\\dialects\\postgres\\connection-manager.js:154:24\n' +
' at Connection.connectingErrorHandler (c:\\_WorkCode\\四好公路\\api\\node_modules\\pg\\lib\\client.js:194:14)\n' +
' at Connection.emit (events.js:314:20)\n' +
' at Socket.reportStreamError (c:\\_WorkCode\\四好公路\\api\\node_modules\\pg\\lib\\connection.js:73:10)\n' +
' at Socket.emit (events.js:314:20)\n' +
' at emitErrorNT (internal/streams/destroy.js:92:8)\n' +
' at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)\n' +
' at processTicksAndRejections (internal/process/task_queues.js:84:21)\n' +
'From previous event:\n' +
' at ConnectionManager.connect (c:\\_WorkCode\\四好公路\\api\\node_modules\\sequelize\\lib\\dialects\\postgres\\connection-manager.js:107:12)\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\sequelize\\lib\\dialects\\abstract\\connection-manager.js:338:50\n' +
'From previous event:\n' +
' at ConnectionManager._connect (c:\\_WorkCode\\四好公路\\api\\node_modules\\sequelize\\lib\\dialects\\abstract\\connection-manager.js:338:8)\n' +
' at Object.create (c:\\_WorkCode\\四好公路\\api\\node_modules\\sequelize\\lib\\dialects\\abstract\\connection-manager.js:101:28)\n' +
' at Pool._createResource (c:\\_WorkCode\\四好公路\\api\\node_modules\\generic-pool\\lib\\Pool.js:308:42)\n' +
' at Pool._ensureMinimum (c:\\_WorkCode\\四好公路\\api\\node_modules\\generic-pool\\lib\\Pool.js:338:12)\n' +
' at Pool.start (c:\\_WorkCode\\四好公路\\api\\node_modules\\generic-pool\\lib\\Pool.js:412:10)\n' +
' at Pool.acquire (c:\\_WorkCode\\四好公路\\api\\node_modules\\generic-pool\\lib\\Pool.js:429:12)\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\sequelize\\lib\\dialects\\abstract\\connection-manager.js:292:24\n' +
' at processImmediate (internal/timers.js:461:21)\n' +
' at process.callbackTrampoline (internal/async_hooks.js:126:14)\n' +
'From previous event:\n' +
' at ConnectionManager.getConnection (c:\\_WorkCode\\四好公路\\api\\node_modules\\sequelize\\lib\\dialects\\abstract\\connection-manager.js:291:20)\n' +
' at Transaction.prepareEnvironment (c:\\_WorkCode\\四好公路\\api\\node_modules\\sequelize\\lib\\transaction.js:125:60)\n' +
' at Sequelize.transaction (c:\\_WorkCode\\四好公路\\api\\node_modules\\sequelize\\lib\\sequelize.js:996:43)\n' +
' at login (c:\\_WorkCode\\四好公路\\api\\app\\lib\\controllers\\auth\\index.js:8:45)\n' +
' at dispatch (c:\\_WorkCode\\四好公路\\api\\node_modules\\koa-compose\\index.js:44:32)\n' +
' at next (c:\\_WorkCode\\四好公路\\api\\node_modules\\koa-compose\\index.js:45:18)\n' +
' at c:\\_WorkCode\\四好公路\\api\\app\\lib\\middlewares\\business-rest.js:45:16\n' +
' at dispatch (c:\\_WorkCode\\四好公路\\api\\node_modules\\koa-compose\\index.js:44:32)\n' +
' at next (c:\\_WorkCode\\四好公路\\api\\node_modules\\koa-compose\\index.js:45:18)\n' +
' at auth (c:\\_WorkCode\\四好公路\\api\\app\\lib\\middlewares\\authenticator.js:145:19)\n' +
' at dispatch (c:\\_WorkCode\\四好公路\\api\\node_modules\\koa-compose\\index.js:44:32)\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\koa-compose\\index.js:36:12\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\koa-66\\index.js:209:56\n' +
' at dispatch (c:\\_WorkCode\\四好公路\\api\\node_modules\\koa\\node_modules\\koa-compose\\index.js:42:32)\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\fs-dc\\lib\\dc.js:35:15\n' +
' at Generator.next (<anonymous>)\n' +
' at onFulfilled (c:\\_WorkCode\\四好公路\\api\\node_modules\\co\\index.js:65:19)\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\co\\index.js:54:5\n' +
' at new Promise (<anonymous>)\n' +
' at co (c:\\_WorkCode\\四好公路\\api\\node_modules\\co\\index.js:50:10)\n' +
' at createPromise (c:\\_WorkCode\\四好公路\\api\\node_modules\\co\\index.js:30:15)\n' +
' at dispatch (c:\\_WorkCode\\四好公路\\api\\node_modules\\koa\\node_modules\\koa-compose\\index.js:42:32)\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\fs-logger\\lib\\logger.js:48:15\n' +
' at Generator.next (<anonymous>)\n' +
' at onFulfilled (c:\\_WorkCode\\四好公路\\api\\node_modules\\co\\index.js:65:19)',
name: 'SequelizeConnectionError',
parent: { errno: 'ECONNRESET', code: 'ECONNRESET', syscall: 'read' },
original: { '$ref': '$["parent"]' },
__stackCleaned__: true
}
2022-07-20 20:47:28.269 - debug: [FS-LOGGER] Init.
2022-07-20 20:47:28.345 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-20 20:47:28.345 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-20 20:48:16.746 - debug: [FS-LOGGER] Init.
2022-07-20 20:48:16.819 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-20 20:48:16.819 - info: [FS-AUTH] Inject auth and api mv into router.

Loading…
Cancel
Save