feat: Phisherman integration
This commit is contained in:
parent
f92ee9ba4f
commit
13c94a81cc
18 changed files with 681 additions and 17 deletions
|
@ -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");
|
||||
}
|
||||
}
|
|
@ -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");
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue