mirror of
https://github.com/KeygraphHQ/juice-shop.git
synced 2026-11-09 02:39:42 -10:00
44 lines
900 B
TypeScript
44 lines
900 B
TypeScript
/*
|
|
* Copyright (c) 2014-2025 Bjoern Kimminich & the OWASP Juice Shop contributors.
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
|
|
/* jslint node: true */
|
|
import {
|
|
Model,
|
|
type InferAttributes,
|
|
type InferCreationAttributes,
|
|
DataTypes,
|
|
type CreationOptional,
|
|
type Sequelize
|
|
} from 'sequelize'
|
|
|
|
class SecurityQuestion extends Model<
|
|
InferAttributes<SecurityQuestion>,
|
|
InferCreationAttributes<SecurityQuestion>
|
|
> {
|
|
declare id: CreationOptional<number>
|
|
declare question: string
|
|
}
|
|
|
|
const SecurityQuestionModelInit = (sequelize: Sequelize) => {
|
|
SecurityQuestion.init(
|
|
{
|
|
id: {
|
|
type: DataTypes.INTEGER,
|
|
primaryKey: true,
|
|
autoIncrement: true
|
|
},
|
|
question: {
|
|
type: DataTypes.STRING
|
|
}
|
|
},
|
|
{
|
|
tableName: 'SecurityQuestions',
|
|
sequelize
|
|
}
|
|
)
|
|
}
|
|
|
|
export { SecurityQuestion as SecurityQuestionModel, SecurityQuestionModelInit }
|