erp-platform/ui/src/proxy/order/models.ts

69 lines
1.2 KiB
TypeScript
Raw Normal View History

import { CustomTenantDto } from '../config/models'
2025-08-11 06:34:44 +00:00
export type BillingCycle = 'monthly' | 'yearly'
export interface Product {
id: string
name: string
description: string
category: string
monthlyPrice?: number
yearlyPrice?: number
unit: BillingCycle
isQuantityBased: boolean
imageUrl?: string
features?: string[]
}
export interface ProductDto {
id: string
name: string
description: string
category: string
monthlyPrice?: number
yearlyPrice?: number
unit: string
isQuantityBased: boolean
imageUrl: string
features?: string[]
}
export interface BasketItem {
product: ProductDto
quantity: number
billingCycle: BillingCycle
totalPrice: number
}
export type OrderStatus = 'pending' | 'completed' | 'cancelled'
export interface PaymentMethod {
id: string
name: string
commission: number
logo?: string
}
export interface PaymentMethodDto {
id: string
name: string
commission: number
logo: string
}
export interface InstallmentOptionDto {
id: number
name: string
commission: number
}
export interface OrderDto {
tenant: CustomTenantDto
items: BasketItem[]
subtotal: number
commission: number
total: number
paymentMethodId: string
installment: number
2025-08-11 06:34:44 +00:00
paymentData: Record<string, unknown>
}