lrf hace 2 años
padre
commit
82fae2d55c
Se han modificado 2 ficheros con 2 adiciones y 2 borrados
  1. 1 1
      src/entity/BaseModel.ts
  2. 1 1
      src/entity/meta.js

+ 1 - 1
src/entity/BaseModel.ts

@@ -1,5 +1,5 @@
 import { modelOptions, plugin, Severity } from '@typegoose/typegoose';
-import * as meta from './meta';
+import meta from './meta';
 @modelOptions({
   options: { allowMixed: Severity.ALLOW },
 })

+ 1 - 1
src/entity/meta.js

@@ -1,6 +1,6 @@
 'use strict';
 
-module.exports = exports = function metaPlugin(schema /* , options*/) {
+export default schema => {
   schema.add({
     meta: {
       state: { type: Number, default: 0 }, // 数据状态: 0-正常;1-标记删除