diff options
author | 2021-08-17 05:07:38 +0530 | |
---|---|---|
committer | 2021-08-17 05:07:38 +0530 | |
commit | 0fbee32c27a6efdfe88534303922d189ddbba817 (patch) | |
tree | 2b9dddba64ff1519e293c64b3b42b4d9172ec4d3 /src/models/Order.ts | |
parent | Revert "chore: update outdated node_modules (#1807)" (diff) | |
download | ferdium-app-0fbee32c27a6efdfe88534303922d189ddbba817.tar.gz ferdium-app-0fbee32c27a6efdfe88534303922d189ddbba817.tar.zst ferdium-app-0fbee32c27a6efdfe88534303922d189ddbba817.zip |
Typescript conversion (#1805)
Diffstat (limited to 'src/models/Order.ts')
-rw-r--r-- | src/models/Order.ts | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/models/Order.ts b/src/models/Order.ts new file mode 100644 index 000000000..546b813a0 --- /dev/null +++ b/src/models/Order.ts | |||
@@ -0,0 +1,33 @@ | |||
1 | // TODO: Can this file be deleted? | ||
2 | |||
3 | interface IOrder { | ||
4 | id: string; | ||
5 | subscriptionId: string; | ||
6 | name: string; | ||
7 | invoiceUrl: string; | ||
8 | price: string; | ||
9 | date: string; | ||
10 | } | ||
11 | |||
12 | export default class Order { | ||
13 | id: string = ''; | ||
14 | |||
15 | subscriptionId: string = ''; | ||
16 | |||
17 | name: string = ''; | ||
18 | |||
19 | invoiceUrl: string = ''; | ||
20 | |||
21 | price: string = ''; | ||
22 | |||
23 | date: string = ''; | ||
24 | |||
25 | constructor(data: IOrder) { | ||
26 | this.id = data.id; | ||
27 | this.subscriptionId = data.subscriptionId; | ||
28 | this.name = data.name || this.name; | ||
29 | this.invoiceUrl = data.invoiceUrl || this.invoiceUrl; | ||
30 | this.price = data.price || this.price; | ||
31 | this.date = data.date || this.date; | ||
32 | } | ||
33 | } | ||