43 lines
889 B
JavaScript
43 lines
889 B
JavaScript
const db = require("../../middleware/db");
|
|
const Sequelize = require("sequelize");
|
|
// 表单表
|
|
module.exports = sys_form = db.define("sys_form", {
|
|
// 表单名称
|
|
name: {
|
|
type: Sequelize.STRING(100),
|
|
allowNull: false,
|
|
defaultValue: "",
|
|
comment: "表单名称",
|
|
},
|
|
// 模型id
|
|
model_id: {
|
|
type: Sequelize.INTEGER(11).UNSIGNED,
|
|
allowNull: true,
|
|
defaultValue: 0,
|
|
comment: "模型id",
|
|
},
|
|
// 项目id
|
|
project_id: {
|
|
type: Sequelize.INTEGER(11).UNSIGNED,
|
|
allowNull: true,
|
|
defaultValue: 0,
|
|
comment: "项目id",
|
|
},
|
|
// 组件地址
|
|
component: {
|
|
type: Sequelize.STRING(100),
|
|
allowNull: true,
|
|
defaultValue: 0,
|
|
comment: "组件地址",
|
|
},
|
|
//api地址
|
|
api_path: {
|
|
type: Sequelize.STRING(100),
|
|
allowNull: true,
|
|
defaultValue: 0,
|
|
comment: "api地址",
|
|
},
|
|
});
|
|
|
|
// sys_form.sync({ force: true });
|