12345678910111213141516171819202122232425262728 |
- 'use strict';
- module.exports = app => {
- const { mongoose } = app;
- const { Schema } = mongoose;
- const RoleSchema = new Schema({
- // 角色名
- name: {
- type: String,
- },
- // 角色编码
- code: {
- type: String,
- },
- // 角色id
- id: {
- type: String,
- },
- // 角色状态
- state: {
- type: String,
- },
- // 角色绑定系统菜单组
- adminMenuList: {
- type: Array,
- },
- });
- return mongoose.model('Role', RoleSchema);
- };
|