From f3fd897a3ff8438f00c7e333adaa0d506d05dfe8 Mon Sep 17 00:00:00 2001 From: Mathis Date: Wed, 12 Jun 2024 14:50:28 +0200 Subject: [PATCH] feat(interfaces): Add crypto interface This commit adds the crypto interface file to the src/interfaces directory. The file includes the IUserWalletCryptos, ICryptoInWalletInfo, IAllTrades, ITrade, ISellerIdentity, IBuyerIdentity, and ITradedCrypto interfaces, defining the structure and data types for the user wallet cryptos, all trades, and traded crypto. --- src/interfaces/crypto.interface.ts | 45 ++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 src/interfaces/crypto.interface.ts diff --git a/src/interfaces/crypto.interface.ts b/src/interfaces/crypto.interface.ts new file mode 100644 index 0000000..c5327a7 --- /dev/null +++ b/src/interfaces/crypto.interface.ts @@ -0,0 +1,45 @@ +export interface IUserWalletCryptos { + Crypto?: ICryptoInWalletInfo; +} + +export interface ICryptoInWalletInfo { + id: string; + name: string; + value: number; + image: string; + quantity: number; + created_at: string; + updated_at: string; +} + +export type IAllTrades = ITrade[]; + +export interface ITrade { + Giver: ISellerIdentity; + Receiver: IBuyerIdentity; + Crypto: ITradedCrypto; +} + +export interface ISellerIdentity { + firstName: string; + lastName: string; + pseudo: string; + dollarAvailables: number; +} + +export interface IBuyerIdentity { + firstName: string; + lastName: string; + pseudo: string; + dollarAvailables: number; +} + +export interface ITradedCrypto { + id: string; + name: string; + value: number; + image: string; + quantity: number; + created_at: string; + updated_at: string; +}