Skip to content

Commit 8b894d4

Browse files
committed
Add POST and GET /report
1 parent 88df07d commit 8b894d4

File tree

6 files changed

+193
-21
lines changed

6 files changed

+193
-21
lines changed

src/app.controller.ts

Lines changed: 38 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@ import {
22
BadRequestException,
33
Body,
44
Controller,
5+
FileTypeValidator,
6+
ForbiddenException,
57
Get,
68
Logger,
9+
MaxFileSizeValidator,
710
NotFoundException,
8-
ForbiddenException,
11+
ParseFilePipe,
912
Post,
1013
Query,
14+
Request,
1115
UploadedFile,
12-
UseInterceptors,
1316
UseGuards,
14-
Request,
15-
ParseFilePipe,
16-
MaxFileSizeValidator,
17-
FileTypeValidator
17+
UseInterceptors
1818
} from '@nestjs/common';
1919
import {ApiBearerAuth, ApiTags} from '@nestjs/swagger';
20-
import { ConfigService } from '@nestjs/config';
20+
import {ConfigService} from '@nestjs/config';
2121
import {SkipThrottle} from "@nestjs/throttler";
2222
import {AddCommentDto, GetCommentsDto} from "./dto/comment.dto";
2323
import {AppService} from "./app.service";
@@ -26,7 +26,7 @@ import {GetCandlesDto, GetTradesDto} from "./dto/trade.dto";
2626
import {UserService} from "./user/user.service";
2727
import {FileInterceptor} from "@nestjs/platform-express";
2828
import {GcloudService} from "./gcloud/gcloud.service";
29-
import { v4 as uuidv4 } from 'uuid';
29+
import {v4 as uuidv4} from 'uuid';
3030
import {AddTokenMetadataDto} from "./dto/metadata.dto";
3131
import {AuthGuard} from "./common/auth.guard";
3232
import {plainToInstance} from "class-transformer";
@@ -35,6 +35,7 @@ import {GetWinnerLiquidityProvisionsDto} from "./dto/winner.liquidity.dto";
3535
import {CacheTTL} from "@nestjs/common/cache";
3636
import {IndexerService} from "./indexer/indexer.service";
3737
import {GetCompetitionsDto} from "./dto/competition.dto";
38+
import {AddReportDto, GetReportsDto} from "./dto/report.dto";
3839

3940
@SkipThrottle()
4041
@ApiTags('app')
@@ -191,4 +192,33 @@ export class AppController {
191192
this.logger.log(`Metadata uploaded, userAddress=${address} url=${metadataUrl}, content: ${JSON.stringify(dto)}`)
192193
return metadataUrl
193194
}
195+
196+
@Post('/report')
197+
async addReport(@Body() dto: AddReportDto) {
198+
if(!dto.tokenAddress && !dto.userAddress) {
199+
throw new BadRequestException('No token or user address provided')
200+
}
201+
202+
if(!dto.type) {
203+
throw new BadRequestException('No type provided')
204+
}
205+
206+
const existedReports = await this.appService.getReports({
207+
type: dto.type,
208+
userAddress: dto.userAddress,
209+
tokenAddress: dto.tokenAddress,
210+
reporterUserAddress: dto.reporterUserAddress,
211+
})
212+
if(existedReports.length > 0) {
213+
throw new BadRequestException('Report already exists')
214+
}
215+
216+
return await this.appService.addReport(dto)
217+
}
218+
219+
@CacheTTL(200)
220+
@Get('/reports')
221+
async getReports(@Query() dto: GetReportsDto) {
222+
return await this.appService.getReports(dto)
223+
}
194224
}

