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:
parent
3dfee64e8e
commit
f3fd897a3f
45
src/interfaces/crypto.interface.ts
Normal file
45
src/interfaces/crypto.interface.ts
Normal 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;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user