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.
This commit is contained in:
Mathis H (Avnyr) 2024-06-12 14:50:28 +02:00
parent 3dfee64e8e
commit f3fd897a3f
Signed by: Mathis
GPG Key ID: DD9E0666A747D126

View File

@ -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;
}