juice-shop
43 строки · 900.0 Байт
1/*
2* Copyright (c) 2014-2024 Bjoern Kimminich & the OWASP Juice Shop contributors.
3* SPDX-License-Identifier: MIT
4*/
5
6/* jslint node: true */
7import {8Model,9type InferAttributes,10type InferCreationAttributes,11DataTypes,12type CreationOptional,13type Sequelize14} from 'sequelize'15
16class SecurityQuestion extends Model<17InferAttributes<SecurityQuestion>,18InferCreationAttributes<SecurityQuestion>19> {20declare id: CreationOptional<number>21declare question: string22}
23
24const SecurityQuestionModelInit = (sequelize: Sequelize) => {25SecurityQuestion.init(26{27id: {28type: DataTypes.INTEGER,29primaryKey: true,30autoIncrement: true31},32question: {33type: DataTypes.STRING34}35},36{37tableName: 'SecurityQuestions',38sequelize
39}40)41}
42
43export { SecurityQuestion as SecurityQuestionModel, SecurityQuestionModelInit }44