dooring-core-domain 1.0.6 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -8,7 +8,16 @@ export declare class CartItem {
|
|
|
8
8
|
private readonly item_count;
|
|
9
9
|
private readonly unit_price;
|
|
10
10
|
private readonly last_updated_at?;
|
|
11
|
-
constructor(
|
|
11
|
+
constructor(params: {
|
|
12
|
+
id?: string;
|
|
13
|
+
created_at?: Date;
|
|
14
|
+
cart_id: string;
|
|
15
|
+
item_detail: string;
|
|
16
|
+
detail_product_type: DetailProductType;
|
|
17
|
+
item_count: number;
|
|
18
|
+
unit_price: number;
|
|
19
|
+
last_updated_at?: Date;
|
|
20
|
+
});
|
|
12
21
|
getId(): string;
|
|
13
22
|
static fromDB(row: {
|
|
14
23
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CartItem.d.ts","sourceRoot":"","sources":["../../../src/models/BizClientCartAndOrder/CartItem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAElE,qBAAa,QAAQ;IACjB,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAS;IAC7B,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAO;IACnC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;IACrC,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAoB;IACxD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;IACpC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;IACpC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAO;
|
|
1
|
+
{"version":3,"file":"CartItem.d.ts","sourceRoot":"","sources":["../../../src/models/BizClientCartAndOrder/CartItem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,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EAAE,MAAM,CAAC;QACnB,UAAU,EAAE,MAAM,CAAC;QACnB,eAAe,CAAC,EAAE,IAAI,CAAC;KAC1B;CAYJ"}
|
|
@@ -2,21 +2,30 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CartItem = void 0;
|
|
4
4
|
class CartItem {
|
|
5
|
-
constructor(
|
|
6
|
-
this.id = id;
|
|
7
|
-
this.created_at = created_at;
|
|
8
|
-
this.cart_id = cart_id;
|
|
9
|
-
this.item_detail = item_detail;
|
|
10
|
-
this.detail_product_type = detail_product_type;
|
|
11
|
-
this.item_count = item_count;
|
|
12
|
-
this.unit_price = unit_price;
|
|
13
|
-
this.last_updated_at = last_updated_at;
|
|
5
|
+
constructor(params) {
|
|
6
|
+
this.id = params.id;
|
|
7
|
+
this.created_at = params.created_at;
|
|
8
|
+
this.cart_id = params.cart_id;
|
|
9
|
+
this.item_detail = params.item_detail;
|
|
10
|
+
this.detail_product_type = params.detail_product_type;
|
|
11
|
+
this.item_count = params.item_count;
|
|
12
|
+
this.unit_price = params.unit_price;
|
|
13
|
+
this.last_updated_at = params.last_updated_at;
|
|
14
14
|
}
|
|
15
15
|
getId() {
|
|
16
16
|
return this.id;
|
|
17
17
|
}
|
|
18
18
|
static fromDB(row) {
|
|
19
|
-
return new CartItem(
|
|
19
|
+
return new CartItem({
|
|
20
|
+
id: row.id,
|
|
21
|
+
created_at: row.created_at instanceof Date ? row.created_at : new Date(row.created_at),
|
|
22
|
+
cart_id: row.cart_id,
|
|
23
|
+
item_detail: row.item_detail,
|
|
24
|
+
detail_product_type: row.detail_product_type,
|
|
25
|
+
item_count: row.item_count,
|
|
26
|
+
unit_price: row.unit_price,
|
|
27
|
+
last_updated_at: row.last_updated_at,
|
|
28
|
+
});
|
|
20
29
|
}
|
|
21
30
|
toDB() {
|
|
22
31
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CartItem.js","sourceRoot":"","sources":["../../../src/models/BizClientCartAndOrder/CartItem.ts"],"names":[],"mappings":";;;AAEA,MAAa,QAAQ;IAUjB,
|
|
1
|
+
{"version":3,"file":"CartItem.js","sourceRoot":"","sources":["../../../src/models/BizClientCartAndOrder/CartItem.ts"],"names":[],"mappings":";;;AAEA,MAAa,QAAQ;IAUjB,YAAY,MASX;QACG,IAAI,CAAC,EAAE,GAAG,MAAM,CAAC,EAAE,CAAC;QACpB,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;QACpC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;QAC9B,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;QACtC,IAAI,CAAC,mBAAmB,GAAG,MAAM,CAAC,mBAAmB,CAAC;QACtD,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;QACpC,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;QACpC,IAAI,CAAC,eAAe,GAAG,MAAM,CAAC,eAAe,CAAC;IAClD,CAAC;IAED,KAAK;QACD,OAAO,IAAI,CAAC,EAAG,CAAC;IACpB,CAAC;IAED,MAAM,CAAC,MAAM,CAAC,GASb;QACG,OAAO,IAAI,QAAQ,CAAC;YAChB,EAAE,EAAE,GAAG,CAAC,EAAE;YACV,UAAU,EAAE,GAAG,CAAC,UAAU,YAAY,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC;YACtF,OAAO,EAAE,GAAG,CAAC,OAAO;YACpB,WAAW,EAAE,GAAG,CAAC,WAAW;YAC5B,mBAAmB,EAAE,GAAG,CAAC,mBAAmB;YAC5C,UAAU,EAAE,GAAG,CAAC,UAAU;YAC1B,UAAU,EAAE,GAAG,CAAC,UAAU;YAC1B,eAAe,EAAE,GAAG,CAAC,eAAe;SACvC,CAAC,CAAC;IACP,CAAC;IAED,IAAI;QAUA,OA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