'use strict'; const assert = require('assert'); const _ = require('lodash'); const { ObjectId } = require('mongoose').Types; const { CrudService } = require('naf-framework-mongoose/lib/service'); const { BusinessError, ErrorCode } = require('naf-core').Error; class SubjectService extends CrudService { constructor(ctx) { super(ctx, 'subject'); this.model = this.ctx.model.Subject; } // async create(data) { // const { code, name } = data; // assert(code && name, '缺少部分信息项'); // const newdata = data; // newdata.passwd = { secret: passwd }; // return await this.model.create(newdata); // } } module.exports = SubjectService;