12345678910111213 |
- 'use strict';
- const Schema = require('mongoose').Schema;
- const SchemaDefine = {
- // 名称
- name: { type: String, required: true },
- // 编码
- code: { type: String, required: true },
- };
- const schema = new Schema(SchemaDefine);
- module.exports = app => {
- const { mongoose } = app;
- return mongoose.model('org', schema, 'org');
- };
|