'use strict'; const meta = require('./.question.js'); const Controller = require('egg').Controller; const { CrudController } = require('naf-framework-mongoose/lib/controller'); // 调研考察 class QuestionController extends Controller { constructor(ctx) { super(ctx); this.service = this.ctx.service.users.question; } async index() { const { data = [], total = 0 } = await this.service.query(this.ctx.query); this.ctx.ok({ data, total }); } } module.exports = CrudController(QuestionController, meta);