summaryrefslogtreecommitdiff
path: root/src-migrate/types/promotion.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src-migrate/types/promotion.ts')
-rw-r--r--src-migrate/types/promotion.ts44
1 files changed, 44 insertions, 0 deletions
diff --git a/src-migrate/types/promotion.ts b/src-migrate/types/promotion.ts
new file mode 100644
index 00000000..85190aad
--- /dev/null
+++ b/src-migrate/types/promotion.ts
@@ -0,0 +1,44 @@
+export interface IPromotion {
+ id: number;
+ program_id: number;
+ name: string;
+ type: {
+ value: CategoryPromo;
+ label: string;
+ };
+ limit: number;
+ limit_user: number;
+ limit_trx: number;
+ price: number;
+ total_qty: number;
+ products: {
+ product_id: number;
+ qty: number;
+ }[];
+ free_products: {
+ product_id: number;
+ qty: number;
+ }[];
+}
+
+export interface IProductVariantPromo {
+ id: number;
+ parent_id: number;
+ display_name: string;
+ image: string;
+ name: string;
+ default_code: string;
+ price: {
+ price: number;
+ discount_percentage: number;
+ price_discount: number;
+ };
+ qty: number;
+}
+
+export type CategoryPromo = 'bundling' | 'discount_loading' | 'merchandise';
+
+export interface ICategoryPromo {
+ value: CategoryPromo;
+ label: string;
+}