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.
52 lines
1018 B
52 lines
1018 B
import _sequelize from 'sequelize'; |
|
const { Model, Sequelize } = _sequelize; |
|
|
|
export default class userpositions extends Model { |
|
static init(sequelize, DataTypes) { |
|
super.init({ |
|
ID: { |
|
autoIncrement: true, |
|
type: DataTypes.INTEGER, |
|
allowNull: false, |
|
primaryKey: true |
|
}, |
|
UserID: { |
|
type: DataTypes.INTEGER, |
|
allowNull: false |
|
}, |
|
PositionID: { |
|
type: DataTypes.INTEGER, |
|
allowNull: true |
|
}, |
|
RoleID: { |
|
type: DataTypes.INTEGER, |
|
allowNull: false |
|
}, |
|
NetworkAccessID: { |
|
type: DataTypes.INTEGER, |
|
allowNull: true |
|
}, |
|
Status: { |
|
type: DataTypes.TINYINT.UNSIGNED, |
|
allowNull: true, |
|
defaultValue: 1 |
|
} |
|
}, { |
|
sequelize, |
|
tableName: 'userpositions', |
|
hasTrigger: true, |
|
timestamps: false, |
|
indexes: [ |
|
{ |
|
name: "PRIMARY", |
|
unique: true, |
|
using: "BTREE", |
|
fields: [ |
|
{ name: "ID" }, |
|
] |
|
}, |
|
] |
|
}); |
|
return userpositions; |
|
} |
|
}
|
|
|