juice-shop

Форк
0
/
securityQuestion.ts 
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 */
7
import {
8
  Model,
9
  type InferAttributes,
10
  type InferCreationAttributes,
11
  DataTypes,
12
  type CreationOptional,
13
  type Sequelize
14
} from 'sequelize'
15

16
class SecurityQuestion extends Model<
17
InferAttributes<SecurityQuestion>,
18
InferCreationAttributes<SecurityQuestion>
19
> {
20
  declare id: CreationOptional<number>
21
  declare question: string
22
}
23

24
const SecurityQuestionModelInit = (sequelize: Sequelize) => {
25
  SecurityQuestion.init(
26
    {
27
      id: {
28
        type: DataTypes.INTEGER,
29
        primaryKey: true,
30
        autoIncrement: true
31
      },
32
      question: {
33
        type: DataTypes.STRING
34
      }
35
    },
36
    {
37
      tableName: 'SecurityQuestions',
38
      sequelize
39
    }
40
  )
41
}
42

43
export { SecurityQuestion as SecurityQuestionModel, SecurityQuestionModelInit }
44

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.