erp-platform/ui/src/proxy/order/models.ts
Sedat ÖZTÜRK 8cc8ed07f9 Düzenleme
2025-08-11 09:34:44 +03:00

69 lines
No EOL
1.3 KiB
TypeScript

import { CustomTenantDto } from "../config/models"
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
paymentMethod: string
installments?: number
installmentName?: string
paymentData: Record<string, unknown>
}