mirror of
https://github.com/Kevsl/crypto-exchange-api.git
synced 2025-07-09 06:00:12 +02:00
removed id_offer on trade
This commit is contained in:
parent
2db99d1354
commit
67d33dce2e
11
prisma/migrations/20240607113031_/migration.sql
Normal file
11
prisma/migrations/20240607113031_/migration.sql
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
/*
|
||||||
|
Warnings:
|
||||||
|
|
||||||
|
- You are about to drop the column `id_offer` on the `Trade` table. All the data in the column will be lost.
|
||||||
|
|
||||||
|
*/
|
||||||
|
-- DropForeignKey
|
||||||
|
ALTER TABLE "Trade" DROP CONSTRAINT "Trade_id_offer_fkey";
|
||||||
|
|
||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE "Trade" DROP COLUMN "id_offer";
|
@ -33,7 +33,6 @@ model Offer {
|
|||||||
|
|
||||||
Crypto Crypto @relation(fields: [id_crypto], references: [id])
|
Crypto Crypto @relation(fields: [id_crypto], references: [id])
|
||||||
User User @relation(fields: [id_user], references: [id])
|
User User @relation(fields: [id_user], references: [id])
|
||||||
Trade Trade[]
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -61,11 +60,9 @@ model Trade {
|
|||||||
id_receiver String
|
id_receiver String
|
||||||
id_crypto String
|
id_crypto String
|
||||||
amount_traded Float
|
amount_traded Float
|
||||||
id_offer String
|
|
||||||
created_at DateTime @default(now())
|
created_at DateTime @default(now())
|
||||||
updated_at DateTime @updatedAt @default(now())
|
updated_at DateTime @updatedAt @default(now())
|
||||||
|
|
||||||
Offer Offer @relation(fields: [id_offer], references: [id])
|
|
||||||
Giver User @relation("Giver", fields: [id_giver], references: [id])
|
Giver User @relation("Giver", fields: [id_giver], references: [id])
|
||||||
Receiver User @relation("Receiver", fields: [id_receiver], references: [id])
|
Receiver User @relation("Receiver", fields: [id_receiver], references: [id])
|
||||||
Crypto Crypto @relation(fields: [id_crypto], references: [id])
|
Crypto Crypto @relation(fields: [id_crypto], references: [id])
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
import { IsInt, IsString } from 'class-validator';
|
|
||||||
|
|
||||||
export class PromoCodeDto {
|
|
||||||
@IsString()
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@IsInt()
|
|
||||||
value: number;
|
|
||||||
}
|
|
@ -76,7 +76,6 @@ export class TradeService {
|
|||||||
id_receiver: userId,
|
id_receiver: userId,
|
||||||
id_crypto: offer.id_crypto,
|
id_crypto: offer.id_crypto,
|
||||||
amount_traded: offer.amount,
|
amount_traded: offer.amount,
|
||||||
id_offer: offer.id,
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user