Files
shop-api/src/modules/payment/models/Abstraction/IPayments.ts
T
morteza 8e5e20320d
Build and Deploy / build_and_deploy (push) Has been cancelled
payment on deleivery
2026-07-09 10:44:26 +03:30

44 lines
1.1 KiB
TypeScript

import { Types } from "mongoose";
import { PaymentStatus } from "../../../../common/enums/order.enum";
// Purchase schema interface
export interface ICartPayment {
_id: Types.ObjectId;
user_id: Types.ObjectId;
authority: string;
transaction_id: string | null;
payment_method: Types.ObjectId;
priceDetails: IPriceDetails;
totalPrice: number;
paymentStatus: PaymentStatus;
}
export interface IPriceDetails {
shipping_cost: number;
shipping_cost_on_delivery: number;
process_cost: number;
total_retail_price: number;
total_payable_price: number;
total_discount: number;
coupon_discount: number;
}
//===========> product request payment
export interface IPRPriceDetails {
insertion_price: number;
unboxing_price: number;
photography_price: number;
expertReviews_price: number;
}
export interface IProductRequestPayment {
_id: Types.ObjectId;
seller_id: Types.ObjectId;
authority: string;
transaction_id: string | null;
payment_method: Types.ObjectId;
priceDetails: IPRPriceDetails;
totalPrice: number;
paymentStatus: PaymentStatus;
}