Reward
This commit is contained in:
@@ -1,12 +1,39 @@
|
||||
export interface RewardCatalogType {
|
||||
id: string
|
||||
export interface Reward {
|
||||
id: string // uuid
|
||||
name: string
|
||||
description?: string
|
||||
pointCost: number
|
||||
reward_type: 'VOUCHER' | 'PHYSICAL' | 'DIGITAL'
|
||||
cost_points: number
|
||||
stock?: number
|
||||
isActive: boolean
|
||||
validUntil?: Date
|
||||
imageUrl?: string
|
||||
createdAt: Date
|
||||
updatedAt: Date
|
||||
max_per_customer: number
|
||||
tnc?: TermsAndConditions
|
||||
metadata?: Record<string, any>
|
||||
images?: string[]
|
||||
created_at: string // ISO date-time
|
||||
updated_at: string // ISO date-time
|
||||
}
|
||||
|
||||
export interface Rewards {
|
||||
rewards: Reward[]
|
||||
total: number
|
||||
page: number
|
||||
limit: number
|
||||
}
|
||||
|
||||
export interface TermsAndConditions {
|
||||
sections: TncSection[]
|
||||
expiry_days: number
|
||||
}
|
||||
|
||||
export interface TncSection {
|
||||
title: string
|
||||
rules: string[]
|
||||
}
|
||||
|
||||
export interface RewardRequest {
|
||||
name: string // required, 1–150 chars
|
||||
reward_type: 'VOUCHER' | 'PHYSICAL' | 'DIGITAL' // enum
|
||||
cost_points: number // min 1
|
||||
stock?: number
|
||||
max_per_customer: number // min 1
|
||||
tnc?: TermsAndConditions
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user