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.
66 lines
1.5 KiB
66 lines
1.5 KiB
/* eslint-disable*/
|
|
'use strict'
|
|
|
|
module.exports = dc => {
|
|
const DataTypes = dc.ORM
|
|
const sequelize = dc.orm
|
|
const Network = sequelize.define(
|
|
'Network',
|
|
{
|
|
id: {
|
|
field: 'id',
|
|
type: DataTypes.INTEGER,
|
|
allowNull: false,
|
|
primaryKey: true,
|
|
autoIncrement: true,
|
|
unique: 'network_pk',
|
|
},
|
|
name: {
|
|
field: 'name',
|
|
type: DataTypes.STRING,
|
|
allowNull: false,
|
|
primaryKey: false,
|
|
autoIncrement: false,
|
|
},
|
|
type: {
|
|
field: 'type',
|
|
type: DataTypes.INTEGER,
|
|
allowNull: false,
|
|
primaryKey: false,
|
|
autoIncrement: false,
|
|
// timezone: false, // 设置为 false 表示不带时区信息的时间戳
|
|
},
|
|
account: {
|
|
field: 'account',
|
|
type: DataTypes.STRING,
|
|
allowNull: false,
|
|
primaryKey: false,
|
|
autoIncrement: false,
|
|
},
|
|
indate: {
|
|
field: 'indate',
|
|
type: DataTypes.DATE,
|
|
allowNull: false,
|
|
primaryKey: false,
|
|
autoIncrement: false,
|
|
timezone: false, // 设置为 false 表示不带时区信息的时间戳
|
|
},
|
|
projectId: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: false,
|
|
comment: null,
|
|
primaryKey: false,
|
|
field: 'project_id',
|
|
autoIncrement: false,
|
|
},
|
|
},
|
|
{
|
|
tableName: 'network',
|
|
comment: '',
|
|
indexes: [],
|
|
}
|
|
)
|
|
|
|
dc.models.Network = Network
|
|
return Network
|
|
}
|
|
|