remark.js 488 B

1234567891011121314151617181920
  1. 'use strict';
  2. const { CrudService } = require('naf-framework-mongoose/lib/service');
  3. const { BusinessError, ErrorCode } = require('naf-core').Error;
  4. const _ = require('lodash');
  5. const assert = require('assert');
  6. // 备注
  7. class RemarkService extends CrudService {
  8. constructor(ctx) {
  9. super(ctx, 'remark');
  10. this.model = this.ctx.model.Remark;
  11. }
  12. async getRemark(query) {
  13. const res = await this.model.findOne(query);
  14. return res;
  15. }
  16. }
  17. module.exports = RemarkService;