123456789101112131415161718192021222324252627 |
- module.exports = ( app ) => {
- this.conn = new require('../bin/mysql').mysqlConn();
- // this.conn = new app.bin.mysql.mysqlConn;
- const New = this.conn.define('news', {
- // id: {
- // type: this.conn.Sequelize.INTEGER,
- // primaryKey: true,
- // autoIncrement: true,
- // },
- websiteSlug: this.conn.Sequelize.STRING,
- link: this.conn.Sequelize.STRING,
- thumb: this.conn.Sequelize.STRING,
- title: this.conn.Sequelize.STRING,
- date: this.conn.Sequelize.STRING,
- content: this.conn.Sequelize.TEXT,
- tag: this.conn.Sequelize.STRING,
- // createdAt: this.conn.Sequelize.DATE,
- // updatedAt: this.conn.Sequelize.DATE,
- });
- this.query = New;
- return this;
- }
|