| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 | 
							- /**
 
-  * 后台管理权限数据模型
 
-  *
 
-  * @author EllisRan
 
-  * @date 2018/12/06
 
-  * @version
 
-  */
 
- import mongoose from "mongoose";
 
- let Schema = mongoose.Schema;
 
- let collectionName = 'permission';
 
- let modelSchema = {
 
-     // ID
 
-     ID: {
 
-         type: Number,
 
-         default: 0
 
-     },
 
-     // 权限名称
 
-     name: {
 
-         type: String,
 
-         index: true
 
-     },
 
-     // 控制器名称
 
-     controller: String,
 
-     // 针对工具里一个页面多个控制器的问题(特殊优化)
 
-     otherController: String,
 
-     // 方法名称
 
-     action: String,
 
-     // 路径
 
-     url: String,
 
-     // 图标类名
 
-     iconClass: String,
 
-     // 父级id(初始默认0为父级)
 
-     pid: {
 
-         type: Number,
 
-         default: 0
 
-     },
 
-     // 是否属于菜单列表里的
 
-     isMenu: {
 
-         type: Boolean,
 
-         default: true
 
-     },
 
-     // 创建时间
 
-     create_time: {
 
-         type: Number,
 
-         default: 0
 
-     },
 
- };
 
- mongoose.model(collectionName, new Schema(modelSchema, {versionKey: false, collection: collectionName}));
 
 
  |