src/app.service.ts

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {DataSource, EntityManager, LessThan, MoreThan} from "typeorm";
33
import {
44
Comment,
55
CompetitionEntity,
6-
LiquidityProvision,
6+
LiquidityProvision, ReportEntity,
77
Token,
88
TokenBalance,
99
TokenBurn,
@@ -17,6 +17,7 @@ import {UserService} from "./user/user.service";
1717
import {Candle, CandleIntervalPgAlias} from "./types";
1818
import {GetWinnerLiquidityProvisionsDto} from "./dto/winner.liquidity.dto";
1919
import {GetCompetitionsDto} from "./dto/competition.dto";
20+
import {AddReportDto, GetReportsDto} from "./dto/report.dto";
2021

2122
@Injectable()
2223
export class AppService {
@@ -292,4 +293,29 @@ export class AppService {
292293
user,
293294
})
294295
}
296+
297+
async addReport(dto: AddReportDto): Promise<ReportEntity> {
298+
const report = this.dataSource.manager.create(ReportEntity, {
299+
...dto,
300+
})
301+
await this.dataSource.manager.insert(ReportEntity, report)
302+
return report
303+
}
304+
305+
async getReports(dto: GetReportsDto){
306+
const { offset = 0, limit = 100 } = dto
307+
308+
return await this.dataSource.manager.find(ReportEntity, {
309+
where: {
310+
userAddress: dto.userAddress,
311+
tokenAddress: dto.tokenAddress,
312+
reporterUserAddress: dto.reporterUserAddress
313+
},
314+
take: limit,
315+
skip: offset,
316+
order: {
317+
createdAt: 'desc'
318+
}
319+
})
320+
}
295321
}

src/dto/report.dto.ts

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
import { ApiProperty } from '@nestjs/swagger';
2+
import {IsNumber, IsOptional, IsString, Max} from 'class-validator';
3+
import {Transform, Type} from "class-transformer";
4+
5+
export class AddReportDto {
6+
@ApiProperty({ type: Number, required: true })
7+
@Type(() => Number)
8+
@IsNumber()
9+
type: number;
10+
11+
@ApiProperty({ type: String, required: false })
12+
@Transform((address) => address.value.trim().toLowerCase())
13+
@Type(() => String)
14+
@IsString()
15+
@IsOptional()
16+
tokenAddress?: string;
17+
18+
@ApiProperty({ type: String, required: false })
19+
@Transform((address) => address.value.trim().toLowerCase())
20+
@Type(() => String)
21+
@IsString()
22+
@IsOptional()
23+
userAddress?: string;
24+
25+
@ApiProperty({ type: String, required: false })
26+
@Transform((address) => address.value.trim().toLowerCase())
27+
@Type(() => String)
28+
@IsString()
29+
@IsOptional()
30+
reporterUserAddress?: string;
31+
}
32+
33+
export class GetReportsDto {
34+
@ApiProperty({ type: Number, required: false })
35+
@Type(() => Number)
36+
@IsNumber()
37+
@IsOptional()
38+
type?: number;
39+
40+
@ApiProperty({ type: String, required: false })
41+
@Transform((address) => address.value.trim().toLowerCase())
42+
@Type(() => String)
43+
@IsString()
44+
@IsOptional()
45+
tokenAddress?: string;
46+
47+
@ApiProperty({ type: String, required: false })
48+
@Transform((address) => address.value.trim().toLowerCase())
49+
@Type(() => String)
50+
@IsString()
51+
@IsOptional()
52+
userAddress?: string;
53+
54+
@ApiProperty({ type: String, required: false })
55+
@Transform((address) => address.value.trim().toLowerCase())
56+
@Type(() => String)
57+
@IsString()
58+
@IsOptional()
59+
reporterUserAddress?: string;
60+
61+
@ApiProperty({ type: Number, required: false, default: 100 })
62+
@Type(() => Number)
63+
@IsNumber()
64+
@Max(1000)
65+
@IsOptional()
66+
limit?: number;
67+
68+
@ApiProperty({ type: Number, required: false, default: 0 })
69+
@Type(() => Number)
70+
@IsNumber()
71+
@IsOptional()
72+
offset?: number;
73+
}

src/entities/index.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { SignInRequestEntity } from './signin.entity';
88
import { TokenBurn } from './token.burn.entity';
99
import { LiquidityProvision } from './liquidity.provision.entity';
1010
import { CompetitionEntity } from './competition.entity';
11+
import { ReportEntity } from './report.entity';
1112

