12345678910111213141516 |
- 'use strict';
- const { CrudService } = require('naf-framework-mongoose/lib/service');
- // 配置表
- class ConfigService extends CrudService {
- constructor(ctx) {
- super(ctx, 'config');
- this.model = this.ctx.model.Config;
- }
- async getOne({ type }) {
- return await this.model.findOne({ type });
- }
- }
- module.exports = ConfigService;
|