3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-10 12:25:02 +00:00

feat: Phisherman integration

This commit is contained in:
Dragory 2021-10-31 17:17:31 +02:00
parent f92ee9ba4f
commit 13c94a81cc
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
18 changed files with 681 additions and 17 deletions

View file

@ -0,0 +1,38 @@
import { MigrationInterface, QueryRunner, Table } from "typeorm";
export class CreatePhishermanCacheTable1634563901575 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.createTable(
new Table({
name: "phisherman_cache",
columns: [
{
name: "id",
type: "int",
isPrimary: true,
isGenerated: true,
generationStrategy: "increment",
},
{
name: "domain",
type: "varchar",
length: "255",
isUnique: true,
},
{
name: "data",
type: "text",
},
{
name: "expires_at",
type: "datetime",
},
],
}),
);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.dropTable("phisherman_cache");
}
}

View file

@ -0,0 +1,38 @@
import { MigrationInterface, QueryRunner, Table } from "typeorm";
export class CreatePhishermanKeyCacheTable1635596150234 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.createTable(
new Table({
name: "phisherman_key_cache",
columns: [
{
name: "id",
type: "int",
isPrimary: true,
isGenerated: true,
generationStrategy: "increment",
},
{
name: "hash",
type: "varchar",
length: "255",
isUnique: true,
},
{
name: "is_valid",
type: "tinyint",
},
{
name: "expires_at",
type: "datetime",
},
],
}),
);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.dropTable("phisherman_key_cache");
}
}