mirror of
https://github.com/KeygraphHQ/juice-shop.git
synced 2026-11-08 17:19:57 -10:00
40 lines
742 B
TypeScript
40 lines
742 B
TypeScript
/*
|
|
* Copyright (c) 2014-2025 Bjoern Kimminich & the OWASP Juice Shop contributors.
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
|
|
import {
|
|
Model,
|
|
type InferAttributes,
|
|
type InferCreationAttributes,
|
|
DataTypes,
|
|
type Sequelize
|
|
} from 'sequelize'
|
|
|
|
class Captcha extends Model<
|
|
InferAttributes<Captcha>,
|
|
InferCreationAttributes<Captcha>
|
|
> {
|
|
declare captchaId: number
|
|
declare captcha: string
|
|
declare answer: string
|
|
}
|
|
|
|
const CaptchaModelInit = (sequelize: Sequelize) => {
|
|
Captcha.init(
|
|
{
|
|
captchaId: {
|
|
type: DataTypes.INTEGER
|
|
},
|
|
captcha: DataTypes.STRING,
|
|
answer: DataTypes.STRING
|
|
},
|
|
{
|
|
tableName: 'Captchas',
|
|
sequelize
|
|
}
|
|
)
|
|
}
|
|
|
|
export { Captcha as CaptchaModel, CaptchaModelInit }
|