You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
vue-shop-admin-work/models/PermissionAPIModel.js

24 lines
863 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

// 导出一个函数这个函数接受数据库对象db和一个回调函数callback作为参数
module.exports = function(db, callback) {
// 用户模型
// 使用db.define方法定义一个模型模型名为PermissionAPIModel
db.define("PermissionAPIModel", {
// 定义模型的属性
id: {type: 'serial', key: true},
// 唯一标识ID自增主键
ps_id: Number,
// 权限ID类型为数字
ps_api_service: String,
// API服务名称类型为字符串
ps_api_action: String,
// API动作名称类型为字符串
ps_api_order: Number
// API顺序类型为数字
}, {
// 定义模型的选项
table: "sp_permission_api"
// 指定模型对应的数据库表名为sp_permission_api
});
// 调用回调函数,传入无参数
return callback();
}