summaryrefslogtreecommitdiff
path: root/src-migrate/types/promotion.ts
blob: dce442ada7d31db243a61e876bed1a7a11beafc1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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;
  image: string;
  total_qty: number;
  products: {
    product_id: number;
    qty: number;
    name: string;
  }[];
  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;
  manufacture: {
    manufacture_name: string;
    manufacture_id:number;
  }
}

export type CategoryPromo = 'bundling' | 'discount_loading' | 'merchandise';

export interface ICategoryPromo {
  value: CategoryPromo;
  label: string;
}