other_book_model.js 387 B

123456789101112131415161718
  1. const BaseModel = require('../BaseModel')
  2. class other_book_model extends BaseModel {
  3. constructor() {
  4. super('other_book'); //表名
  5. }
  6. async createData(tableData) {
  7. return await this.transaction(async (connection) => {
  8. const id = await this.create(tableData);
  9. return id;
  10. });
  11. }
  12. }
  13. module.exports = new other_book_model();