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.
46 lines
773 B
TypeScript
46 lines
773 B
TypeScript
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;
|
|
}
|