1213
const entities = [
1314
UserAccount,
@@ -19,7 +20,8 @@ const entities = [
1920
SignInRequestEntity,
2021
TokenBurn,
2122
LiquidityProvision,
22-
CompetitionEntity
23+
CompetitionEntity,
24+
ReportEntity
2325
];
2426

2527
export {
@@ -32,6 +34,7 @@ export {
3234
SignInRequestEntity,
3335
TokenBurn,
3436
LiquidityProvision,
35-
CompetitionEntity
37+
CompetitionEntity,
38+
ReportEntity
3639
};
3740
export default entities;

src/entities/report.entity.ts

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import {
2+
Column,
3+
CreateDateColumn,
4+
Entity,
5+
PrimaryGeneratedColumn,
6+
} from 'typeorm';
7+
import { ApiProperty } from '@nestjs/swagger';
8+
9+
@Entity({ name: 'reports' })
10+
export class ReportEntity {
11+
@ApiProperty()
12+
@PrimaryGeneratedColumn('uuid')
13+
id: string;
14+
15+
@ApiProperty({ required: true })
16+
@Column({ type: 'smallint' })
17+
type: number;
18+
19+
@ApiProperty({ required: false })
20+
@Column({ nullable: true })
21+
tokenAddress: string;
22+
23+
@ApiProperty({ required: false })
24+
@Column({ nullable: true })
25+
userAddress: string;
26+
27+
@ApiProperty({ required: false })
28+
@Column({ nullable: true })
29+
reporterUserAddress: string;
30+
31+
@ApiProperty()
32+
@Column({ nullable: true })
33+
details: string;
34+
35+
@ApiProperty()
36+
@CreateDateColumn({ name: 'createdAt' })
37+
createdAt: Date;
38+
}

src/migrations/1737899459910-Initial.ts renamed to src/migrations/1738138590774-Initial.ts

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { MigrationInterface, QueryRunner } from "typeorm";
22

3-
export class Initial1737899459910 implements MigrationInterface {
4-
name = 'Initial1737899459910'
3+
export class Initial1738138590774 implements MigrationInterface {
4+
name = 'Initial1738138590774'
55

66
public async up(queryRunner: QueryRunner): Promise<void> {
77
await queryRunner.query(`CREATE TABLE "comments" ("id" SERIAL NOT NULL, "text" character varying NOT NULL, "createdAt" TIMESTAMP NOT NULL DEFAULT now(), "userId" uuid, "tokenId" uuid, CONSTRAINT "PK_8bf68bc960f2b69e818bdb90dcb" PRIMARY KEY ("id"))`);
@@ -10,47 +10,49 @@ export class Initial1737899459910 implements MigrationInterface {
1010
await queryRunner.query(`CREATE TABLE "competitions" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "txnHash" character varying NOT NULL, "blockNumber" integer NOT NULL, "competitionId" integer NOT NULL, "timestampStart" bigint NOT NULL, "timestampEnd" bigint, "isCompleted" boolean NOT NULL DEFAULT false, "createdAt" TIMESTAMP NOT NULL DEFAULT now(), "winnerTokenId" uuid, CONSTRAINT "REL_1cabb773c3ab1758cde24755fa" UNIQUE ("winnerTokenId"), CONSTRAINT "PK_ef273910798c3a542b475e75c7d" PRIMARY KEY ("id"))`);
1111
await queryRunner.query(`CREATE TABLE "tokens" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "txnHash" character varying NOT NULL, "blockNumber" integer NOT NULL, "address" character varying NOT NULL, "name" character varying NOT NULL, "symbol" character varying NOT NULL, "uri" character varying NOT NULL, "uriData" json, "timestamp" bigint NOT NULL, "totalSupply" numeric NOT NULL DEFAULT '0', "price" double precision NOT NULL DEFAULT '0', "marketCap" double precision NOT NULL DEFAULT '0', "isWinner" boolean NOT NULL DEFAULT false, "isEnabled" boolean NOT NULL DEFAULT true, "createdAt" TIMESTAMP NOT NULL DEFAULT now(), "updatedAt" TIMESTAMP NOT NULL DEFAULT now(), "competitionId" uuid, "userId" uuid, CONSTRAINT "UQ_60d4ed8a9af53cecc343b27ae52" UNIQUE ("txnHash"), CONSTRAINT "UQ_8887c0fb937bc0e9dc36cb62f35" UNIQUE ("address"), CONSTRAINT "PK_3001e89ada36263dabf1fb6210a" PRIMARY KEY ("id"))`);
1212
await queryRunner.query(`CREATE TABLE "users" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "address" character varying NOT NULL, "username" character varying NOT NULL, "isEnabled" boolean NOT NULL DEFAULT true, "createdAt" TIMESTAMP NOT NULL DEFAULT now(), "updatedAt" TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT "UQ_b0ec0293d53a1385955f9834d5c" UNIQUE ("address"), CONSTRAINT "UQ_fe0bb3f6520ee0469504521e710" UNIQUE ("username"), CONSTRAINT "PK_a3ffb1c0c8416b9fc6f907b7433" PRIMARY KEY ("id"))`);
13-
await queryRunner.query(`CREATE TABLE "token_burns" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "txnHash" character varying NOT NULL, "blockNumber" integer NOT NULL, "burnedAmount" numeric NOT NULL, "fee" numeric NOT NULL, "mintedAmount" numeric NOT NULL, "timestamp" bigint NOT NULL, "createdAt" TIMESTAMP NOT NULL DEFAULT now(), "senderId" uuid, "tokenId" uuid, "winnerTokenId" uuid, CONSTRAINT "UQ_55b31cf9e5c929505080921faea" UNIQUE ("txnHash"), CONSTRAINT "PK_f500ae7d0285eb8f2b687445791" PRIMARY KEY ("id"))`);
1413
await queryRunner.query(`CREATE TABLE "token_balances" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "balance" numeric NOT NULL DEFAULT '0', "updateAt" TIMESTAMP NOT NULL DEFAULT now(), "createdAt" TIMESTAMP NOT NULL DEFAULT now(), "userId" uuid, "tokenId" uuid, CONSTRAINT "PK_e12dc361a93cf25efa25d0a4cdc" PRIMARY KEY ("id"))`);
14+
await queryRunner.query(`CREATE TABLE "token_burns" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "txnHash" character varying NOT NULL, "blockNumber" integer NOT NULL, "burnedAmount" numeric NOT NULL, "fee" numeric NOT NULL, "mintedAmount" numeric NOT NULL, "timestamp" bigint NOT NULL, "createdAt" TIMESTAMP NOT NULL DEFAULT now(), "senderId" uuid, "tokenId" uuid, "winnerTokenId" uuid, CONSTRAINT "UQ_55b31cf9e5c929505080921faea" UNIQUE ("txnHash"), CONSTRAINT "PK_f500ae7d0285eb8f2b687445791" PRIMARY KEY ("id"))`);
1515
await queryRunner.query(`CREATE TABLE "indexer_state" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "blockNumber" integer NOT NULL, CONSTRAINT "PK_186a04c706e20d425992635168a" PRIMARY KEY ("id"))`);
16-
await queryRunner.query(`CREATE TABLE "signin_requests" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "address" character varying NOT NULL, "nonce" integer NOT NULL, "createdAt" TIMESTAMP NOT NULL DEFAULT now(), "updatedAt" TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT "UQ_626ec9008e03c717f7893754c14" UNIQUE ("address"), CONSTRAINT "PK_9e7302d6c7bbe2be62cc3bba8c1" PRIMARY KEY ("id"))`);
1716
await queryRunner.query(`CREATE TABLE "liquidity_provisions" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "txnHash" character varying NOT NULL, "blockNumber" integer NOT NULL, "pool" character varying NOT NULL, "sender" character varying NOT NULL, "tokenId" uuid NOT NULL, "liquidity" numeric NOT NULL, "actualTokenAmount" numeric NOT NULL, "actualAssetAmount" numeric NOT NULL, "timestamp" bigint NOT NULL, "createdAt" TIMESTAMP NOT NULL DEFAULT now(), "tokenCreatorId" uuid, CONSTRAINT "PK_76db53f9e158c75e076280ca51e" PRIMARY KEY ("id"))`);
17+
await queryRunner.query(`CREATE TABLE "reports" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "type" smallint NOT NULL, "tokenAddress" character varying, "userAddress" character varying, "reporterUserAddress" character varying, "details" character varying, "createdAt" TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT "PK_d9013193989303580053c0b5ef6" PRIMARY KEY ("id"))`);
18+
await queryRunner.query(`CREATE TABLE "signin_requests" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "address" character varying NOT NULL, "nonce" integer NOT NULL, "createdAt" TIMESTAMP NOT NULL DEFAULT now(), "updatedAt" TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT "UQ_626ec9008e03c717f7893754c14" UNIQUE ("address"), CONSTRAINT "PK_9e7302d6c7bbe2be62cc3bba8c1" PRIMARY KEY ("id"))`);
1819
await queryRunner.query(`ALTER TABLE "comments" ADD CONSTRAINT "FK_7e8d7c49f218ebb14314fdb3749" FOREIGN KEY ("userId") REFERENCES "users"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
1920
await queryRunner.query(`ALTER TABLE "comments" ADD CONSTRAINT "FK_a1a9159cff0915f608ecd694fa5" FOREIGN KEY ("tokenId") REFERENCES "tokens"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
2021
await queryRunner.query(`ALTER TABLE "trades" ADD CONSTRAINT "FK_b09eef25e1f2cc0ca543e80fbe6" FOREIGN KEY ("userId") REFERENCES "users"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
2122
await queryRunner.query(`ALTER TABLE "trades" ADD CONSTRAINT "FK_65e5e3d2a8d1700f7f893855bd6" FOREIGN KEY ("tokenId") REFERENCES "tokens"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
2223
await queryRunner.query(`ALTER TABLE "competitions" ADD CONSTRAINT "FK_1cabb773c3ab1758cde24755fa2" FOREIGN KEY ("winnerTokenId") REFERENCES "tokens"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
2324
await queryRunner.query(`ALTER TABLE "tokens" ADD CONSTRAINT "FK_27d5e8fdc5b3b397885dd9eb57d" FOREIGN KEY ("competitionId") REFERENCES "competitions"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
2425
await queryRunner.query(`ALTER TABLE "tokens" ADD CONSTRAINT "FK_d417e5d35f2434afc4bd48cb4d2" FOREIGN KEY ("userId") REFERENCES "users"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
26+
await queryRunner.query(`ALTER TABLE "token_balances" ADD CONSTRAINT "FK_a9f4195c452704e9fe3064197aa" FOREIGN KEY ("userId") REFERENCES "users"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
27+
await queryRunner.query(`ALTER TABLE "token_balances" ADD CONSTRAINT "FK_d46c04b920313214b5b405d84b3" FOREIGN KEY ("tokenId") REFERENCES "tokens"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
2528
await queryRunner.query(`ALTER TABLE "token_burns" ADD CONSTRAINT "FK_a3d57eb40befb6d4198b66c7d86" FOREIGN KEY ("senderId") REFERENCES "users"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
2629
await queryRunner.query(`ALTER TABLE "token_burns" ADD CONSTRAINT "FK_9d17a9475853ae38ae220871cbf" FOREIGN KEY ("tokenId") REFERENCES "tokens"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
2730
await queryRunner.query(`ALTER TABLE "token_burns" ADD CONSTRAINT "FK_7a473a60ecad51ea32e3031270a" FOREIGN KEY ("winnerTokenId") REFERENCES "tokens"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
28-
await queryRunner.query(`ALTER TABLE "token_balances" ADD CONSTRAINT "FK_a9f4195c452704e9fe3064197aa" FOREIGN KEY ("userId") REFERENCES "users"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
29-
await queryRunner.query(`ALTER TABLE "token_balances" ADD CONSTRAINT "FK_d46c04b920313214b5b405d84b3" FOREIGN KEY ("tokenId") REFERENCES "tokens"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
3031
await queryRunner.query(`ALTER TABLE "liquidity_provisions" ADD CONSTRAINT "FK_6151e0c4e7b5ea4d020a9ac1915" FOREIGN KEY ("tokenId") REFERENCES "tokens"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
3132
await queryRunner.query(`ALTER TABLE "liquidity_provisions" ADD CONSTRAINT "FK_b418e0f4cd84fb881aef5b178df" FOREIGN KEY ("tokenCreatorId") REFERENCES "users"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
3233
}
3334

3435
public async down(queryRunner: QueryRunner): Promise<void> {
3536
await queryRunner.query(`ALTER TABLE "liquidity_provisions" DROP CONSTRAINT "FK_b418e0f4cd84fb881aef5b178df"`);
3637
await queryRunner.query(`ALTER TABLE "liquidity_provisions" DROP CONSTRAINT "FK_6151e0c4e7b5ea4d020a9ac1915"`);
37-
await queryRunner.query(`ALTER TABLE "token_balances" DROP CONSTRAINT "FK_d46c04b920313214b5b405d84b3"`);
38-
await queryRunner.query(`ALTER TABLE "token_balances" DROP CONSTRAINT "FK_a9f4195c452704e9fe3064197aa"`);
3938
await queryRunner.query(`ALTER TABLE "token_burns" DROP CONSTRAINT "FK_7a473a60ecad51ea32e3031270a"`);
4039
await queryRunner.query(`ALTER TABLE "token_burns" DROP CONSTRAINT "FK_9d17a9475853ae38ae220871cbf"`);
4140
await queryRunner.query(`ALTER TABLE "token_burns" DROP CONSTRAINT "FK_a3d57eb40befb6d4198b66c7d86"`);
41+
await queryRunner.query(`ALTER TABLE "token_balances" DROP CONSTRAINT "FK_d46c04b920313214b5b405d84b3"`);
42+
await queryRunner.query(`ALTER TABLE "token_balances" DROP CONSTRAINT "FK_a9f4195c452704e9fe3064197aa"`);
4243
await queryRunner.query(`ALTER TABLE "tokens" DROP CONSTRAINT "FK_d417e5d35f2434afc4bd48cb4d2"`);
4344
await queryRunner.query(`ALTER TABLE "tokens" DROP CONSTRAINT "FK_27d5e8fdc5b3b397885dd9eb57d"`);
4445
await queryRunner.query(`ALTER TABLE "competitions" DROP CONSTRAINT "FK_1cabb773c3ab1758cde24755fa2"`);
4546
await queryRunner.query(`ALTER TABLE "trades" DROP CONSTRAINT "FK_65e5e3d2a8d1700f7f893855bd6"`);
4647
await queryRunner.query(`ALTER TABLE "trades" DROP CONSTRAINT "FK_b09eef25e1f2cc0ca543e80fbe6"`);
4748
await queryRunner.query(`ALTER TABLE "comments" DROP CONSTRAINT "FK_a1a9159cff0915f608ecd694fa5"`);
4849
await queryRunner.query(`ALTER TABLE "comments" DROP CONSTRAINT "FK_7e8d7c49f218ebb14314fdb3749"`);
49-
await queryRunner.query(`DROP TABLE "liquidity_provisions"`);
5050
await queryRunner.query(`DROP TABLE "signin_requests"`);
51+
await queryRunner.query(`DROP TABLE "reports"`);
52+
await queryRunner.query(`DROP TABLE "liquidity_provisions"`);
5153
await queryRunner.query(`DROP TABLE "indexer_state"`);
52-
await queryRunner.query(`DROP TABLE "token_balances"`);
5354
await queryRunner.query(`DROP TABLE "token_burns"`);
55+
await queryRunner.query(`DROP TABLE "token_balances"`);
5456
await queryRunner.query(`DROP TABLE "users"`);
5557
await queryRunner.query(`DROP TABLE "tokens"`);
5658
await queryRunner.query(`DROP TABLE "competitions"`);

0 commit comments

Comments
 (0)