政务数据资源中心(Government data Resource center) 03专项3期主要建设内容
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.

89 lines
2.2 KiB

/* eslint-disable*/
'use strict';
module.exports = dc => {
const DataTypes = dc.ORM;
const sequelize = dc.orm;
const RestfulApi = sequelize.define("restfulApi", {
id: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: "唯一标识",
primaryKey: true,
field: "id",
autoIncrement: true,
unique: "t_restful_api_id_uindex"
},
name: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: null,
comment: "接口名称",
primaryKey: false,
field: "name",
autoIncrement: false
},
url: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: null,
comment: "接口路由",
primaryKey: false,
field: "url",
autoIncrement: false
},
method: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: null,
comment: "请求方法",
primaryKey: false,
field: "method",
autoIncrement: false
},
table: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "数据库表名称",
primaryKey: false,
field: "table",
autoIncrement: false
},
conditions: {
type: DataTypes.TEXT,
allowNull: true,
defaultValue: null,
comment: "数据库表查询条件",
primaryKey: false,
field: "conditions",
autoIncrement: false
},
enabled: {
type: DataTypes.BOOLEAN,
allowNull: true,
defaultValue: null,
comment: "是否已启用",
primaryKey: false,
field: "enabled",
autoIncrement: false
},
fields: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: null,
comment: '数据库表字段',
primaryKey: false,
field: "fields",
autoIncrement: false
}
}, {
tableName: "t_restful_api",
comment: "",
indexes: []
});
dc.models.RestfulApi = RestfulApi;
return RestfulApi;
};