You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
62 lines
1.3 KiB
JavaScript
62 lines
1.3 KiB
JavaScript
7 months ago
|
const Sequelize = require('sequelize');
|
||
|
module.exports = function(sequelize, DataTypes) {
|
||
|
return sequelize.define('agent_sessions', {
|
||
|
sn: {
|
||
|
autoIncrement: true,
|
||
|
type: DataTypes.BIGINT,
|
||
|
allowNull: false,
|
||
|
primaryKey: true
|
||
|
},
|
||
|
agent_session_id: {
|
||
|
type: DataTypes.STRING(100),
|
||
|
allowNull: true
|
||
|
},
|
||
|
contact: {
|
||
|
type: DataTypes.STRING(100),
|
||
|
allowNull: true,
|
||
|
comment: "联系人"
|
||
|
},
|
||
|
hosted: {
|
||
|
type: DataTypes.STRING(100),
|
||
|
allowNull: true,
|
||
|
comment: "托管的号码"
|
||
|
},
|
||
|
agent_id: {
|
||
|
type: DataTypes.STRING(100),
|
||
|
allowNull: true
|
||
|
},
|
||
|
agent_name: {
|
||
|
type: DataTypes.STRING(100),
|
||
|
allowNull: true
|
||
|
},
|
||
|
model_id: {
|
||
|
type: DataTypes.STRING(100),
|
||
|
allowNull: true
|
||
|
},
|
||
|
createtime: {
|
||
|
type: DataTypes.DATE,
|
||
|
allowNull: true,
|
||
|
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP')
|
||
|
},
|
||
|
updatetime: {
|
||
|
type: DataTypes.DATE,
|
||
|
allowNull: true,
|
||
|
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP')
|
||
|
}
|
||
|
}, {
|
||
|
sequelize,
|
||
|
tableName: 'agent_sessions',
|
||
|
timestamps: false,
|
||
|
indexes: [
|
||
|
{
|
||
|
name: "PRIMARY",
|
||
|
unique: true,
|
||
|
using: "BTREE",
|
||
|
fields: [
|
||
|
{ name: "sn" },
|
||
|
]
|
||
|
},
|
||
|
]
|
||
|
});
|
||
|
};
|