test1.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. 'use strict';
  2. const modelBase = require('./model_base');
  3. const F = require('../common/function');
  4. var mysqlLib = require('../libs/mysql.js');
  5. var config = require('../config');
  6. var server = config.mysqlServers[0];
  7. module.exports = function (tableName, modelManager) {
  8. modelBase.call(this);
  9. this.table = tableName;
  10. this.uni_index = 'id';
  11. this.auto_index = 'id';
  12. //var new_config = {
  13. // host: '127.0.0.1',
  14. // port: 8066,
  15. // user: 'root',
  16. // password: '123456',
  17. // database: 'TESTDB',
  18. // connectionLimit: 50,
  19. // //charset: 'utf8mb4_unicode_ci',
  20. // charset: 'utf8_unicode_ci',
  21. // multipleStatements: true,
  22. // waitForConnections: true,
  23. // acquireTimeout: 5000,
  24. // connectTimeout: 5000
  25. //};
  26. //this.mysql = new mysqlLib(new_config);
  27. let model_map = modelManager.model_map;
  28. };